Class: Tinker::Auth::AuthenticationManager
- Inherits:
-
Object
- Object
- Tinker::Auth::AuthenticationManager
- Defined in:
- lib/tinker/auth/authentication_manager.rb
Instance Method Summary collapse
-
#initialize(config:, http_client:) ⇒ AuthenticationManager
constructor
A new instance of AuthenticationManager.
- #token ⇒ Object
Constructor Details
#initialize(config:, http_client:) ⇒ AuthenticationManager
Returns a new instance of AuthenticationManager.
10 11 12 13 14 15 |
# File 'lib/tinker/auth/authentication_manager.rb', line 10 def initialize(config:, http_client:) @config = config @http_client = http_client @token = nil @expires_at = nil end |
Instance Method Details
#token ⇒ Object
17 18 19 20 21 |
# File 'lib/tinker/auth/authentication_manager.rb', line 17 def token return @token if token_valid? fetch_token end |