Class: StatelyDB::Common::Auth::TokenResult
- Inherits:
-
Object
- Object
- StatelyDB::Common::Auth::TokenResult
- Defined in:
- lib/common/auth/token_fetcher.rb
Overview
Result from a token fetch operation
Instance Attribute Summary collapse
-
#expires_in_secs ⇒ Integer
readonly
The expiration time in seconds.
-
#token ⇒ String
readonly
The token string.
Instance Method Summary collapse
-
#initialize(token:, expires_in_secs:) ⇒ TokenResult
constructor
Create a new TokenResult.
Constructor Details
#initialize(token:, expires_in_secs:) ⇒ TokenResult
Create a new TokenResult
24 25 26 27 |
# File 'lib/common/auth/token_fetcher.rb', line 24 def initialize(token:, expires_in_secs:) @token = token @expires_in_secs = expires_in_secs end |
Instance Attribute Details
#expires_in_secs ⇒ Integer (readonly)
Returns The expiration time in seconds.
18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/common/auth/token_fetcher.rb', line 18 class TokenResult attr_reader :token, :expires_in_secs # Create a new TokenResult # @param [String] token The access token # @param [Integer] expires_in_secs The number of seconds until the token expires def initialize(token:, expires_in_secs:) @token = token @expires_in_secs = expires_in_secs end end |
#token ⇒ String (readonly)
Returns The token string.
18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/common/auth/token_fetcher.rb', line 18 class TokenResult attr_reader :token, :expires_in_secs # Create a new TokenResult # @param [String] token The access token # @param [Integer] expires_in_secs The number of seconds until the token expires def initialize(token:, expires_in_secs:) @token = token @expires_in_secs = expires_in_secs end end |