Documentation ¶
Index ¶
- func AdminAuthSuperUserRequired() gin.HandlerFunc
- func CasbinAuthRequired(enforcer casbin.IEnforcer) gin.HandlerFunc
- func Header() gin.HandlerFunc
- func JWTAuthRequired(key interface{}, oauth2ClientID string) gin.HandlerFunc
- func OAuth2AuthDeviceRequired(ctx *gin.Context)
- func OAuth2AuthRequired(ctx *gin.Context)
- func OAuth2AuthScopeRequired(scopes ...string) gin.HandlerFunc
- func OAuth2AuthUserinfoRequired(key interface{}) gin.HandlerFunc
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 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
OAuth2AuthDeviceRequired 设备身份验证
func OAuth2AuthRequired ¶ added in v0.3.0
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.
Click to show internal directories.
Click to hide internal directories.