http: enforce the credential types
http: enforce the credential types

The user may decide to return any type of credential, including ones we
did not say we support. Add a check to make sure the user returned an
object of the right type and error out if not.

chiayolin/libgit2,dleehr/libgit2,joshtriplett/libgit2,joshtriplett/libgit2,rcorre/libgit2,magnus98/TEST,skabel/manguse,kenprice/libgit2,whoisj/libgit2,sim0629/libgit2,iankronquist/libgit2,ardumont/libgit2,spraints/libgit2,dleehr/libgit2,magnus98/TEST,joshtriplett/libgit2,ardumont/libgit2,since2014/libgit2,saurabhsuniljain/libgit2,saurabhsuniljain/libgit2,rcorre/libgit2,Corillian/libgit2,mingyaaaa/libgit2,mrksrm/Mingijura,spraints/libgit2,yongthecoder/libgit2,t0xicCode/libgit2,mrksrm/Mingijura,JIghtuse/libgit2,mrksrm/Mingijura,whoisj/libgit2,oaastest/libgit2,sim0629/libgit2,since2014/libgit2,Tousiph/Demo1,yongthecoder/libgit2,chiayolin/libgit2,claudelee/libgit2,amyvmiwei/libgit2,swisspol/DEMO-libgit2,kenprice/libgit2,sim0629/libgit2,saurabhsuniljain/libgit2,falqas/libgit2,nokiddin/libgit2,rcorre/libgit2,kenprice/libgit2,whoisj/libgit2,stewid/libgit2,Corillian/libgit2,stewid/libgit2,spraints/libgit2,linquize/libgit2,kissthink/libgit2,Tousiph/Demo1,leoyanggit/libgit2,MrHacky/libgit2,mhp/libgit2,MrHacky/libgit2,ardumont/libgit2,linquize/libgit2,claudelee/libgit2,nokiddin/libgit2,KTXSoftware/libgit2,stewid/libgit2,amyvmiwei/libgit2,iankronquist/libgit2,JIghtuse/libgit2,stewid/libgit2,MrHacky/libgit2,saurabhsuniljain/libgit2,sygool/libgit2,dleehr/libgit2,oaastest/libgit2,mhp/libgit2,rcorre/libgit2,iankronquist/libgit2,mrksrm/Mingijura,yosefhackmon/libgit2,skabel/manguse,falqas/libgit2,since2014/libgit2,jeffhostetler/public_libgit2,chiayolin/libgit2,mhp/libgit2,joshtriplett/libgit2,amyvmiwei/libgit2,sygool/libgit2,rcorre/libgit2,jeffhostetler/public_libgit2,saurabhsuniljain/libgit2,claudelee/libgit2,sygool/libgit2,ardumont/libgit2,skabel/manguse,oaastest/libgit2,mingyaaaa/libgit2,sygool/libgit2,whoisj/libgit2,amyvmiwei/libgit2,falqas/libgit2,KTXSoftware/libgit2,KTXSoftware/libgit2,linquize/libgit2,magnus98/TEST,swisspol/DEMO-libgit2,swisspol/DEMO-libgit2,JIghtuse/libgit2,KTXSoftware/libgit2,Corillian/libgit2,kissthink/libgit2,iankronquist/libgit2,yosefhackmon/libgit2,yongthecoder/libgit2,yosefhackmon/libgit2,dleehr/libgit2,since2014/libgit2,Tousiph/Demo1,skabel/manguse,iankronquist/libgit2,kenprice/libgit2,spraints/libgit2,swisspol/DEMO-libgit2,Tousiph/Demo1,jeffhostetler/public_libgit2,magnus98/TEST,claudelee/libgit2,mhp/libgit2,linquize/libgit2,KTXSoftware/libgit2,chiayolin/libgit2,kissthink/libgit2,stewid/libgit2,leoyanggit/libgit2,spraints/libgit2,falqas/libgit2,whoisj/libgit2,oaastest/libgit2,mcanthony/libgit2,mcanthony/libgit2,chiayolin/libgit2,mhp/libgit2,oaastest/libgit2,JIghtuse/libgit2,falqas/libgit2,yongthecoder/libgit2,skabel/manguse,saurabhsuniljain/libgit2,kissthink/libgit2,skabel/manguse,t0xicCode/libgit2,JIghtuse/libgit2,t0xicCode/libgit2,mcanthony/libgit2,whoisj/libgit2,kissthink/libgit2,jeffhostetler/public_libgit2,kenprice/libgit2,iankronquist/libgit2,mcanthony/libgit2,mhp/libgit2,since2014/libgit2,yongthecoder/libgit2,Corillian/libgit2,yosefhackmon/libgit2,claudelee/libgit2,dleehr/libgit2,yosefhackmon/libgit2,amyvmiwei/libgit2,nokiddin/libgit2,ardumont/libgit2,dleehr/libgit2,spraints/libgit2,Tousiph/Demo1,leoyanggit/libgit2,jeffhostetler/public_libgit2,nokiddin/libgit2,kenprice/libgit2,yosefhackmon/libgit2,MrHacky/libgit2,joshtriplett/libgit2,JIghtuse/libgit2,mrksrm/Mingijura,ardumont/libgit2,jeffhostetler/public_libgit2,stewid/libgit2,leoyanggit/libgit2,magnus98/TEST,mrksrm/Mingijura,sim0629/libgit2,sygool/libgit2,magnus98/TEST,since2014/libgit2,MrHacky/libgit2,sim0629/libgit2,leoyanggit/libgit2,mingyaaaa/libgit2,mcanthony/libgit2,sygool/libgit2,mcanthony/libgit2,Tousiph/Demo1,MrHacky/libgit2,t0xicCode/libgit2,yongthecoder/libgit2,sim0629/libgit2,Corillian/libgit2,linquize/libgit2,mingyaaaa/libgit2,kissthink/libgit2,linquize/libgit2,mingyaaaa/libgit2,chiayolin/libgit2,nokiddin/libgit2,KTXSoftware/libgit2,amyvmiwei/libgit2,rcorre/libgit2,leoyanggit/libgit2,falqas/libgit2,t0xicCode/libgit2,swisspol/DEMO-libgit2,mingyaaaa/libgit2,nokiddin/libgit2,t0xicCode/libgit2,claudelee/libgit2,oaastest/libgit2,Corillian/libgit2,swisspol/DEMO-libgit2,joshtriplett/libgit2