Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
TokenValidateFailed = errors.New("token validate failed")
)
Functions ¶
This section is empty.
Types ¶
type Jwt ¶
type Jwt interface { // 解析token ParseToken(token string) (jwt.Claims, error) // 生成token GenerateToken(claims jwt.Claims) (string, error) }
Jwt json web token
type JwtAuth ¶
type JwtAuth struct {
SignKey []byte
}
JwtAuth jwt
func (JwtAuth) GenerateToken ¶ added in v0.8.0
CreateToken 生成token
func (JwtAuth) ParseToken ¶
ParseToken parse token
Click to show internal directories.
Click to hide internal directories.