OAuth C# Library for Google, Yahoo! Twitter
I'm looking for a library that will allow me to use OAuth in my ASP.NET/C# applications, such that I can authenticate users using one of the following OAuth providers
Google
Yahoo!
Twitter
I've looked at various o开发者_如何转开发pen source libraries and find that there is one issue or another with them (some don't work at all, some work against one service not not others). I've also looked at OAuthDotNet and I must admit that I find it way too complicated to figure out how to begin using it and so I've not really tried it.
So essentially I'm looking for a simple to use library that works against the above mentioned providers (at least).
Jackie I have a blog post on this OAuth C# Library
There is a library (including source code) and a simple sample project you can download to get started with this.
I've tested it against 1. Google 2. Twitter 3. Yahoo 4. Vimeo
You don't mention the version of OAuth you'd like to support so you should know that the library supports OAuth 1.0 revision A only and not OAuth 2.0. Most site today support OAuth 1.0 revision a.
I've kept the sample project very simple intentionally, so those starting out down this path don't have to struggle trying to figure out how to use the library. The library is not "over engineered" like I believe some libraries out there are so it is fairly simple to enhance if need be. But I suggest you attempt that only after you've familiarized yourself with the OAuth protocol.
The project in fact is an open source project hosted on Google code (link in the blog post).
Note: Due to the way Yahoo! has implemented their service it is not possible (or not simple) to test against their service from your development machine.
I hope this helps.
DotNetOpenAuth is open source library that supports OpenID, OAuth and support for your site visitors to login with their OpenIDs.
Twitter Libraries in different languages.
Google Data client libraries are written to support client applications to access APIs. Libraries are written in different types of languages.
If you're looking to just to Twitter then I would suggest twitterizer. It's a great library with a fairly good community and support.
http://byatool.com/c/connect-your-web-app-to-twitter-using-hammock-csharp/ (Wayback archive link.)
http://hammock.codeplex.com/ (Moved to github here: https://github.com/danielcrenna/vault/tree/master/hammock)
these link might be helpful.
精彩评论