midware

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	JwtCookieKey = "VegeJwtToken"
	JwtCtxErrKey = "VegeJwtCtxErr"
	JwtCtxMcKey  = "VegeJwtCtxMc"
)

Variables

This section is empty.

Functions

func GetMcFromCtx

func GetMcFromCtx(ctx *gin.Context) (mc *jwtApi.MyClaims, err error)

GetMcFromCtx 从上下文取得 mc obj

func JWTAuthMiddleware

func JWTAuthMiddleware() gin.HandlerFunc

JWTAuthMiddleware 基于JWT认证中间件

func SetJwtObj

func SetJwtObj(obj *jwtApi.JwtCfg)

SetJwtObj 只允许调用一次

Types

This section is empty.

Jump to

Keyboard shortcuts

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