Versions in this module Expand all Collapse all v0 v0.3.0 Aug 16, 2026 Changes in this version + var ErrUnauthenticated = errors.New("identity: authentication failed") + func LooksLikeJWT(s string) bool + type Config struct + Algorithms []string + AssertionHeader string + Audience string + EmailClaim string + HTTPClient *http.Client + Issuer string + JWKSURL string + Mode Mode + NameClaim string + Now func() time.Time + RoleMap map[string]Role + RolesClaim string + func ConfigFromEnv(getenv func(string) string) (Config, error) + type Error struct + func (e *Error) Error() string + func (e *Error) Reason() string + func (e *Error) Unwrap() error + type Identity struct + DisplayName string + Email string + Issuer string + Role Role + Subject string + type Mode string + const ModeDisabled + const ModeOIDC + const ModeTrustedProxy + type ProxyPreset string + const PresetCustom + const PresetGCPIAP + type Role string + const RoleAdmin + const RoleDeveloper + const RoleNone + const RoleViewer + func ParseRole(s string) (Role, bool) + func (r Role) AtLeast(min Role) bool + type Verifier struct + func FromEnv(ctx context.Context) (*Verifier, error) + func New(ctx context.Context, cfg Config) (*Verifier, error) + func (v *Verifier) AssertionHeader() string + func (v *Verifier) Mode() Mode + func (v *Verifier) Verify(ctx context.Context, token string) (Identity, error)