Errors

All errors are based on joserfc.errors.JoseError.

exception joserfc.errors.BadSignatureError(description: str | None = None)

This error is designed for JWS/JWT. It is raised when signature does not match.

error: str = 'bad_signature'

short-string error code

exception joserfc.errors.ConflictAlgorithmError(description: str | None = None)
error: str = 'conflict_algorithm'

short-string error code

exception joserfc.errors.DecodeError(description: str | None = None)
error: str = 'decode_error'

short-string error code

exception joserfc.errors.ExceededSizeError(description: str | None = None)

This error is designed for DEF zip algorithm. It raised when the compressed data exceeds the maximum allowed length.

error: str = 'exceeded_size'

short-string error code

exception joserfc.errors.ExpiredTokenError(description: str | None = None)
description: str = 'The token is expired'

long-string to describe this error

error: str = 'expired_token'

short-string error code

exception joserfc.errors.InsecureClaimError(claim: str)
error: str = 'insecure_claim'

short-string error code

exception joserfc.errors.InvalidCEKLengthError(description: str | None = None)
description: str = 'Invalid "cek" length'

long-string to describe this error

error: str = 'invalid_cek_length'

short-string error code

exception joserfc.errors.InvalidClaimError(claim: str)
error: str = 'invalid_claim'

short-string error code

exception joserfc.errors.InvalidEncryptedKeyError(description: str | None = None)
description: str = 'JWE Encrypted Key value SHOULD be an empty octet sequence'

long-string to describe this error

error: str = 'invalid_encrypted_key'

short-string error code

exception joserfc.errors.InvalidEncryptionAlgorithmError(description: str | None = None)

This error is designed for JWE. It is raised when “enc” value does not work together with “alg” value.

error: str = 'invalid_encryption_algorithm'

short-string error code

exception joserfc.errors.InvalidExchangeKeyError(description: str | None = None)
description: str = 'Invalid key for exchanging shared key'

long-string to describe this error

error: str = 'invalid_exchange_key'

short-string error code

exception joserfc.errors.InvalidKeyLengthError(description: str | None = None)
error: str = 'invalid_key_length'

short-string error code

exception joserfc.errors.InvalidKeyTypeError(description: str | None = None)
error: str = 'invalid_key_type'

short-string error code

exception joserfc.errors.InvalidPayloadError(description: str | None = None)
error: str = 'invalid_payload'

short-string error code

exception joserfc.errors.InvalidTokenError(description: str | None = None)
description: str = 'The token is not valid yet'

long-string to describe this error

error: str = 'invalid_token'

short-string error code

exception joserfc.errors.JoseError(description: str | None = None)

Base Exception for all errors in joserfc.

description: str = ''

long-string to describe this error

error: str = ''

short-string error code

exception joserfc.errors.MissingAlgorithmError(description: str | None = None)
description: str = 'Missing "alg" value in header'

long-string to describe this error

error: str = 'missing_algorithm'

short-string error code

exception joserfc.errors.MissingClaimError(claim: str)
error: str = 'missing_claim'

short-string error code

exception joserfc.errors.MissingEncryptionError(description: str | None = None)
description: str = 'Missing "enc" value in header'

long-string to describe this error

error: str = 'missing_encryption'

short-string error code

exception joserfc.errors.UnsupportedKeyAlgorithmError(description: str | None = None)
error: str = 'unsupported_key_alg'

short-string error code

exception joserfc.errors.UnsupportedKeyOperationError(description: str | None = None)
error: str = 'unsupported_key_operation'

short-string error code

exception joserfc.errors.UnsupportedKeyUseError(description: str | None = None)
error: str = 'unsupported_key_use'

short-string error code