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