Sahih al-Bukhari, Book 56, Hadith 170 (Bukhari 2839)

Narrated `Abdullah bin Zaid:

that in the time (of the battle) of Al-Harra a person came to him and said, "Ibn Hanzala is taking the pledge of allegiance from the people for death." He said, "I will never give a pledge of allegiance for such a thing to anyone after Allah's Messenger (ﷺ)."