httpjwt

package
v0.0.0-...-3552e00 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2025 License: MIT Imports: 10 Imported by: 1

Documentation

Index

Constants

View Source
const (
	MissingAuthHeaderMessage  = "missing authorization header"
	InvalidAuthHeaderMessage  = "invalid authorization header, must begin with 'Bearer '"
	InvalidTokenFormatMessage = "invalid token format in authorization header, must be JWT"
	NoTrustedKeyMessage       = "A valid JWT was found, however it was not signed by any trusted key"
	ExpiredJWTMessage         = "JWT expired at %s"
	FailedToUnmarshalMessage  = "failed to unmarshal JWT claim, please check the token format"
	InvalidSignatureMessage   = "invalid signature in JWT, please check the token format"

	VerifiedJWTHeader = "X-Verified-JWT"
)

Variables

View Source
var ValidSignatureAlgorithms = []jose.SignatureAlgorithm{jose.EdDSA}

Functions

This section is empty.

Types

type AuthFunc

type AuthFunc func(context.Context, *http.Request) (map[string]string, error)

func JWKSAuthFunc

func JWKSAuthFunc(jwks JWKS) AuthFunc

type JWKS

type JWKS interface {
	GetKeys(keyID string) ([]jose.JSONWebKey, error)
}

Jump to

Keyboard shortcuts

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