OAuthWebSecurity - Without OpenID

大城市里の小女人 提交于 2020-01-03 05:19:41

问题


Is it DotNetOpenAuth OAuthWebSecurity only for OpenID Providers?

OAuthWebSecurity.RegisterClient(new CutomOAuth2Client("ID", "KEY"), "CustomProvider", null);

Or could I base my entire authentication in a external OAuth Provider that doesn't implement OpenID? The scenario is likely if I want to develop a client for facebook but facebook isn't a OpenId provider...


回答1:


Yes you can base your authentication on an external OAuth provider. I just made this SO post: How to let users login to my site using SoundCloud detailing how to do a custom OAuth2Client based on SoundCloud... though implementing it with a custom GitHub client was much easier for me.

The Facebook OAuth client is built in in VS 2012 - Using OAuth Providers with MVC 4, so I don't think you'd need to make a custom client unless there was something it isn't doing that you need.

Other useful reading: What's the difference between OpenID and OAuth?



来源:https://stackoverflow.com/questions/14988312/oauthwebsecurity-without-openid

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