token

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Logoff

func Logoff(ctx *gin.Context)

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * logoff * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func Logon

func Logon(ctx *gin.Context, payload *ging.TokenPayload)

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * logon * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

func TokenAuthenticationMiddleware

func TokenAuthenticationMiddleware(extend TokenExtend) gin.HandlerFunc

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * token auth middleware * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Types

type TokenExtend

type TokenExtend struct {
	Roles         []string    //角色(多个之间用逗号分隔)
	Cookie        ging.Cookie //Cookie
	AuthorizeUrl  string      //认证url
	DefaultUrl    string      //认证通过默认返回url
	PassUrls      []string    //直接通过的url
	EncryptSecret string      //加密秘匙
	IsCookie      bool        //是否Cookie模式(0:header | 1: cookie)
	IsSliding     bool        //是否滑动失效期
	IsDisabled    bool        //是否禁用验证
}

================================================================================ * Token Auth * qq group: 582452342 * email : 2091938785@qq.com * author : 美丽的地球啊 - mliu * ================================================================================

Jump to

Keyboard shortcuts

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