Class: StatelyDB::Common::Auth::TokenResult

Inherits:
Object
  • Object
show all
Defined in:
lib/common/auth/token_fetcher.rb

Overview

Result from a token fetch operation

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(token:, expires_in_secs:) ⇒ TokenResult

Create a new TokenResult

Parameters:

  • token (String)

    The access token

  • expires_in_secs (Integer)

    The number of seconds until the token expires



19
20
21
22
# File 'lib/common/auth/token_fetcher.rb', line 19

def initialize(token:, expires_in_secs:)
  @token = token
  @expires_in_secs = expires_in_secs
end

Instance Attribute Details

#expires_in_secsObject (readonly)

Returns the value of attribute expires_in_secs.



14
15
16
# File 'lib/common/auth/token_fetcher.rb', line 14

def expires_in_secs
  @expires_in_secs
end

#tokenObject (readonly)

Returns the value of attribute token.



14
15
16
# File 'lib/common/auth/token_fetcher.rb', line 14

def token
  @token
end