Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidJWT = errors.New("Invalid JWT token.") ErrRevokedToken = errors.New("Token is revoked.") )
View Source
var ( // ErrMissingKeyID should be used when the kid attribute is missing in the JWT header ErrMissingKeyID = errors.New("Missing key Id in the JWT header") // ErrInvalidKeyID should be used when the content of the kid attribute is invalid ErrInvalidKeyID = errors.New("Invalid key Id in the JWT header") )
View Source
var ( // ErrInvalidClaimScope should be used whenever the scope claim is invalid or missing in the JWT ErrInvalidClaimScope = errors.New("Invalid claim: scope") // ErrInvalidClaimSub should be used whenever the scope sub is invalid or missing in the JWT ErrInvalidClaimSub = errors.New("Invalid claim: sub") // ErrInvalidClaimRealm should be used whenever the scope realm is invalid or missing in the JWT ErrInvalidClaimRealm = errors.New("Invalid claim: realm") ErrInvalidClaimAzp = errors.New("Invalid claim: azp") // ErrInvalidClaimExp should be used whenever the scope exp is invalid or missing in the JWT ErrInvalidClaimExp = errors.New("Invalid claim: exp") )
Functions ¶
Types ¶
type TokenInfo ¶
type TokenInfo struct { AccessToken string `json:"access_token"` RefreshToken string `json:"refresh_token,omitempty"` UID string `json:"uid"` GrantType string `json:"grant_type"` Scope []string `json:"scope"` Realm string `json:"realm"` ClientId string `json:"client_id"` TokenType string `json:"token_type"` ExpiresIn int `json:"expires_in"` }
TokenInfo type is used to serialize a JWT validation result in a standard Token Info JSON format
Click to show internal directories.
Click to hide internal directories.