gojwt

package module
v0.8.5 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2025 License: GPL-3.0 Imports: 1 Imported by: 7

Documentation

Index

Constants

View Source
const (
	// BearerPrefix is the prefix for the bearer token
	BearerPrefix = "Bearer"
)

Variables

View Source
var (
	// CtxTokenClaimsKey is the key for the token claims to be set to the context
	CtxTokenClaimsKey CtxKey = "token_claims"

	// CtxTokenKey is the key for the token to be set to the context
	CtxTokenKey CtxKey = "token"

	// IDClaim is the claim for the JWT ID
	IDClaim = "jti"

	// IsRefreshTokenClaim is the claim for refresh token
	IsRefreshTokenClaim = "irt"

	// SubjectClaim is the claim for the subject
	SubjectClaim = "sub"
)
View Source
var (
	ErrUnableToParsePrivateKey            = errors.New("unable to parse private key")
	ErrUnableToParsePublicKey             = errors.New("unable to parse public key")
	ErrInvalidKeyType                     = errors.New("invalid key type")
	ErrMissingTokenInContext              = errors.New("missing token in context")
	ErrMissingTokenClaimsInContext        = errors.New("missing token claims in context")
	ErrUnexpectedTokenTypeInContext       = errors.New("unexpected token type in context")
	ErrUnexpectedTokenClaimsTypeInContext = errors.New("unexpected token claims type in context")
	ErrMissingTokenClaimsID               = errors.New("missing token claims id")
	ErrMissingTokenClaimsSubject          = errors.New("missing token claims subject")
	ErrEmptyToken                         = errors.New("empty token")
)

Functions

This section is empty.

Types

type CtxKey added in v0.7.6

type CtxKey string

CtxKey is the type for the context keys

Jump to

Keyboard shortcuts

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