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(options = {}) ⇒ Object
exchange for AccessToken on server.
Methods inherited from ConsumerToken
Methods inherited from Token
Methods included from Helper
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
59 60 61 |
# File 'lib/oauth/token.rb', line 59 def consumer.+"?oauth_token="+CGI.escape(token) end |
#get_access_token(options = {}) ⇒ Object
exchange for AccessToken on server
64 65 66 67 |
# File 'lib/oauth/token.rb', line 64 def get_access_token(={}) response=consumer.token_request(consumer.http_method,(consumer.access_token_url? ? consumer.access_token_url : consumer.access_token_path),self,) OAuth::AccessToken.new(consumer,response[:oauth_token],response[:oauth_token_secret]) end |