middleware

package
v0.1.37 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2026 License: AGPL-3.0 Imports: 16 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthAdmin

func AuthAdmin(c *gin.Context)

func AuthCtx

func AuthCtx(appInstance app.Application) func(*gin.Context)

func JWTAuth

func JWTAuth(appInstance app.Application) func(c *gin.Context)

JWTMAuth check if authed and set uid to context

func PushTokenStr

func PushTokenStr(c *gin.Context, appInstance app.Application, tokenStr string)

PushTokenStr 推送token到客户端

func RBAC added in v0.1.12

func RBAC(appInstance app.Application) func(*gin.Context)

func SetToken

func SetToken(c *gin.Context, appInstance app.Application, userID int, payload jwt.MapClaims) (string, error)

SetToken 设置新token并写入ctx

Types

This section is empty.

Jump to

Keyboard shortcuts

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