Class: StatelyDB::Common::Auth::TokenProvider

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

Overview

TokenProvider is an abstract base class that should be extended for individual token provider implementations

Direct Known Subclasses

Auth0TokenProvider

Instance Method Summary collapse

Instance Method Details

#closeObject

Close the token provider and kill any background operations



18
19
20
# File 'lib/common/auth/token_provider.rb', line 18

def close
  raise "Not Implemented"
end

#get_token(force: false) ⇒ String

Get the current access token

Parameters:

  • force (Boolean) (defaults to: false)

    Whether to force a refresh of the token

Returns:

  • (String)

    The current access token



13
14
15
# File 'lib/common/auth/token_provider.rb', line 13

def get_token(force: false) # rubocop:disable Lint/UnusedMethodArgument
  raise "Not Implemented"
end