api

package
v0.0.0-...-22bb83e Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2021 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

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

func Authenticator(r *ghttp.Request) (interface{}, error)

@author: [SliverHorn](https://github.com/SliverHorn) @description: 用于验证登录参数。 它必须返回用户数据作为用户标识符,并将其存储在Claim Array中。 检查错误(e),以确定适当的错误消息。

func IdentityHandler

func IdentityHandler(r *ghttp.Request) interface{}

@author: [SliverHorn](https://github.com/SliverHorn) @description: 设置JWT的身份。

func LoginResponse

func LoginResponse(r *ghttp.Request, code int, token string, expire time.Time)

@author: [SliverHorn](https://github.com/SliverHorn) @description: 用于定义自定义的登录成功回调函数

func PayloadFunc

func PayloadFunc(data interface{}) jwt.MapClaims

func RefreshResponse

func RefreshResponse(r *ghttp.Request, code int, token string, expire time.Time)

@author: [SliverHorn](https://github.com/SliverHorn) @description: 用于获取新令牌,无论当前令牌是否过期。

func Unauthorized

func Unauthorized(r *ghttp.Request, code int, message string)

@author: [SliverHorn](https://github.com/SliverHorn) @description: 用于定义自定义的未经授权的回调函数。

Types

This section is empty.

Jump to

Keyboard shortcuts

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