middleware

package
v0.7.5 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2020 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ClaimsKey = "jwt_claims"
)

Variables

View Source
var (
	TokenNotExist = errors.New("token not exist")
)

Functions

func CORS

func CORS(c *gin.Context)

CORS 跨域中间件

func GetCurrentClaims

func GetCurrentClaims(ctx *gin.Context) interface{}

GetCurrentClaims 获取解析jwt后的信息

func JWT

func JWT(ctx *gin.Context)

JWT gin的jwt中间件

func Recover

func Recover(ctx *gin.Context)

Recover

func RequestLog

func RequestLog(c *gin.Context)

RequestLog gin的请求日志中间件

Types

This section is empty.

Jump to

Keyboard shortcuts

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