Class: Doorkeeper::RevocableTokens::RevocableAccessToken
- Inherits:
-
Object
- Object
- Doorkeeper::RevocableTokens::RevocableAccessToken
- Defined in:
- lib/doorkeeper/revocable_tokens/revocable_access_token.rb
Instance Attribute Summary collapse
-
#token ⇒ Object
readonly
Returns the value of attribute token.
Instance Method Summary collapse
-
#initialize(token) ⇒ RevocableAccessToken
constructor
A new instance of RevocableAccessToken.
- #revocable? ⇒ Boolean
- #revoke ⇒ Object
Constructor Details
#initialize(token) ⇒ RevocableAccessToken
Returns a new instance of RevocableAccessToken.
8 9 10 |
# File 'lib/doorkeeper/revocable_tokens/revocable_access_token.rb', line 8 def initialize(token) @token = token end |
Instance Attribute Details
#token ⇒ Object (readonly)
Returns the value of attribute token.
6 7 8 |
# File 'lib/doorkeeper/revocable_tokens/revocable_access_token.rb', line 6 def token @token end |
Instance Method Details
#revocable? ⇒ Boolean
12 13 14 |
# File 'lib/doorkeeper/revocable_tokens/revocable_access_token.rb', line 12 def revocable? token.accessible? end |
#revoke ⇒ Object
16 17 18 |
# File 'lib/doorkeeper/revocable_tokens/revocable_access_token.rb', line 16 def revoke token.revoke end |