Versions in this module Expand all Collapse all v0 v0.2.0 Jun 28, 2026 v0.1.0 Jun 27, 2026 Changes in this version + var ErrAgentIdentityRequired = errors.New("agent identity is required") + var ErrCompositionFailed = errors.New("identity composition failed") + var ErrInvalidAAuthToken = errors.New("invalid AAuth token") + var ErrInvalidIDJAGAssertion = errors.New("invalid ID-JAG assertion") + var ErrInvalidWorkloadIdentity = errors.New("invalid workload identity") + func WithContext(ctx context.Context, identity *ComposedIdentity) context.Context + type AAuthVerifier interface + VerifyAAuth func(ctx context.Context, token string) (*AgentIdentity, error) + type AgentIdentity struct + AAuthToken string + AgentID string + Capabilities []string + DelegatedBy string + Issuer string + MissionID string + Scopes []string + VerifiedAt time.Time + type ComposeOptions struct + AAuthToken string + IDJAGAssertion string + IncludeWorkload bool + TraceID string + type ComposedIdentity struct + Agent *AgentIdentity + BindingID string + BoundAt time.Time + ExpiresAt time.Time + Human *HumanIdentity + TraceID string + Workload *WorkloadIdentity + func FromContext(ctx context.Context) (*ComposedIdentity, bool) + func (c *ComposedIdentity) AuditString() string + func (c *ComposedIdentity) HasHuman() bool + func (c *ComposedIdentity) HasWorkload() bool + func (c *ComposedIdentity) IsExpired() bool + func (c *ComposedIdentity) IsValid() bool + type Composer struct + func NewComposer(opts ...ComposerOption) *Composer + func (c *Composer) Compose(ctx context.Context, opts ComposeOptions) (*ComposedIdentity, error) + func (c *Composer) Verify(ctx context.Context, identity *ComposedIdentity) error + type ComposerOption func(*Composer) + func WithAAuthVerifier(v AAuthVerifier) ComposerOption + func WithIDJAGVerifier(v IDJAGVerifier) ComposerOption + func WithWorkloadVerifier(v WorkloadVerifier) ComposerOption + type HumanIdentity struct + Email string + IDJAGToken string + Issuer string + Name string + Roles []string + Subject string + VerifiedAt time.Time + type IDJAGVerifier interface + VerifyIDJAG func(ctx context.Context, assertion string) (*HumanIdentity, error) + type WorkloadIdentity struct + SPIFFEID string + SVID string + ServiceName string + TrustDomain string + VerifiedAt time.Time + type WorkloadVerifier interface + VerifyWorkload func(ctx context.Context) (*WorkloadIdentity, error)