问题
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