API Reference¶
A Python implementation of CWT/COSE <https://python-cwt.readthedocs.io>
- cwt.encode(claims: Union[cwt.claims.Claims, Dict[str, Any], Dict[int, Any], bytes, str], key: cwt.cose_key_interface.COSEKeyInterface, nonce: bytes = b'', tagged: bool = False, recipients: Optional[List[cwt.recipient_interface.RecipientInterface]] = None) → bytes¶
Encodes CWT with MAC, signing or encryption. This is a wrapper function of the following functions for easy use:
Therefore, it must be clear whether the use of the specified key is for MAC, signing, or encryption. For this purpose, the key must have the
key_ops
parameter set to identify the usage.- Parameters
claims (Union[Claims, Dict[str, Any], Dict[int, Any], bytes, str]) – A CWT claims object, or a JWT claims object, text string or byte string.
key (COSEKeyInterface) – A COSE key used to generate a MAC for the claims.
recipients (List[RecipientInterface]) – A list of recipient information structures.
tagged (bool) – An indicator whether the response is wrapped by CWT tag(61) or not.
- Returns
A byte string of the encoded CWT.
- Return type
bytes
- Raises
ValueError – Invalid arguments.
EncodeError – Failed to encode the claims.
- cwt.encode_and_mac(claims: Union[cwt.claims.Claims, Dict[int, Any], bytes], key: cwt.cose_key_interface.COSEKeyInterface, tagged: bool = False, recipients: Optional[List[cwt.recipient_interface.RecipientInterface]] = None) → bytes¶
Encodes with MAC.
- Parameters
claims (Union[Claims, Dict[int, Any], bytes]) – A CWT claims object or byte string.
key (COSEKeyInterface) – A COSE key used to generate a MAC for the claims.
recipients (List[RecipientInterface]) – A list of recipient information structures.
tagged (bool) – An indicator whether the response is wrapped by CWT tag(61) or not.
- Returns
A byte string of the encoded CWT.
- Return type
bytes
- Raises
ValueError – Invalid arguments.
EncodeError – Failed to encode the claims.
- cwt.encode_and_sign(claims: Union[cwt.claims.Claims, Dict[int, Any], bytes], key: Union[cwt.cose_key_interface.COSEKeyInterface, List[cwt.cose_key_interface.COSEKeyInterface]], tagged: bool = False) → bytes¶
Encodes CWT with signing.
- Parameters
claims (Claims, Union[Dict[int, Any], bytes]) – A CWT claims object or byte string.
key (Union[COSEKeyInterface, List[COSEKeyInterface]]) – A COSE key or a list of the keys used to sign claims.
tagged (bool) – An indicator whether the response is wrapped by CWT tag(61) or not.
- Returns
A byte string of the encoded CWT.
- Return type
bytes
- Raises
ValueError – Invalid arguments.
EncodeError – Failed to encode the claims.
- cwt.encode_and_encrypt(claims: Union[cwt.claims.Claims, Dict[int, Any], bytes], key: cwt.cose_key_interface.COSEKeyInterface, nonce: bytes = b'', tagged: bool = False, recipients: Optional[List[cwt.recipient_interface.RecipientInterface]] = None) → bytes¶
Encodes CWT with encryption.
- Parameters
claims (Claims, Union[Dict[int, Any], bytes]) – A CWT claims object or byte string.
key (COSEKeyInterface) – A COSE key used to encrypt the claims.
nonce (bytes) – A nonce for encryption.
recipients (List[RecipientInterface]) – A list of recipient information structures.
tagged (bool) – An indicator whether the response is wrapped by CWT tag(61) or not.
- Returns
A byte string of the encoded CWT.
- Return type
bytes
- Raises
ValueError – Invalid arguments.
EncodeError – Failed to encode the claims.
- cwt.decode(data: bytes, key: Union[cwt.cose_key_interface.COSEKeyInterface, List[cwt.cose_key_interface.COSEKeyInterface]], no_verify: bool = False) → Union[Dict[int, Any], bytes]¶
Verifies and decodes CWT.
- Parameters
data (bytes) – A byte string of an encoded CWT.
key (Union[COSEKeyInterface, List[COSEKeyInterface]]) – A COSE key or a list of the keys used to verify and decrypt the encoded CWT.
no_verify (bool) – An indicator whether token verification is skiped or not.
- Returns
A byte string of the decoded CWT.
- Return type
Union[Dict[int, Any], bytes]
- Raises
ValueError – Invalid arguments.
DecodeError – Failed to decode the CWT.
VerifyError – Failed to verify the CWT.
- cwt.set_private_claim_names(claim_names: Dict[str, int])¶
Sets private claim definitions. The definitions will be used in
encode
when it is called with JSON-based claims.- Parameters
claims (Dict[str, int]) – A set of private claim definitions which consist of a readable claim name(str) and a claim key(int). The claim key should be less than -65536 but you can use the numbers other than pre-registered numbers listed in IANA Registry.
- Raises
ValueError – Invalid arguments.
- class cwt.CWT(options: Optional[Dict[str, Any]] = None)[source]¶
Bases:
cwt.cbor_processor.CBORProcessor
A CWT (CBOR Web Token) Implementaion, which is built on top of
COSE
cwt.cwt
is a global object of this class initialized with default settings.- CBOR_TAG = 61¶
- __init__(options: Optional[Dict[str, Any]] = None)[source]¶
Constructor.
- Parameters
options (Optional[Dict[str, Any]]) – Options for the initial configuration of CWT. At this time,
expires_in
(default value:3600
) andleaway
(default value:60
) are only supported. See alsoexpires_in
,leeway
.
Examples
>>> from cwt import CWT, claims, cose_key >>> ctx = CWT({"expires_in": 3600*24, "leeway": 10}) >>> key = cose_key.from_symmetric_key(alg="HS255") >>> token = ctx.encode( ... {"iss": "coaps://as.example", "sub": "dajiaji", "cti": "123"}, ... key, ... )
- property expires_in: int¶
The default lifetime in seconds of CWT. If exp is not found in claims, this value will be used with current time.
- property leeway: int¶
The default leeway in seconds for validating
exp
andnbf
.
- encode(claims: Union[cwt.claims.Claims, Dict[str, Any], Dict[int, Any], bytes, str], key: cwt.cose_key_interface.COSEKeyInterface, nonce: bytes = b'', tagged: bool = False, recipients: Optional[List[cwt.recipient_interface.RecipientInterface]] = None) → bytes[source]¶
Encodes CWT with MAC, signing or encryption. This is a wrapper function of the following functions for easy use:
Therefore, it must be clear whether the use of the specified key is for MAC, signing, or encryption. For this purpose, the key must have the
key_ops
parameter set to identify the usage.- Parameters
claims (Union[Claims, Dict[str, Any], Dict[int, Any], bytes, str]) – A CWT claims object, or a JWT claims object, text string or byte string.
key (COSEKeyInterface) – A COSE key used to generate a MAC for the claims.
recipients (List[RecipientInterface]) – A list of recipient information structures.
tagged (bool) – An indicator whether the response is wrapped by CWT tag(61) or not.
- Returns
A byte string of the encoded CWT.
- Return type
bytes
- Raises
ValueError – Invalid arguments.
EncodeError – Failed to encode the claims.
- encode_and_mac(claims: Union[cwt.claims.Claims, Dict[int, Any], bytes], key: cwt.cose_key_interface.COSEKeyInterface, tagged: bool = False, recipients: Optional[List[cwt.recipient_interface.RecipientInterface]] = None) → bytes[source]¶
Encodes with MAC.
- Parameters
claims (Union[Claims, Dict[int, Any], bytes]) – A CWT claims object or byte string.
key (COSEKeyInterface) – A COSE key used to generate a MAC for the claims.
recipients (List[RecipientInterface]) – A list of recipient information structures.
tagged (bool) – An indicator whether the response is wrapped by CWT tag(61) or not.
- Returns
A byte string of the encoded CWT.
- Return type
bytes
- Raises
ValueError – Invalid arguments.
EncodeError – Failed to encode the claims.
- encode_and_sign(claims: Union[cwt.claims.Claims, Dict[int, Any], bytes], key: Union[cwt.cose_key_interface.COSEKeyInterface, List[cwt.cose_key_interface.COSEKeyInterface]], tagged: bool = False) → bytes[source]¶
Encodes CWT with signing.
- Parameters
claims (Claims, Union[Dict[int, Any], bytes]) – A CWT claims object or byte string.
key (Union[COSEKeyInterface, List[COSEKeyInterface]]) – A COSE key or a list of the keys used to sign claims.
tagged (bool) – An indicator whether the response is wrapped by CWT tag(61) or not.
- Returns
A byte string of the encoded CWT.
- Return type
bytes
- Raises
ValueError – Invalid arguments.
EncodeError – Failed to encode the claims.
- encode_and_encrypt(claims: Union[cwt.claims.Claims, Dict[int, Any], bytes], key: cwt.cose_key_interface.COSEKeyInterface, nonce: bytes = b'', tagged: bool = False, recipients: Optional[List[cwt.recipient_interface.RecipientInterface]] = None) → bytes[source]¶
Encodes CWT with encryption.
- Parameters
claims (Claims, Union[Dict[int, Any], bytes]) – A CWT claims object or byte string.
key (COSEKeyInterface) – A COSE key used to encrypt the claims.
nonce (bytes) – A nonce for encryption.
recipients (List[RecipientInterface]) – A list of recipient information structures.
tagged (bool) – An indicator whether the response is wrapped by CWT tag(61) or not.
- Returns
A byte string of the encoded CWT.
- Return type
bytes
- Raises
ValueError – Invalid arguments.
EncodeError – Failed to encode the claims.
- decode(data: bytes, key: Union[cwt.cose_key_interface.COSEKeyInterface, List[cwt.cose_key_interface.COSEKeyInterface]], no_verify: bool = False) → Union[Dict[int, Any], bytes][source]¶
Verifies and decodes CWT.
- Parameters
data (bytes) – A byte string of an encoded CWT.
key (Union[COSEKeyInterface, List[COSEKeyInterface]]) – A COSE key or a list of the keys used to verify and decrypt the encoded CWT.
no_verify (bool) – An indicator whether token verification is skiped or not.
- Returns
A byte string of the decoded CWT.
- Return type
Union[Dict[int, Any], bytes]
- Raises
ValueError – Invalid arguments.
DecodeError – Failed to decode the CWT.
VerifyError – Failed to verify the CWT.
- set_private_claim_names(claim_names: Dict[str, int])[source]¶
Sets private claim definitions. The definitions will be used in
encode
when it is called with JSON-based claims.- Parameters
claims (Dict[str, int]) –
A set of private claim definitions which consist of a readable claim name(str) and a claim key(int). The claim key should be less than -65536 but you can use the numbers other than pre-registered numbers listed in IANA Registry.
- Raises
ValueError – Invalid arguments.
- class cwt.COSE(options: Optional[Dict[str, Any]] = None)[source]¶
Bases:
cwt.cbor_processor.CBORProcessor
A COSE (CBOR Object Signing and Encryption) Implementaion built on top of cbor2.
cwt.cose_key
is a global object of this class initialized with default settings.- __init__(options: Optional[Dict[str, Any]] = None)[source]¶
Constructor.
- Parameters
options (Optional[Dict[str, Any]]) – Options for the initial configuration of COSE. At this time,
kid_auto_inclusion
(default value:True
) andalg_auto_inclusion
(default value:True
) are supported.
- encode_and_mac(payload: bytes, key: cwt.cose_key_interface.COSEKeyInterface, protected: Optional[Union[Dict[int, Any], bytes]] = None, unprotected: Optional[Dict[int, Any]] = None, recipients: Optional[List[cwt.recipient_interface.RecipientInterface]] = None, external_aad: bytes = b'', out: str = '') → Union[bytes, _cbor2.CBORTag][source]¶
Encodes data with MAC.
- Parameters
payload (bytes) – A content to be MACed.
key (COSEKeyInterface) – A COSE key as a MAC Authentication key.
protected (Union[Dict[int, Any], bytes]) – Parameters that are to be cryptographically protected.
unprotected (Dict[int, Any]) – Parameters that are not cryptographically protected.
recipients (Optional[List[RecipientInterface]]) – A list of recipient information structures.
external_aad (bytes) – External additional authenticated data supplied by application.
out (str) –
An output format. Only
"cbor2/CBORTag"
can be used. If"cbor2/CBORTag"
is specified. This function will return encoded data as cbor2’sCBORTag
object. If any other value is specified, it will return encoded data as bytes.
- Returns
A byte string of the encoded COSE or a cbor2.CBORTag object.
- Return type
Union[bytes, CBORTag]
- Raises
ValueError – Invalid arguments.
EncodeError – Failed to encode data.
- encode_and_sign(payload: bytes, key: Union[cwt.cose_key_interface.COSEKeyInterface, List[cwt.cose_key_interface.COSEKeyInterface]], protected: Optional[Union[Dict[int, Any], bytes]] = None, unprotected: Optional[Dict[int, Any]] = None, external_aad: bytes = b'', out: str = '') → Union[bytes, _cbor2.CBORTag][source]¶
Encodes data with signing.
- Parameters
payload (bytes) – A content to be signed.
key (Union[COSEKeyInterface, List[COSEKeyInterface]]) – One or more COSE keys as signing keys.
protected (Union[Dict[int, Any], bytes]) – Parameters that are to be cryptographically protected.
unprotected (Dict[int, Any]) – Parameters that are not cryptographically protected.
external_aad (bytes) – External additional authenticated data supplied by application.
out (str) –
An output format. Only
"cbor2/CBORTag"
can be used. If"cbor2/CBORTag"
is specified. This function will return encoded data as cbor2’sCBORTag
object. If any other value is specified, it will return encoded data as bytes.
- Returns
A byte string of the encoded COSE or a cbor2.CBORTag object.
- Return type
Union[bytes, CBORTag]
- Raises
ValueError – Invalid arguments.
EncodeError – Failed to encode data.
- encode_and_encrypt(payload: bytes, key: cwt.cose_key_interface.COSEKeyInterface, protected: Optional[Union[Dict[int, Any], bytes]] = None, unprotected: Optional[Dict[int, Any]] = None, nonce: bytes = b'', recipients: Optional[List[cwt.recipient_interface.RecipientInterface]] = None, external_aad: bytes = b'', out: str = '') → bytes[source]¶
Encodes data with encryption.
- Parameters
payload (bytes) – A content to be encrypted.
key (COSEKeyInterface) – A COSE key as an encryption key.
protected (Union[Dict[int, Any], bytes]) – Parameters that are to be cryptographically protected.
unprotected (Dict[int, Any]) – Parameters that are not cryptographically protected.
nonce (bytes) – A nonce for encryption.
recipients (Optional[List[RecipientInterface]]) – A list of recipient information structures.
external_aad (bytes) – External additional authenticated data supplied by application.
out (str) –
An output format. Only
"cbor2/CBORTag"
can be used. If"cbor2/CBORTag"
is specified. This function will return encoded data as cbor2’sCBORTag
object. If any other value is specified, it will return encoded data as bytes.
- Returns
A byte string of the encoded COSE or a cbor2.CBORTag object.
- Return type
Union[bytes, CBORTag]
- Raises
ValueError – Invalid arguments.
EncodeError – Failed to encode data.
- decode(data: Union[bytes, _cbor2.CBORTag], key: Optional[Union[cwt.cose_key_interface.COSEKeyInterface, List[cwt.cose_key_interface.COSEKeyInterface]]] = None, materials: Optional[List[dict]] = None, external_aad: bytes = b'') → bytes[source]¶
Verifies and decodes COSE data.
- Parameters
data (Union[bytes, CBORTag]) – A byte string or cbor2.CBORTag of an encoded data.
key (Optional[Union[COSEKeyInterface, List[COSEKeyInterface]]]) – A COSE key to verify and decrypt the encoded data.
materials (Optional[List[dict]]) – A list of key materials to be used to derive an encryption key.
external_aad (bytes) – External additional authenticated data supplied by application.
- Returns
A byte string of decoded payload.
- Return type
bytes
- Raises
ValueError – Invalid arguments.
DecodeError – Failed to decode data.
VerifyError – Failed to verify data.
- class cwt.COSEKey[source]¶
Bases:
object
A
COSEKeyInterface
Builder.- static from_dict(cose_key: Dict[int, Any]) → cwt.cose_key_interface.COSEKeyInterface[source]¶
Create a COSE key from a CBOR-like dictionary with numeric keys.
- Parameters
cose_key (Dict[int, Any]) – A CBOR-like dictionary with numeric keys of a COSE key.
- Returns
A COSE key object.
- Return type
COSEKeyInterface
- Raises
ValueError – Invalid arguments.
- classmethod from_symmetric_key(key: Union[bytes, str] = b'', alg: Union[int, str] = 'HMAC 256/256', kid: Union[bytes, str] = b'', key_ops: Optional[Union[List[int], List[str]]] = None) → cwt.cose_key_interface.COSEKeyInterface[source]¶
Create a COSE key from a symmetric key.
- Parameters
key (Union[bytes, str]) – A key bytes or string.
alg (Union[int, str]) – An algorithm label(int) or name(str). Supported
alg
are listed in Supported COSE Algorithms.kid (Union[bytes, str]) – A key identifier.
key_ops (Union[List[int], List[str]]) – A list of key operation values. Following values can be used:
1("sign")
,2("verify")
,3("encrypt")
,4("decrypt")
,5("wrap key")
,6("unwrap key")
,7("derive key")
,8("derive bits")
,9("MAC create")
,10("MAC verify")
- Returns
A COSE key object.
- Return type
COSEKeyInterface
- Raises
ValueError – Invalid arguments.
- classmethod from_bytes(key_data: bytes) → cwt.cose_key_interface.COSEKeyInterface[source]¶
Create a COSE key from CBOR-formatted key data.
- Parameters
key_data (bytes) – CBOR-formatted key data.
- Returns
A COSE key object.
- Return type
COSEKeyInterface
- Raises
ValueError – Invalid arguments.
DecodeError – Failed to decode the key data.
- classmethod from_jwk(data: Union[str, bytes, Dict[str, Any]]) → cwt.cose_key_interface.COSEKeyInterface[source]¶
Create a COSE key from JWK (JSON Web Key).
- Parameters
jwk (Union[str, bytes, Dict[str, Any]]) – JWK-formatted key data.
- Returns
A COSE key object.
- Return type
COSEKeyInterface
- Raises
ValueError – Invalid arguments.
DecodeError – Failed to decode the key data.
- classmethod from_pem(key_data: Union[str, bytes], alg: Union[int, str] = '', kid: Union[bytes, str] = b'', key_ops: Optional[Union[List[int], List[str]]] = None) → cwt.cose_key_interface.COSEKeyInterface[source]¶
Create a COSE key from PEM-formatted key data.
- Parameters
key_data (bytes) – A PEM-formatted key data.
alg (Union[int, str]) – An algorithm label(int) or name(str). Different from ::func::cwt.COSEKey.from_symmetric_key, it is only used when an algorithm cannot be specified by the PEM data, such as RSA family algorithms.
kid (Union[bytes, str]) – A key identifier.
key_ops (Union[List[int], List[str]]) – A list of key operation values. Following values can be used:
1("sign")
,2("verify")
,3("encrypt")
,4("decrypt")
,5("wrap key")
,6("unwrap key")
,7("derive key")
,8("derive bits")
,9("MAC create")
,10("MAC verify")
- Returns
A COSE key object.
- Return type
COSEKeyInterface
- Raises
ValueError – Invalid arguments.
DecodeError – Failed to decode the key data.
- class cwt.EncryptedCOSEKey[source]¶
Bases:
cwt.cbor_processor.CBORProcessor
An encrypted COSE key.
- static from_cose_key(key: cwt.cose_key_interface.COSEKeyInterface, encryption_key: cwt.cose_key_interface.COSEKeyInterface, nonce: bytes = b'', tagged: bool = False) → Union[List[Any], bytes][source]¶
Returns an encrypted COSE key formatted to COSE_Encrypt0 structure.
- Parameters
key – COSEKeyInterface: A key to be encrypted.
encryption_key – COSEKeyInterface: An encryption key to encrypt the target COSE key.
nonce (bytes) – A nonce for encryption.
- Returns
A COSE_Encrypt0 structure of the target COSE key.
- Return type
List[Any]
- Raises
ValueError – Invalid arguments.
EncodeError – Failed to encrypt the COSE key.
- static to_cose_key(key: List[Any], encryption_key: cwt.cose_key_interface.COSEKeyInterface) → cwt.cose_key_interface.COSEKeyInterface[source]¶
Returns an decrypted COSE key.
- Parameters
key – COSEKeyInterface: A key formatted to COSE_Encrypt0 structure to be decrypted.
encryption_key – COSEKeyInterface: An encryption key to decrypt the target COSE key.
- Returns
A key decrypted.
- Return type
COSEKeyInterface
- Raises
ValueError – Invalid arguments.
DecodeError – Failed to decode the COSE key.
VerifyError – Failed to verify the COSE key.
- class cwt.Claims(claims: Dict[int, Any], claim_names: Dict[str, int] = {'EAT-FDO': - 257, 'EATMAROEPrefix': - 258, 'EUPHNonce': - 259, 'aud': 3, 'cnf': 8, 'cti': 7, 'dbgstat': 16, 'eat_profile': 18, 'exp': 4, 'hcert': - 260, 'iat': 6, 'iss': 1, 'location': 17, 'nbf': 5, 'nonce': 10, 'oemid': 13, 'secboot': 15, 'seclevel': 14, 'sub': 2, 'submods': 20, 'ueid': 11})[source]¶
Bases:
object
A class for handling CWT Claims like JWT claims.
- classmethod from_dict(claims: Dict[int, Any], private_claim_names: Dict[str, int] = {}) → Any[source]¶
Create a Claims object from a CBOR-like(Dict[int, Any]) claim object.
- Parameters
claims (Dict[str, Any]) – A CBOR-like(Dict[int, Any]) claim object.
private_claim_names (Dict[str, int]) –
A set of private claim definitions which consist of a readable claim name(str) and a claim key(int). The claim key should be less than -65536 but you can use the numbers other than pre-registered numbers listed in IANA Registry.
- Returns
A CWT claims object.
- Return type
- Raises
ValueError – Invalid arguments.
- classmethod from_json(claims: Union[str, bytes, Dict[str, Any]], private_claim_names: Dict[str, int] = {}) → cwt.claims.T[source]¶
Converts a JWT claims object into a CWT claims object which has numeric keys. If a key string in JSON data cannot be mapped to a numeric key, it will be skipped.
- Parameters
claims (Union[str, bytes, Dict[str, Any]]) – A JWT claims object to be converted.
private_claim_names (Dict[str, int]) –
A set of private claim definitions which consist of a readable claim name(str) and a claim key(int). The claim key should be less than -65536 but you can use the numbers other than pre-registered numbers listed in IANA Registry.
- Returns
A CWT claims object.
- Return type
- Raises
ValueError – Invalid arguments.
- classmethod validate(claims: Dict[int, Any])[source]¶
Validates a CWT claims object.
- Parameters
claims (Dict[int, Any]) – A CWT claims object to be validated.
- Raises
ValueError – Failed to verify.
- property iss: Optional[str]¶
- property sub: Optional[str]¶
- property aud: Optional[str]¶
- property exp: Optional[int]¶
- property nbf: Optional[int]¶
- property iat: Optional[int]¶
- property cti: Optional[str]¶
- property cnf: Optional[Union[Dict[int, Any], List[Any], str]]¶
- class cwt.Recipient[source]¶
Bases:
object
A
RecipientInterface
Builder.- classmethod from_dict(protected: Dict[int, Any], unprotected: Dict[int, Any], ciphertext: bytes = b'', recipients: List[Any] = [], key_ops: List[int] = [], key: bytes = b'') → cwt.recipient_interface.RecipientInterface[source]¶
Create a recipient from a CBOR-like dictionary with numeric keys.
- Parameters
protected (Dict[int, Any]) – Parameters that are to be cryptographically protected.
unprotected (Dict[int, Any]) – Parameters that are not cryptographically protected.
- Returns
A recipient object.
- Return type
RecipientInterface
- Raises
ValueError – Invalid arguments.
- classmethod from_json(data: Union[str, bytes, Dict[str, Any]]) → cwt.recipient_interface.RecipientInterface[source]¶
Create a recipient from JSON-formatted recipient data.
- Parameters
data (Union[str, bytes, Dict[str, Any]]) – JSON-formatted recipient data.
- Returns
A recipient object.
- Return type
RecipientInterface
- Raises
ValueError – Invalid arguments.
DecodeError – Failed to decode the key data.
- exception cwt.EncodeError[source]¶
Bases:
cwt.exceptions.CWTError
An Exception occurred when a CWT/COSE encoding process failed.
- exception cwt.DecodeError[source]¶
Bases:
cwt.exceptions.CWTError
An Exception occurred when a CWT/COSE decoding process failed.
- exception cwt.VerifyError[source]¶
Bases:
cwt.exceptions.CWTError
An Exception occurred when a verification process failed.