Class: Keycardai::OAuth::WorkloadIdentity::FunctionTokenSource
- Inherits:
-
Object
- Object
- Keycardai::OAuth::WorkloadIdentity::FunctionTokenSource
- Defined in:
- lib/keycardai/oauth/workload_identity.rb
Overview
Adapter making a bare callable usable as an identity-token source.
Instance Method Summary collapse
- #identity_token ⇒ Object
-
#initialize(callable) ⇒ FunctionTokenSource
constructor
A new instance of FunctionTokenSource.
- #source_identifier ⇒ Object
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_token ⇒ Object
94 95 96 |
# File 'lib/keycardai/oauth/workload_identity.rb', line 94 def identity_token @callable.call end |
#source_identifier ⇒ Object
98 99 100 |
# File 'lib/keycardai/oauth/workload_identity.rb', line 98 def source_identifier "custom" end |