principal

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KindMTLS = "mtls"
	KindJWT  = "jwt"
)

Kind values for PrincipalInfo, named after the authentication method that established the identity.

Variables

This section is empty.

Functions

func InjectContext

func InjectContext(ctx context.Context, p PrincipalInfo) context.Context

InjectContext returns a new context with the given PrincipalInfo.

Types

type PrincipalInfo

type PrincipalInfo struct {
	ID     string
	Kind   string
	Issuer string
}

PrincipalInfo contains information about an authenticated principal.

func FromContext

func FromContext(ctx context.Context) (PrincipalInfo, bool)

FromContext returns the PrincipalInfo from the context, if any.

Jump to

Keyboard shortcuts

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