Class: Crazylegs::AccessToken
- Inherits:
-
Object
- Object
- Crazylegs::AccessToken
- Defined in:
- lib/crazylegs/credentials.rb
Overview
Encapsulates a request token, which is what the server returns when you request a user’s OAuth Token
Instance Attribute Summary collapse
-
#secret ⇒ Object
readonly
Returns the value of attribute secret.
-
#token ⇒ Object
readonly
Returns the value of attribute token.
Instance Method Summary collapse
-
#initialize(token, secret) ⇒ AccessToken
constructor
- Create a new token
token
- the token itself
secret
-
the token secret, used for signing requests.
- the token itself
- Create a new token
Constructor Details
#initialize(token, secret) ⇒ AccessToken
Create a new token
token
-
the token itself
secret
-
the token secret, used for signing requests
15 16 17 18 19 20 |
# File 'lib/crazylegs/credentials.rb', line 15 def initialize(token,secret) raise ArgumentError.new('token is required') if token.nil? raise ArgumentError.new('secret is required') if secret.nil? @token = token @secret = secret end |
Instance Attribute Details
#secret ⇒ Object (readonly)
Returns the value of attribute secret.
10 11 12 |
# File 'lib/crazylegs/credentials.rb', line 10 def secret @secret end |
#token ⇒ Object (readonly)
Returns the value of attribute token.
9 10 11 |
# File 'lib/crazylegs/credentials.rb', line 9 def token @token end |