middleware

package
v0.0.0-...-28af436 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2023 License: MIT Imports: 8 Imported by: 0

README

中间件(Gin)

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Required

func Required(r user.Role) gin.HandlerFunc

写带参数的 Gin中间件

Types

type TokenAuther

type TokenAuther struct {
	// contains filtered or unexported fields
}

用于鉴权的中间件 用于Token鉴权的中间件

func NewTokenAuther

func NewTokenAuther() *TokenAuther

func (*TokenAuther) Auth

func (a *TokenAuther) Auth(c *gin.Context)

怎么鉴权? Gin中间件 func(*Context)

func (*TokenAuther) Perm

func (a *TokenAuther) Perm(c *gin.Context)

权限鉴定, 鉴权是在用户已经认证的情况之下进行的 判断当前用户的角色

Jump to

Keyboard shortcuts

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