Skip to content

Commit

Permalink
change README to reflect the fact that oauth_callback is mandatory, o…
Browse files Browse the repository at this point in the history
…therwise oob is used by default
  • Loading branch information
hayeah authored and quirkey committed Jan 14, 2011
1 parent 744d4c5 commit 7eeb0e3
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions README.rdoc
Expand Up @@ -20,15 +20,19 @@ As a matter of fact it has been pulled out from an OAuth Rails Plugin http://cod

== Demonstration of usage

We need to specify the oauth_callback url explicitly, otherwise it defaults to "oob" (Out of Band)

@callback_url = "http://127.0.0.1:3000/oauth/callback"

Create a new consumer instance by passing it a configuration hash:

@consumer = OAuth::Consumer.new("key","secret", :site => "https://agree2")

Start the process by requesting a token

@request_token = @consumer.get_request_token
@request_token = @consumer.get_request_token(:oauth_callback => @callback_url)
session[:request_token] = @request_token
redirect_to @request_token.authorize_url
redirect_to @request_token.authorize_url(:oauth_callback => @callback_url)

When user returns create an access_token

Expand Down

0 comments on commit 7eeb0e3

Please sign in to comment.