jwt

package
v0.0.0-...-a3cb3ec Latest Latest
Warning

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

Go to latest
Published: May 22, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

func Create(claims Claims) (string, error)

Create 生成token

Types

type Claims

type Claims struct {
	UID        string `json:"uid"`
	UserName   string `json:"userName"`
	Phone      string `json:"phone"`
	RoleID     string `json:"roleId"`
	RoleName   string `json:"roleName"`
	State      int32  `json:"state"`
	BufferTime int32  `json:"bufferTime"`
	jwt.StandardClaims
}

func Parse

func Parse(tokenString string) (*Claims, error)

Parse 解析token

Jump to

Keyboard shortcuts

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