middleware

package
v0.0.0-...-6db71ed Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func JWTMiddleWare

func JWTMiddleWare() gin.HandlerFunc

JWTMiddleWare 鉴权中间件,鉴权并设置user_id

func NoAuthToGetUserId

func NoAuthToGetUserId() gin.HandlerFunc

func ReleaseToken

func ReleaseToken(user models.UserLogin) (string, error)

ReleaseToken 颁发token

func SHA1

func SHA1(s string) string

func SHAMiddleWare

func SHAMiddleWare() gin.HandlerFunc

Types

type Claims

type Claims struct {
	UserId int64
	jwt.StandardClaims
}

func ParseToken

func ParseToken(tokenString string) (*Claims, bool)

ParseToken 解析token

Jump to

Keyboard shortcuts

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