Documentation
¶
Index ¶
Constants ¶
View Source
const ( // HeaderName is the default HTTP header used by transaction tokens. HeaderName = transactiontoken.HeaderName // TTSTokenSourceNone disables Orka-initiated token exchanges. TTSTokenSourceNone = "none" // TTSTokenSourceServiceAccount uses Orka's ServiceAccount identity for exchanges. TTSTokenSourceServiceAccount = "serviceAccount" // TTSTokenSourceIncoming uses the incoming subject token for exchanges. TTSTokenSourceIncoming = "incoming" )
Variables ¶
This section is empty.
Functions ¶
func SubjectTokenTypeForSource ¶
SubjectTokenTypeForSource returns the default RFC 8693 subject token type for an Orka TTS token source.
Types ¶
type ExchangeRequest ¶
type ExchangeRequest struct {
SubjectToken string
SubjectTokenType string
Scope string
RequestedTTL time.Duration
RequestDetails map[string]any
RequestContext map[string]any
}
ExchangeRequest describes a TTS exchange or replacement request.
type Exchanger ¶
type Exchanger interface {
Exchange(ctx context.Context, req ExchangeRequest) (string, error)
}
Exchanger exchanges subject tokens for transaction tokens.
type TTSClient ¶
type TTSClient struct {
// contains filtered or unexported fields
}
TTSClient is a strict RFC 8693 transaction-token service client.
func NewTTSClient ¶
NewTTSClient creates a TTS client for the configured exact endpoint.
type TTSConfig ¶
type TTSConfig struct {
Endpoint string
Audience string
Timeout time.Duration
TokenSource string
ChildTokenTTL time.Duration
ToolTokenTTL time.Duration
}
TTSConfig controls optional vendor-neutral transaction-token service integration.
func NewTTSConfig ¶
func NewTTSConfig(endpoint, audience, timeout, tokenSource, childTTL, toolTTL string) (TTSConfig, error)
NewTTSConfig builds TTS integration config from flag/env values. Endpoint is the exact OAuth token endpoint; Orka never appends a provider-specific path.
Click to show internal directories.
Click to hide internal directories.