Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
Types ¶
type CustomClaims ¶
type CustomClaims struct { UUID uuid.UUID ID uint NickName string AuthorityID string jwt.StandardClaims }
CustomClaims ...
type JWT ¶
type JWT struct {
SigningKey []byte
}
JWT ...
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 ...
Click to show internal directories.
Click to hide internal directories.