How to implement custom OpenID Relying Party in MVC 4

人走茶凉 提交于 2019-12-04 12:51:51

Unfortunately the API Microsoft exposes is limited to login providers that are hard-coded to a specific URL -- not one that can accept input from the user before logging the user in, which OpenID requires.

You can add support for specific OpenID providers such as StackExchange by creating a class that implements DotNetOpenAuth.AspNet.IAuthenticationClient and is hard-coded to use StackExchange. A great example of this is the source code for Microsoft's own provider for Yahoo!. Check it out, see how simple it is, then create your own that is simply hard-coded to https://openid.stackexchange.com/ instead of https://me.yahoo.com/ and you've got StackExchange login support.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!