Versions in this module Expand all Collapse all v0 v0.1.0 Oct 2, 2026 Changes in this version + var ErrHeaderTooLarge = errors.New("authn: authorization header too large") + var ErrInvalidConfiguration = errors.New("authn: invalid configuration") + var ErrInvalidCredentials = errors.New("authn: invalid credentials") + var ErrMalformedCredentials = errors.New("authn: malformed credentials") + var ErrMissingCredentials = errors.New("authn: missing credentials") + var ErrUnavailable = errors.New("authn: verification unavailable") + var ErrUnsupportedScheme = errors.New("authn: unsupported scheme") + var ErrVerifierContract = errors.New("authn: invalid verifier result") + type Authenticator struct + func New(cfg Config) (*Authenticator, error) + func (a *Authenticator) Authenticate(ctx context.Context, headers http.Header) (identity.Caller, error) + func (a *Authenticator) Handler(next http.Handler) (http.Handler, error) + type CognitoClient struct + AllowUnbound bool + Audience string + ClientID string + type CognitoConfig struct + CacheTTL time.Duration + ClaimsBudget int + Clients []CognitoClient + ClockSkew time.Duration + Issuer string + MaxTokenBytes int + Timeout time.Duration + Transport http.RoundTripper + type CognitoVerifier struct + func NewCognitoVerifier(cfg CognitoConfig) (*CognitoVerifier, error) + func (v *CognitoVerifier) Verify(ctx context.Context, token string) (identity.Caller, error) + func (v *CognitoVerifier) Warm(ctx context.Context) error + type Config struct + Bearer VerifyFunc + IAMProof VerifyFunc + MaxAuthorizationBytes int + Realm string + type Error struct + func (e *Error) Challenges() []string + func (e *Error) Error() string + func (e *Error) GoString() string + func (e *Error) StatusCode() int + func (e *Error) Unwrap() error + type VerifyFunc func(ctx context.Context, credential string) (identity.Caller, error)