Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrToken = errors.Unauthorized(reason, "JWT token error") ErrMissingJwtToken = errors.Unauthorized(reason, "JWT token is missing") ErrExpiredOrNotValid = errors.Unauthorized(reason, "JWT token expire or not valid") )
Functions ¶
This section is empty.
Types ¶
type TokenGen ¶
type TokenGen struct {
// contains filtered or unexported fields
}
TokenGen 生成
func NewJwtTokenGen ¶
type TokenValidator ¶
type TokenValidator struct {
// contains filtered or unexported fields
}
TokenValidator token 校验
func NewTokenValidator ¶
func NewTokenValidator(signKey []byte) *TokenValidator
Click to show internal directories.
Click to hide internal directories.