package
Version:
v0.0.1
Opens a new window with list of versions in this module.
Published: Oct 9, 2024
License: Apache-2.0
Opens a new window with license information.
Imports: 5
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
func GetExpireTime(ctx iris.Context) time.Time
GetExpireTime 获取token过期时间
GetRemainTime 获取token剩余时间
func JwtMiddleware() iris.Handler
JwtMiddleware Jwt鉴权中间件
type JwtClaims struct {
Uid int64 `json:"uid"`
Username string `json:"username"`
Role string `json:"role"`
}
JwtClaims TODO 自定义claims
func GetJwtClaims(ctx iris.Context) *JwtClaims
GetJwtClaims 获取Jwt中的claims
Source Files
¶
Click to show internal directories.
Click to hide internal directories.