jwt

package
v2.1.0 Latest Latest
Warning

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

Go to latest
Published: May 8, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeToken

func MakeToken(key []byte, userID uint32, ExpiresNum int64) (string, error)

MakeToken 创建token

Types

type MapClaims

type MapClaims struct {
	UserID uint32 `json:"user_id"`
	goJwt.RegisteredClaims
}

func ParseToken

func ParseToken(key []byte, tokenStr string) (*MapClaims, error)

ParseToken 解析token

func (MapClaims) Validate

func (m MapClaims) Validate() error

Jump to

Keyboard shortcuts

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