最好的 OAuth2C # 库是什么?

似乎很多应用程序提供商都在使用 OAuth2来允许 API 访问,比如 Twitter 和 Facebook。是否有人使用一个好的库来进行 OAuth2处理,这种处理通用到可以在所有应用程序中使用?

80684 次浏览

I didn't look into it's internals (source code link is broken), but in general DotNetOpenAuth seems to be quite professional.

Update: OAuth 2 and OpenID are now supported as well.

I would look at the Hammock REST client library. It is general purpose REST client, but it provides OAuth support as well.

I haven't seen any good frameworks out there yet for OAuth2. I've decided to try and roll my own for a project.

My framework so far supports bearer tokens and all of the oauth 2 flows (challenge/response, implicit, client credential, resource owner password, and refresh token).

It's a little clunky, and I'm working on my first REST service built on this framework.

Check it out, any feedback or contributions would be appreciated.

https://github.com/ghorsey/SharpOAuth2

You should look on OAuth2. It is .NET implementation of OAuth 1.0 and OAuth 2.0 protocol for most of the popular providers:

  • google
  • facebook
  • twitter
  • foursquare
  • instagram
  • linked-in
  • windows live
  • vkontakte
  • odnoklassniki
  • yandex
  • mail.ru
  • github

Nuget package is there.