Permalink
Browse files

A few more tweaks in the README file.

  • Loading branch information...
rsieiro committed Dec 13, 2011
1 parent d94cbc8 commit b2187bed6365f63b34b88cf05196eafe6b5546e8
Showing with 12 additions and 6 deletions.
  1. +12 −6 README.mdown
View
@@ -3,11 +3,11 @@ By Rodrigo Sieiro - [http://rodrigo.sharpcube.com](http://rodrigo.sharpcube.com)
## About
-**RSOAuthEngine** is an ARC based OAuth engine for [MKNetworkKit](https://github.com/MugunthKumar/MKNetworkKit). It supports OAuth 1.0a and it's fully compatible with MKNetworkKit existing classes, allowing you to simply inherit **RSOAuthEngine** instead of MKNetworkEngine to get OAuth support.
+**RSOAuthEngine** is an ARC based OAuth engine for [MKNetworkKit](https://github.com/MugunthKumar/MKNetworkKit). It supports OAuth 1.0a and it's fully compatible with MKNetworkKit existing classes, allowing you to simply inherit `RSOAuthEngine` instead of `MKNetworkEngine` to get OAuth support.
## Usage
-If you already have a project using MKNetworkKit, just add the contents of the RSOAuthEngine directory to your project and change all classes that inherit from MKNetworkEngine to inherit from **RSOAuthEngine** instead. Whenever you need to send an OAuth signed request, replace calls to `enqueueOperation` with `enqueueSignedOperation`.
+If you already have a project using MKNetworkKit, just add the contents of the `RSOAuthEngine` directory to your project and change all classes that inherit from `MKNetworkEngine` to inherit from `RSOAuthEngine` instead. Whenever you need to send an OAuth signed request, replace calls to `enqueueOperation` with `enqueueSignedOperation`.
If you're not currently using MKNetworkKit, follow the instructions to add it to your project [here](http://blog.mugunthkumar.com/products/ios-framework-introducing-mknetworkkit/) first, then add **RSOAuthEngine** as written in the previous paragraph. **Important**: although not mentioned in the instructions, MKNetworkKit also requires Security.framework.
@@ -19,9 +19,11 @@ A common OAuth flow using **RSOAuthEngine** should go like this:
2. Init your class using one of the defined initializers that include your Consumer Key and Secret.
3. Send a signed operation to get a request token.
4. Fill the request token using `fillTokenWithResponseBody:type` (use `RSOAuthRequestToken` as type).
-5. Send another request to get an access token.
-6. Fill the access token using `fillTokenWithResponseBody:type` (use `RSOAuthAccessToken` as type).
-7. From now on, all requests sent with `enqueueSignedOperation` will be signed with your tokens.
+5. Redirect the user to the authorization page and wait for the callback.
+6. Fill the request token (again) using `fillTokenWithResponseBody:type` (use `RSOAuthRequestToken` as type), this time using the parameters received in the callback.
+7. Send another request to get an access token.
+8. Fill the access token using `fillTokenWithResponseBody:type` (use `RSOAuthAccessToken` as type).
+9. From now on, all requests sent with `enqueueSignedOperation` will be signed with your tokens.
Alternatively you could use `setAccessToken:secret` after initialization to define a previously stored access token.
@@ -34,6 +36,10 @@ To build the demo project, follow these steps:
1. In the project directory, run `git submodule update --init` to retrieve MKNetworkKit (added to the project as a submodule).
2. Put your consumer key and secret at the top of `RSTwitterEngine.m` and remove the `#error` macro. If you don't have a consumer key/secret, register an app at [https://dev.twitter.com/apps](https://dev.twitter.com/apps) to get a pair. **Important**: you need to add a dummy callback URL to your app when registering, otherwise Twitter won't allow you to send a callback URL in the OAuth request.
+## Compatibility
+
+Currently this engine has only been tested with Twitter. If you use **RSOAuthEngine** to implement OAuth authentication with another service, please let me know so I can update this session.
+
## License
**RSOAuthEngine** is licensed under the MIT License. Please give me some kind of attribution if you use it in your project, such as a "thanks" note somewhere. I'd also love to know if you use my code, please drop me a line if you do!
@@ -60,4 +66,4 @@ Full license text follows:
## Acknowledgments
-**RSOAuthEngine** may contain code from [ASI-HTTP-Request-OAuth](https://github.com/keybuk/asi-http-request-oauth) by Scott James Remnant and the iPhone version of [OAuthConsumer](https://github.com/jdg/oauthconsumer) by Jonathan George. I used bits and pieces of the code from both projects as references to write this project.
+**RSOAuthEngine** may contain code from [ASI-HTTP-Request-OAuth](https://github.com/keybuk/asi-http-request-oauth) by Scott James Remnant and the iPhone version of [OAuthConsumer](https://github.com/jdg/oauthconsumer) by Jonathan George. I used bits and pieces of the code from both projects as references to write this engine.

0 comments on commit b2187be

Please sign in to comment.