API Reference¶
TODO: Document PyJWS / PyJWT classes
Exceptions¶
-
class
jwt.exceptions.InvalidTokenError¶ Base exception when
decode()fails on a token
-
class
jwt.exceptions.DecodeError¶ Raised when a token cannot be decoded because it failed validation
-
class
jwt.exceptions.InvalidSignatureError¶ Raised when a token’s signature doesn’t match the one provided as part of the token.
-
class
jwt.exceptions.ExpiredSignatureError¶ Raised when a token’s
expclaim indicates that it has expired
-
class
jwt.exceptions.InvalidAudienceError¶ Raised when a token’s
audclaim does not match one of the expected audience values
-
class
jwt.exceptions.InvalidIssuerError¶ Raised when a token’s
issclaim does not match the expected issuer
-
class
jwt.exceptions.InvalidIssuedAtError¶ Raised when a token’s
iatclaim is in the future
-
class
jwt.exceptions.ImmatureSignatureError¶ Raised when a token’s
nbfclaim represents a time in the future
-
class
jwt.exceptions.InvalidKeyError¶ Raised when the specified key is not in the proper format
-
class
jwt.exceptions.InvalidAlgorithmError¶ Raised when the specified algorithm is not recognized by PyJWT
-
class
jwt.exceptions.MissingRequiredClaimError¶ Raised when a claim that is required to be present is not contained in the claimset