Documentation ¶
Overview ¶
Package jwt provides functionality for JWT authentication
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidToken = errors.New(`invalid token`)
Functions ¶
This section is empty.
Types ¶
type Authorizer ¶
Authorizer structure for verifying the user and issuing the authorization token
type Claims ¶
type Claims struct { jwt.RegisteredClaims Username string `json:"username"` }
Claims used for working with golang-jwt to sign the token and verify it
type DefaultParser ¶
type DefaultParser struct{}
DefaultParser default parser for jwt tokens
func (*DefaultParser) ParseToken ¶
func (p *DefaultParser) ParseToken(accessToken string, signingKey []byte) (string, error)
ParseToken - checks if the token is valid, if yes returns the login of this user
Click to show internal directories.
Click to hide internal directories.