Documentation ¶
Index ¶
- Constants
- Variables
- func ClaimAsInt64(t *jwt.Token, claim string) (int64, bool)
- func ClaimAsString(t *jwt.Token, claim string) (string, bool)
- func ClaimAsStrings(t *jwt.Token, claim string) ([]string, bool)
- func Marshal(ti *processor.TokenInfo, w io.Writer) error
- func New(kl keyloader.KeyLoader, crp *revoke.CachingRevokeProvider) tokeninfo.Handler
- func NewTokenInfo(t *jwt.Token, timeBase time.Time) (*processor.TokenInfo, error)
Constants ¶
View Source
const ( JwtClaimScope = "scope" JwtClaimSub = "sub" JwtClaimRealm = "realm" JwtClaimAzp = "azp" JwtClaimExp = "exp" JwtClaimIssuer = "iss" )
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") // ErrInvalidClaimRealm should be used whenever the scope realm is invalid or missing in the JWT ErrInvalidClaimRealm = errors.New("Invalid claim: realm") // ErrInvalidClaimSub should be used whenever the claim sub is invalid or missing in the JWT ErrInvalidClaimSub = errors.New("Invalid claim: sub") // ErrInvalidClaimAzp should be used whenever the claim azp is invalid or missing in the JWT ErrInvalidClaimAzp = errors.New("Invalid claim: azp") // ErrInvalidClaimExp should be used whenever the claim exp is invalid or missing in the JWT ErrInvalidClaimExp = errors.New("Invalid claim: exp") )
Functions ¶
func ClaimAsInt64 ¶
func ClaimAsString ¶
func ClaimAsStrings ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.