component

package
v0.0.0-...-d140a6e Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetUserId

func GetUserId(context *gin.Context) int

GetUserId 获取用户标识 /**

func MakeToken

func MakeToken(uid int) (string, error)

MakeToken */

Types

type Claims

type Claims struct {
	UserId int `json:"user_id"`
	jwt.StandardClaims
}

func ParseToken

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

ParseToken 验证token的函数

Jump to

Keyboard shortcuts

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