Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrMissingHeader = errors.New("the length of the `Authorization` header is zero") ErrTokenInvalid = errors.New("couldn't handle this token") )
Functions ¶
Types ¶
type CustomClaims ¶
type CustomClaims struct { Info interface{} `json:"info"` jwt.RegisteredClaims }
func Parse ¶
func Parse(tokenString string, key string) (*CustomClaims, error)
Parse token by secret key.
func ParseRequest ¶
func ParseRequest(c *gin.Context) (*CustomClaims, error)
ParseRequest Parse token from request header.
Click to show internal directories.
Click to hide internal directories.