jwt

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

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

Go to latest
Published: Aug 3, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JWT

type JWT struct {
	// contains filtered or unexported fields
}

func NewJwt

func NewJwt(conf *viper.Viper) *JWT

func (*JWT) GenToken

func (j *JWT) GenToken(userId string, expiresAt time.Time) (string, error)

func (*JWT) ParseToken

func (j *JWT) ParseToken(tokenString string) (*MyCustomClaims, error)

type MyCustomClaims

type MyCustomClaims struct {
	UserId string
	jwt.RegisteredClaims
}

Jump to

Keyboard shortcuts

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