Enum Class JoseException.Reason

java.lang.Object
java.lang.Enum<JoseException.Reason>
com.revetsec.jose.JoseException.Reason
All Implemented Interfaces:
Serializable, Comparable<JoseException.Reason>, Constable
Enclosing class:
JoseException

Why a JOSE input was rejected. Each reason belongs to exactly one exception class and category, and has one fixed message.

This enum is not switch-stable: a later release may add constants, so a switch over it needs a default branch.

Since:
1.0.0
Author:
Mark Allen
  • Nested Class Summary

    Nested classes/interfaces inherited from class Enum

    Enum.EnumDesc<E>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    The header's alg is not one of the allowed algorithms, compared exactly; none in any case lands here.
    More than one trusted key fits the token: two usable keys share its kid, or, without a kid, more than one key fits its algorithm.
    None of the token's audiences is an expected audience.
    The payload is not a strict UTF-8 JSON object within the limits, has duplicate members, is empty, or holds a registered claim of the wrong type or out of range, such as an exp that is not a number or an empty aud array (RFC 7519 section 4.1).
    The header has a zip member.
    The token has a cnf claim (RFC 7800): it is bound to a key whose possession this validator does not check, so it is never accepted as a bearer token.
    The header has a crit member (RFC 7515 section 4.1.11).
    The token is a JWE compact serialization, with four dots (RFC 7516), which Revetsec does not decrypt.
    The token's exp has passed, allowing for clock skew.
    The JOSE header is not a strict UTF-8 JSON object within the limits, has duplicate members, has no string alg, or has a kid that is not a string of 1 to 256 characters.
    The header's typ is not one of the allowed types, or it is absent where a type is required.
    The token's iat is in the future, allowing for clock skew.
    The token's iss is not the expected issuer, compared exactly.
    The token starts with a left curly bracket, as a JWS JSON serialization does (RFC 7515 section 7.2), which Revetsec does not accept.
    Trusted keys with the token's kid exist, but none fits its algorithm: another key type or curve, another alg, or an RSA key without alg while more than one RSA algorithm is allowed.
    The key's JWK issuer member does not match the token's iss.
    The JSON Web Key Set document is not a strict JSON object with a keys array of objects within the size and key-count limits (RFC 7517 section 5).
    A required claim is absent or JSON null.
    The header has a cty member, as a nested token does (RFC 7519 section 5.2).
    The token's nbf has not yet been reached, allowing for clock skew.
    The signature has the wrong length for its algorithm or key, or an ECDSA signature's r or s is outside [1, n − 1].
    The signature did not verify.
    The token is not a JWS compact serialization: a character outside the base64url alphabet and ., a number of dots other than two or four, an empty header, or a segment that is not canonical unpadded base64url (RFC 7515 sections 2 and 7.1).
    The token is longer than the validator's maximum token length.
    The header has a b64 member (RFC 7797).
    No trusted key matches the token's kid, or, without a kid, no trusted key fits its algorithm.
    The header carries its own key or a key location (jwk, jku or x5u), which Revetsec never trusts or fetches.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the enum constant of this class with the specified name.
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class Object

    getClass, notify, notifyAll, wait, wait, wait