Documentation ¶
Index ¶
- Variables
- func Authenticator(r *ghttp.Request) (interface{}, error)
- func IdentityHandler(r *ghttp.Request) interface{}
- func LoginResponse(r *ghttp.Request, code int, token string, expire time.Time)
- func PayloadFunc(data interface{}) jwt.MapClaims
- func RefreshResponse(r *ghttp.Request, code int, token string, expire time.Time)
- func Unauthorized(r *ghttp.Request, code int, message string)
Constants ¶
This section is empty.
Variables ¶
View Source
var Admin = new(admin)
View Source
var Api = new(api)
View Source
var Authority = new(authority)
View Source
var AuthorityMenu = new(authorityMenu)
View Source
var Base = new(base)
View Source
var Casbin = new(casbin)
View Source
var Config = new(_config)
View Source
var Dictionary = new(dictionary)
View Source
var DictionaryDetail = new(detail)
View Source
var Email = new(email)
View Source
var Generate = new(generate)
View Source
var GfJWTMiddleware *jwt.GfJWTMiddleware
View Source
var JwtBlacklist = new(blacklist)
View Source
var Menu = new(menu)
View Source
var OperationRecord = new(operation)
Functions ¶
func Authenticator ¶
@author: [SliverHorn](https://github.com/SliverHorn) @description: 用于验证登录参数。 它必须返回用户数据作为用户标识符,并将其存储在Claim Array中。 检查错误(e),以确定适当的错误消息。
func IdentityHandler ¶
@author: [SliverHorn](https://github.com/SliverHorn) @description: 设置JWT的身份。
func LoginResponse ¶
@author: [SliverHorn](https://github.com/SliverHorn) @description: 用于定义自定义的登录成功回调函数
func PayloadFunc ¶
func PayloadFunc(data interface{}) jwt.MapClaims
func RefreshResponse ¶
@author: [SliverHorn](https://github.com/SliverHorn) @description: 用于获取新令牌,无论当前令牌是否过期。
func Unauthorized ¶
@author: [SliverHorn](https://github.com/SliverHorn) @description: 用于定义自定义的未经授权的回调函数。
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.