Class JwksUnavailableException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.revetsec.RevetsecException
com.revetsec.jose.JwksUnavailableException
- All Implemented Interfaces:
Serializable
Thrown when a
RemoteJwksSource has no usable JSON Web Key Set for a call: the fetch failed, a
recent failure is still suppressing fetches, the limit of two requests per cooldown held the call back, or the
call's deadline ended while it waited for another caller's fetch.
Its category says what went wrong, and there is no separate reason:
ErrorCategory.TRANSPORT: the exchange timed out or failed with an I/O error, the call's deadline ended while it waited, or the limit of two requests per cooldown held the call back and no request was sent (all transient;JoseObserver.didSuppressJwksFetch(java.net.URI, java.time.Duration)reports the last), or this thread was interrupted (not transient, with the interrupt flag set again);ErrorCategory.REMOTE_ERROR: the server answered with an error status (transient for 429 and 5xx) or a redirect, which is never followed;ErrorCategory.MALFORMED_INPUT: the response or the key set document was malformed or too large;ErrorCategory.CONFIGURATION: the fetch cannot run in this configuration or runtime, such as a default HTTP client that could not be created.
IOException as the cause; every other instance has
none. Revetsec never wraps this exception: a validator that needed the key set throws it unchanged.- Since:
- 1.0.0
- Author:
- Mark Allen
- See Also:
-
Method Summary
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