middleware

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2020 License: GPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AdminAuthSuperUserRequired added in v0.3.0

func AdminAuthSuperUserRequired() gin.HandlerFunc

AdminAuthSuperUserRequired 身份验证 初期先强制使用超级用户才能访问系统

func CasbinAuthRequired added in v0.3.0

func CasbinAuthRequired(enforcer casbin.IEnforcer) gin.HandlerFunc

CasbinAuthRequired 身份验证

func Header() gin.HandlerFunc

Header 头处理

func JWTAuthRequired added in v0.3.0

func JWTAuthRequired(key interface{}, oauth2ClientID string) gin.HandlerFunc

JWTAuthRequired 身份验证 该中间件只适合在本项目中使用,中间件使用public key作为token验证、Redis作为过期token验证 如果其他项目要使用,验证需要通过grpc或者oauth2内省端点验证

func OAuth2AuthDeviceRequired added in v0.5.1

func OAuth2AuthDeviceRequired(ctx *gin.Context)

OAuth2AuthDeviceRequired 设备身份验证

func OAuth2AuthRequired added in v0.3.0

func OAuth2AuthRequired(ctx *gin.Context)

OAuth2AuthRequired 身份验证

func OAuth2AuthScopeRequired added in v0.3.0

func OAuth2AuthScopeRequired(scopes ...string) gin.HandlerFunc

OAuth2AuthScopeRequired 验证scope

func OAuth2AuthUserinfoRequired added in v0.3.0

func OAuth2AuthUserinfoRequired(key interface{}) gin.HandlerFunc

OAuth2AuthUserinfoRequired 身份验证

Types

This section is empty.

Jump to

Keyboard shortcuts

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