Versions in this module Expand all Collapse all v0 v0.5.1 Oct 29, 2026 v0.5.0 Oct 28, 2026 Changes in this version + var ErrNoPrincipal = errors.New("authn: no authenticated principal") + var ErrUnsupportedForm = errors.New("authn: no verifier accepts this credential form") + func NewContext(ctx context.Context, p *Principal) context.Context + type Authenticator interface + Verify func(ctx context.Context, c Credential) (*Principal, error) + type Chain struct + Minter Minter + Verifiers []Verifier + func (c *Chain) End(ctx context.Context, id string) error + func (c *Chain) Mint(ctx context.Context) (MintedSession, error) + func (c *Chain) Verify(ctx context.Context, cred Credential) (*Principal, error) + type Credential struct + Form Form + Secret string + type Form int + const OperatorToken + const Password + const Session + type MintedSession struct + ID string + Lifetime time.Duration + type Minter interface + End func(ctx context.Context, id string) error + Mint func(ctx context.Context) (MintedSession, error) + type Principal struct + DisplayName *string + func FromContext(ctx context.Context) (*Principal, bool) + type Verifier interface + Form func() Form + Verify func(ctx context.Context, secret string) (*Principal, error)