Class: OAuth::Token
- Inherits:
-
Object
- Object
- OAuth::Token
- Includes:
- Helper
- Defined in:
- lib/oauth/tokens/token.rb
Overview
Superclass for the various tokens used by OAuth
Direct Known Subclasses
Instance Attribute Summary collapse
-
#secret ⇒ Object
Returns the value of attribute secret.
-
#token ⇒ Object
Returns the value of attribute token.
Instance Method Summary collapse
-
#initialize(token, secret) ⇒ Token
constructor
A new instance of Token.
- #to_query ⇒ Object
Methods included from Helper
_escape, escape, generate_key, generate_timestamp, normalize, normalize_nested_query, parse_header, stringify_keys, unescape
Constructor Details
#initialize(token, secret) ⇒ Token
Returns a new instance of Token.
10 11 12 13 |
# File 'lib/oauth/tokens/token.rb', line 10 def initialize(token, secret) @token = token @secret = secret end |
Instance Attribute Details
#secret ⇒ Object
Returns the value of attribute secret.
8 9 10 |
# File 'lib/oauth/tokens/token.rb', line 8 def secret @secret end |
#token ⇒ Object
Returns the value of attribute token.
8 9 10 |
# File 'lib/oauth/tokens/token.rb', line 8 def token @token end |
Instance Method Details
#to_query ⇒ Object
15 16 17 |
# File 'lib/oauth/tokens/token.rb', line 15 def to_query "oauth_token=#{escape(token)}&oauth_token_secret=#{escape(secret)}" end |