Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type CustomClaims ¶
type CustomClaims struct { ID string jwt.StandardClaims }
type JWT ¶
type JWT struct {
SignKey []byte
}
func (*JWT) CreateToken ¶
func (j *JWT) CreateToken(claims CustomClaims) (string, error)
CreateToken create a token
func (*JWT) ParseToken ¶
func (j *JWT) ParseToken(tokenString string) (*CustomClaims, error)
ParseToken parse token
Click to show internal directories.
Click to hide internal directories.