go_jwt

package module
v0.3.8 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2025 License: GPL-3.0 Imports: 1 Imported by: 5

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 JWT context claims
	CtxTokenClaimsKey = "jwt_claims"

	// 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("no token in context")
	ErrMissingTokenClaimsInContext        = errors.New("no token claims in context")
	ErrUnexpectedTokenTypeInContext       = errors.New("unexpected token type in context")
	ErrUnexpectedTokenClaimsTypeInContext = errors.New("unexpected token claims type in context")
)

Functions

This section is empty.

Types

This section is empty.

Directories

Path Synopsis
gin
net
redis

Jump to

Keyboard shortcuts

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