Class: Capcoauth::OAuth::AccessToken
- Inherits:
-
Object
- Object
- Capcoauth::OAuth::AccessToken
- Defined in:
- lib/capcoauth/oauth/access_token.rb
Instance Attribute Summary collapse
-
#token ⇒ Object
Returns the value of attribute token.
-
#user_id ⇒ Object
Returns the value of attribute user_id.
Instance Method Summary collapse
-
#initialize(token) ⇒ AccessToken
constructor
A new instance of AccessToken.
- #verify ⇒ Object
Constructor Details
#initialize(token) ⇒ AccessToken
Returns a new instance of AccessToken.
7 8 9 10 |
# File 'lib/capcoauth/oauth/access_token.rb', line 7 def initialize(token) @token = token @user_id = TTLCache.user_id_for(token) end |
Instance Attribute Details
#token ⇒ Object
Returns the value of attribute token.
4 5 6 |
# File 'lib/capcoauth/oauth/access_token.rb', line 4 def token @token end |
#user_id ⇒ Object
Returns the value of attribute user_id.
5 6 7 |
# File 'lib/capcoauth/oauth/access_token.rb', line 5 def user_id @user_id end |
Instance Method Details
#verify ⇒ Object
12 13 14 |
# File 'lib/capcoauth/oauth/access_token.rb', line 12 def verify TokenVerifier.verify(self) end |