jwt2

package
v0.0.0-...-ddfd2c2 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func JWTGenerate

func JWTGenerate(j *AuthJWT) (string, error)

生成 JWT

Types

type AuthJWT

type AuthJWT struct {
	jwt.RegisteredClaims
	User     string
	Activate bool
}

func JWTParse

func JWTParse(tokenStr string) (*AuthJWT, error)

解析 JWT

func NewAuthJWT

func NewAuthJWT(user string, activate bool, duration time.Duration) *AuthJWT

Jump to

Keyboard shortcuts

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