Class: Doorkeeper::RevocableTokens::RevocableRefreshToken

Inherits:
Object
  • Object
show all
Defined in:
lib/doorkeeper/revocable_tokens/revocable_refresh_token.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(token) ⇒ RevocableRefreshToken

Returns a new instance of RevocableRefreshToken.



8
9
10
# File 'lib/doorkeeper/revocable_tokens/revocable_refresh_token.rb', line 8

def initialize(token)
  @token = token
end

Instance Attribute Details

#tokenObject (readonly)

Returns the value of attribute token.



6
7
8
# File 'lib/doorkeeper/revocable_tokens/revocable_refresh_token.rb', line 6

def token
  @token
end

Instance Method Details

#revocable?Boolean

Returns:

  • (Boolean)


12
13
14
# File 'lib/doorkeeper/revocable_tokens/revocable_refresh_token.rb', line 12

def revocable?
  !token.revoked?
end

#revokeObject



16
17
18
# File 'lib/doorkeeper/revocable_tokens/revocable_refresh_token.rb', line 16

def revoke
  token.revoke
end