Class: StatelyDB::Common::Auth::AuthTokenProvider::TokenState
- Inherits:
-
Object
- Object
- StatelyDB::Common::Auth::AuthTokenProvider::TokenState
- Defined in:
- lib/common/auth/auth_token_provider.rb
Overview
Persistent state for the token provider
Instance Attribute Summary collapse
-
#expires_at_unix_secs ⇒ Integer
readonly
The expiration time in unix seconds.
-
#token ⇒ String
readonly
The token string.
Instance Method Summary collapse
-
#initialize(token:, expires_at_unix_secs:) ⇒ TokenState
constructor
Create a new TokenState.
Constructor Details
#initialize(token:, expires_at_unix_secs:) ⇒ TokenState
Create a new TokenState
222 223 224 225 |
# File 'lib/common/auth/auth_token_provider.rb', line 222 def initialize(token:, expires_at_unix_secs:) @token = token @expires_at_unix_secs = expires_at_unix_secs end |
Instance Attribute Details
#expires_at_unix_secs ⇒ Integer (readonly)
Returns The expiration time in unix seconds.
216 217 218 219 220 221 222 223 224 225 226 |
# File 'lib/common/auth/auth_token_provider.rb', line 216 class TokenState attr_reader :token, :expires_at_unix_secs # Create a new TokenState # @param [String] token The access token # @param [Integer] expires_at_unix_secs The unix timestamp when the token expires def initialize(token:, expires_at_unix_secs:) @token = token @expires_at_unix_secs = expires_at_unix_secs end end |
#token ⇒ String (readonly)
Returns The token string.
216 217 218 219 220 221 222 223 224 225 226 |
# File 'lib/common/auth/auth_token_provider.rb', line 216 class TokenState attr_reader :token, :expires_at_unix_secs # Create a new TokenState # @param [String] token The access token # @param [Integer] expires_at_unix_secs The unix timestamp when the token expires def initialize(token:, expires_at_unix_secs:) @token = token @expires_at_unix_secs = expires_at_unix_secs end end |