identity

package
v0.22.14 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 26, 2026 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MetadataKeyIdentityID        = "x-identity-id"
	MetadataKeyIdentityType      = "x-identity-type"
	MetadataKeyWorkloadID        = "x-workload-id"
	MetadataKeyOrganizationID    = "x-organization-id"
	MetadataKeyAppInstallationID = "x-app-installation-id"
)

Variables

This section is empty.

Functions

func AppendToOutgoingContext

func AppendToOutgoingContext(ctx context.Context) context.Context

func WithIdentity

func WithIdentity(ctx context.Context, identity ResolvedIdentity) context.Context

Types

type IdentityType

type IdentityType string
const (
	IdentityTypeUser   IdentityType = "user"
	IdentityTypeAgent  IdentityType = "agent"
	IdentityTypeApp    IdentityType = "app"
	IdentityTypeRunner IdentityType = "runner"
)

func ParseIdentityType

func ParseIdentityType(value string) (IdentityType, error)

type ResolvedIdentity

type ResolvedIdentity struct {
	IdentityID   string
	IdentityType IdentityType
	WorkloadID   string
}

func IdentityFromContext

func IdentityFromContext(ctx context.Context) (ResolvedIdentity, bool)

func IdentityFromIncomingContext

func IdentityFromIncomingContext(ctx context.Context) (ResolvedIdentity, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL