xjtoken

package
v0.8.2 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateToken

func GenerateToken(jwtSecret string, jwtExpire int, user, ext string) (string, error)

产生token的函数

Types

type Claims

type Claims struct {
	User string `json:"user"`
	Ext  string `json:"ext"`
	jwt.StandardClaims
}

func ParseToken

func ParseToken(jwtSecret string, token string) (*Claims, error)

验证token的函数

Jump to

Keyboard shortcuts

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