Common¶
Functions¶
-
jwcrypto.common.base64url_encode(payload)¶
-
jwcrypto.common.base64url_decode(payload)¶
-
jwcrypto.common.json_encode(string)¶
-
jwcrypto.common.json_decode(string)¶
Exceptions¶
-
class
jwcrypto.common.JWException¶
-
class
jwcrypto.common.InvalidJWAAlgorithm(message=None)¶ Bases:
jwcrypto.common.JWException
-
class
jwcrypto.common.InvalidCEKeyLength(expected, obtained)¶ Bases:
jwcrypto.common.JWExceptionInvalid CEK Key Length.
This exception is raised when a Content Encryption Key does not match the required length.
-
class
jwcrypto.common.InvalidJWEOperation(message=None, exception=None)¶ Bases:
jwcrypto.common.JWExceptionInvalid JWS Object.
This exception is raised when a requested operation cannot be execute due to unsatisfied conditions.
-
class
jwcrypto.common.InvalidJWEKeyType(expected, obtained)¶ Bases:
jwcrypto.common.JWExceptionInvalid JWE Key Type.
This exception is raised when the provided JWK Key does not match the type required by the specified algorithm.
-
class
jwcrypto.common.InvalidJWEKeyLength(expected, obtained)¶ Bases:
jwcrypto.common.JWExceptionInvalid JWE Key Length.
This exception is raised when the provided JWK Key does not match the length required by the specified algorithm.
-
class
jwcrypto.common.InvalidJWSERegOperation(message=None, exception=None)¶ Bases:
jwcrypto.common.JWExceptionInvalid JWSE Header Registry Operation.
This exception is raised when there is an error in trying to add a JW Signature or Encryption header to the Registry.
-
class
jwcrypto.common.JWKeyNotFound(message=None)¶ Bases:
jwcrypto.common.JWExceptionThe key needed to complete the operation was not found.
This exception is raised when a JWKSet is used to perform some operation and the key required to successfully complete the operation is not found.