xauth

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidSigningMethod = errors.New("invalid signing method")
	ErrInvalidToken         = errors.New("invalid token")
	ErrClaimNotFound        = errors.New("claim not found")
	ErrTokenExpired         = errors.New("token has expired")
	ErrTokenNotYetValid     = errors.New("token is not yet valid")
)

Predefined errors for JWT operations

Functions

func NewJWTManager

func NewJWTManager(privateKeyPath, issuer string) (*_JWTManager, error)

NewJWTManager initializes a new _JWTManager

Types

type JWTManager

type JWTManager interface {
	GenerateToken(claims jwt.MapClaims, validityDuration time.Duration) (string, error)
	ValidateToken(token string) (jwt.MapClaims, error)
	GetClaimBy(token, claimKey string) (any, error)
	GetClaims(token string) (jwt.MapClaims, error)
}

Jump to

Keyboard shortcuts

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