Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrTokenInvalid = errors.New("couldn't handle this token")
Functions ¶
func GetBearerToken ¶ added in v0.2.0
GetBearerToken Get bearer token from request header.
Types ¶
type Client ¶ added in v0.4.0
type CustomClaims ¶
type CustomClaims struct { Info any `json:"info"` jwt.RegisteredClaims }
func ParseRequest ¶
func ParseRequest(req *http.Request) (*CustomClaims, error)
ParseRequest Parse token from request header.
func ParseToken ¶ added in v0.3.4
func ParseToken(req *http.Request, token string) (*CustomClaims, error)
ParseToken Parse given token.
Click to show internal directories.
Click to hide internal directories.