Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
//KeyTokenClaim token写入gin.context的名称
KeyTokenClaim = "token-claims"
)
Functions ¶
func EncryToken ¶
func EncryToken(user TokenUserInput, secretKey string) (r string, err error)
EncryToken 创建jwt-token
func Middleware ¶
func Middleware(tokenName string, secretKey string) gin.HandlerFunc
Middleware token校验中间件
Types ¶
Click to show internal directories.
Click to hide internal directories.