Permalink
Browse files

Add README file.

  • Loading branch information...
1 parent cb371da commit bd87acb68390cfc5463d894f7afd304047e26d3e @MathieuTurcotte committed Jan 29, 2012
Showing with 45 additions and 0 deletions.
  1. +45 −0 README.md
View
@@ -0,0 +1,45 @@
+C# OAuth Client
+===============
+
+A C# 3.5 library implementing the client side part OAuth 1.0 protocol.
+
+See the OAuth specs at http://oauth.net/core/1.0/
+
+How to use
+----------
+
+First of all, you have to instantiate a `RequestAuthenticator`, passing in your
+`ClientCredentials` and the `AccessToken` granted by an OAuth provider.
+
+ AccessToken accessToken = new AccessToken(ACCESS_TOKEN, ACCESS_TOKEN_SECRET);
+ ClientCredentials credentials = new ClientCredentials(CLIENT_IDENTIFIER, CLIENT_SHARED_SECRET);
+ RequestAuthenticator authenticator = RequestAuthenticatorFactory.GetHmacSha1Authenticator(credentials, accessToken);
+
+Now, to consume protected resources, `WebRequests` need to be signed using the
+authenticator that you've just created. For example, to access a Dropbox account
+informations, one would do:
+
+ WebRequest req = WebRequest.Create("https://api.dropbox.com/1/account/info");
+ authenticator.SignRequest(req);
+ string response = ReadResponse(req);
+
+Limitations
+-----------
+
+* Doesn't support `RSA-SHA1` signatures.
+* Doesn't support `POST` requests with url encoded body.
+
+Tests
+-----
+
+* Unit tests are grouped in the `OAuth.Tests` project.
+* Integration tests are grouped in the `OAuth.Tests.Integration` project.
+ Integration tests perform requests to differents OAuth provider, ensuring
+ a minimal level of interoperability.
+
+[NUnit](http://www.nunit.org/) is required to run all tests.
+
+License
+-------
+
+This code is free to use under the terms of the MIT license.

0 comments on commit bd87acb

Please sign in to comment.