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 { // Parse token ParseToken(token string) (jwt.Claims, error) // Create token CreateToken(claimsCreator func() jwt.Claims) (string, error) }
Jwt json web token
type JwtAuth ¶
type JwtAuth struct {
SignKey []byte
}
JwtAuth jwt
func (JwtAuth) CreateToken ¶
CreateToken create token
func (JwtAuth) ParseToken ¶
ParseToken parse token
Click to show internal directories.
Click to hide internal directories.