Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Logoff ¶
func Logoff(ctx *webing.RequestContext)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * logoff * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
func Logon ¶
func Logon(ctx *webing.RequestContext, payload *webing.TokenPayload, isPersisted bool)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * logon * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
func TokenAuthenticationMiddleware ¶
func TokenAuthenticationMiddleware(extend TokenExtend) webing.RequestHandler
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * token auth middleware * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Types ¶
type TokenExtend ¶
type TokenExtend struct {
Roles []string //角色(多个之间用逗号分隔)
Cookie webing.Cookie //Cookie
AuthorizeUrl string //认证url
DefaultUrl string //认证通过默认返回url
PassUrls []string //直接通过的url
EncryptSecret string //加密秘匙
IsCookie bool //是否Cookie模式(0:header | 1: cookie)
IsSliding bool //是否滑动失效期
IsPersisted bool //是否持久Cookie
IsDisabled bool //是否禁用验证
}
================================================================================ * Token Auth * author: 美丽的地球啊 - mliu * ================================================================================