Documentation ¶
Index ¶
- Constants
- Variables
- func CheckLoin(strToken string) error
- type JWTAuth
- func (JWTAuth) CreateClaims(data interface{}) (claims *JWTClaims)
- func (j *JWTAuth) CreateToken(data interface{}) (token string, err error)
- func (JWTAuth) GetToken(claims *JWTClaims) (signedToken string, err error)
- func (JWTAuth) Parse(strToken string) (claims *JWTClaims, err error)
- func (j *JWTAuth) Refresh(token string) (newToken string, err error)
- type JWTClaims
- type UserInfo
Constants ¶
View Source
const ( ErrorreasonServerbusy = "服务器繁忙" ErrorreasonLoginOutTime = "登录过期,请重新登录" )
Variables ¶
View Source
var ( Secret string // 加盐 ExpireTime int // token有效期 Issuer string Subject string )
Functions ¶
Types ¶
type JWTAuth ¶
type JWTAuth struct { }
func (JWTAuth) CreateClaims ¶
func (*JWTAuth) CreateToken ¶
Click to show internal directories.
Click to hide internal directories.