jwt

package
v0.0.0-...-028896a Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidToken   = errors.New("invalid token")
	ErrWrongTokenType = errors.New("wrong token type")
	ErrExpiredToken   = errors.New("token expired")
	ErrEmptyToken     = errors.New("token is empty")
)

Functions

This section is empty.

Types

type JwtGenerator

type JwtGenerator interface {
	Generate(id string, isAccess bool) (models.Token, error)
	Validate(token string) (userId string, isRefresh bool, err error) //nolint
}

func New

func New(config config.JWT) JwtGenerator

Jump to

Keyboard shortcuts

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