Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Claims ¶
type Claims struct { jwt.StandardClaims UserID string `json:"user-id"` Permissions []string `json:"permissions"` }
Claims are the information that is stored inside a token. If the token was verified correctly, these claims represent the truth.
func GetClaimsFromVerifiedJwt ¶
GetClaimsFromVerifiedJwt will return the claims if the token is valid. If the token is invalid, nil is returned along with an error.
type UnauthorizedError ¶ added in v0.0.3
type UnauthorizedError struct {
}UnauthorizedError is used when the token is invalid, or there was some other error while parsing the claim.
func (UnauthorizedError) Error ¶ added in v0.0.3
func (ue UnauthorizedError) Error() string
Click to show internal directories.
Click to hide internal directories.