middleware

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2025 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type Middleware

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

func NewMiddleware

func NewMiddleware(jwtImpl jwt.JwtInterface, authZImpl casbin.AuthChecker, cacheImpl store.CacheStorer, userStore store.UserStorer) *Middleware

func (*Middleware) Abort

func (m *Middleware) Abort(c *gin.Context, code int, err error)

func (*Middleware) Auth

func (m *Middleware) Auth() gin.HandlerFunc

Auth 是一个基于 JWT 的认证中间件

func (*Middleware) AuthZ

func (m *Middleware) AuthZ() gin.HandlerFunc

func (*Middleware) Session

func (m *Middleware) Session() gin.HandlerFunc

type MiddlewareInterface

type MiddlewareInterface interface {
	Auth() gin.HandlerFunc
	AuthZ() gin.HandlerFunc
	Session() gin.HandlerFunc
}

Jump to

Keyboard shortcuts

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