Class: Keycardai::OAuth::WorkloadIdentity::FunctionTokenSource

Inherits:
Object
  • Object
show all
Defined in:
lib/keycardai/oauth/workload_identity.rb

Overview

Adapter making a bare callable usable as an identity-token source.

Instance Method Summary collapse

Constructor Details

#initialize(callable) ⇒ FunctionTokenSource

Returns a new instance of FunctionTokenSource.



90
91
92
# File 'lib/keycardai/oauth/workload_identity.rb', line 90

def initialize(callable)
  @callable = callable
end

Instance Method Details

#identity_tokenObject



94
95
96
# File 'lib/keycardai/oauth/workload_identity.rb', line 94

def identity_token
  @callable.call
end

#source_identifierObject



98
99
100
# File 'lib/keycardai/oauth/workload_identity.rb', line 98

def source_identifier
  "custom"
end