Class: OAuth::RequestToken
- Inherits:
-
ConsumerToken
- Object
- Token
- ConsumerToken
- OAuth::RequestToken
- Defined in:
- lib/oauth/token.rb
Overview
The RequestToken is used for the initial Request. This is normally created by the Consumer object.
Instance Attribute Summary
Attributes inherited from ConsumerToken
Attributes inherited from Token
Instance Method Summary collapse
-
#authorize_url ⇒ Object
Returns the authorization url that you need to use for redirecting the user.
-
#get_access_token ⇒ Object
exchange for AccessToken on server.
Methods inherited from ConsumerToken
Methods inherited from Token
Methods included from Key
Constructor Details
This class inherits a constructor from OAuth::ConsumerToken
Instance Method Details
#authorize_url ⇒ Object
Returns the authorization url that you need to use for redirecting the user
43 44 45 |
# File 'lib/oauth/token.rb', line 43 def consumer.+"?oauth_token="+CGI.escape(token) end |
#get_access_token ⇒ Object
exchange for AccessToken on server
48 49 50 51 52 |
# File 'lib/oauth/token.rb', line 48 def get_access_token request=consumer.create_request(consumer.http_method,consumer.access_token_path,{:oauth_token=>self.token}) response=request.perform_token_request(consumer.secret,self.secret) OAuth::AccessToken.new(consumer,response[:oauth_token],response[:oauth_token_secret]) end |