jwtUtils

package
v0.0.0-...-2d2cc06 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2024 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidJWT = errors.New("JWT provided is not validate (JWT validation failure)")
)

Functions

func CreateJWTClaim

func CreateJWTClaim(username string, expiresAt time.Time) jwtClaims

func GetJWTClaim

func GetJWTClaim(token *jwt.Token, key string) string

func GetJWTKey

func GetJWTKey() ([]byte, error)

func GetJWTToken

func GetJWTToken(r *http.Request, withClaims bool) (*jwt.Token, error)

func IsJWTValid

func IsJWTValid(token *jwt.Token) bool

func ValidateJWT

func ValidateJWT(next http.Handler) http.Handler

Types

This section is empty.

Jump to

Keyboard shortcuts

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