Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type CustomClaims ¶
type CustomClaims struct { ValueClaims interface{} jwt.RegisteredClaims }
type JWT ¶
type JWT struct {
SigningKey []byte
}
func (*JWT) CreateClaims ¶
func (j *JWT) CreateClaims(value interface{}, registeredClaims jwt.RegisteredClaims) CustomClaims
func (*JWT) CreateToken ¶
func (j *JWT) CreateToken(claims CustomClaims) (string, error)
CreateToken 创建一个token
func (*JWT) ParseToken ¶
func (j *JWT) ParseToken(tokenString string) (*CustomClaims, error)
ParseToken 解析token
Click to show internal directories.
Click to hide internal directories.