Class JoseException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.revetsec.RevetsecException
com.revetsec.jose.JoseException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
JwtValidationException, MalformedJoseInputException, UnsupportedJoseFeatureException
@NotThreadSafe
public abstract sealed class JoseException
extends RevetsecException
permits MalformedJoseInputException, UnsupportedJoseFeatureException, JwtValidationException
A rejected JOSE input: a token that
JwtValidator refused, or a JSON Web Key Set document that
Jwks.fromJsonResult(String) rejected.
Every instance has a JoseException.Reason, which also fixes its class and ErrorCategory:
MalformedJoseInputException:ErrorCategory.MALFORMED_INPUT, for input that could not be parsed or exceeded a limit;UnsupportedJoseFeatureException:ErrorCategory.UNSUPPORTED, for a JOSE feature Revetsec does not support, such as encryption;JwtValidationException:ErrorCategory.VALIDATION_FAILURE, for a well-formed token that failed a check.
- Since:
- 1.0.0
- Author:
- Mark Allen
- See Also:
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionfinal @NonNull JoseException.ReasonReturns why the input was rejected.Methods inherited from class RevetsecException
getCategory, isTemporaryConditionModifier and TypeMethodDescriptionfinal @NonNull ErrorCategoryReturns the category of this failure.Returns whether this failure is classified as a temporary condition.Methods inherited from class Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Method Details
-
getReason
Returns why the input was rejected.- Returns:
- the reason
- Since:
- 1.0.0
-