jwt

package
v0.0.0-...-0583c98 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	TokenExpired     = errors.New("Token is expired")
	TokenNotValidYet = errors.New("Token not active yet")
	TokenMalformed   = errors.New("That's not even a token")
	TokenInvalid     = errors.New("Couldn't handle this token:")
)

Functions

This section is empty.

Types

type JWT

type JWT struct {
	SigningKey []byte
}

func NewJWT

func NewJWT() *JWT

func (*JWT) CreateClaims

func (j *JWT) CreateClaims(baseClaims request.PrivateClaims) request.CustomClaims

func (*JWT) CreateToken

func (j *JWT) CreateToken(claims request.CustomClaims) (string, error)

func (*JWT) InBlackList

func (j *JWT) InBlackList(jwt string) bool

func (*JWT) ParseToken

func (j *JWT) ParseToken(tokenStr string) (*request.CustomClaims, error)

func (*JWT) SetJWTBlack

func (j *JWT) SetJWTBlack(jwt string) (err error)

Jump to

Keyboard shortcuts

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