middleware

package
v0.0.0-...-f1d9293 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateToken

func CreateToken(ID int64) (string, error)

生成一个token

Types

type MyClaims

type MyClaims struct {
	UserID int64 `json:"userID"`
	jwt.StandardClaims
}

载荷

func CheckToken

func CheckToken(token string) (*MyClaims, error)

验证token,并返回解码信息

Jump to

Keyboard shortcuts

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