Versions in this module Expand all Collapse all v1 v1.0.0 Nov 10, 2026 Changes in this version + func NewJWTMiddleware(opts JWTOptions) (func(http.Handler) http.Handler, error) + func ParseRSAPrivateKey(pemBytes []byte) (*rsa.PrivateKey, error) + func ParseRSAPublicKey(pemBytes []byte) (*rsa.PublicKey, error) + func WithPrincipal(ctx context.Context, p *Principal) context.Context + type JWTOptions struct + Algorithm string + Audience []string + CredentialsOptional bool + HMACSecret []byte + Issuer string + RSAPublicKey *rsa.PublicKey + type Principal struct + Claims map[string]any + Subject string + func Anonymous() *Principal + func FromContext(ctx context.Context) *Principal + func (p *Principal) Claim(name string) (any, bool) + func (p *Principal) ClaimString(name string) string + func (p *Principal) IsAuthenticated() bool