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

AuthTokenProvider

Instance Method Summary collapse

Instance Method Details

#closevoid

This method returns an undefined value.

Close the token provider and kill any background operations



26
27
28
# File 'lib/common/auth/token_provider.rb', line 26

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



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

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

#start(endpoint: "https://api.stately.cloud") ⇒ void

This method returns an undefined value.

Start the token provider. Starting multiple times should be a no-op.

Parameters:

  • endpoint (String) (defaults to: "https://api.stately.cloud")

    The endpoint to connect to



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

def start(endpoint: "https://api.stately.cloud") # rubocop:disable Lint/UnusedMethodArgument
  raise "Not Implemented"
end