Class: K8y::REST::Auth::Providers::ProviderBase

Inherits:
AuthBase
  • Object
show all
Defined in:
lib/k8y/rest/auth/providers/provider_base.rb

Instance Method Summary collapse

Instance Method Details

#configure_connection(connection) ⇒ Object



8
9
10
# File 'lib/k8y/rest/auth/providers/provider_base.rb', line 8

def configure_connection(connection)
  connection.request(:authorization, "Bearer", -> { TokenStore[connection.host] ||= token })
end

#generate_token!(connection) ⇒ Object



12
13
14
# File 'lib/k8y/rest/auth/providers/provider_base.rb', line 12

def generate_token!(connection)
  TokenStore[connection.host] = token
end