Class ExtensionConfigurationException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
ExtensionNotSupportedException
Extension when a relying-party extension request cannot be processed and the
WebAuthn ceremony must be aborted — for example an unsatisfiable request shape (largeBlob
write with more than one allowed credential) or malformed extension input.
Unlike conditions that merely cause an extension to be ignored — which are signalled by
returning null from the extension's processing methods — this is a hard failure.
The client catches it and surfaces it as a ClientError carrying getCode(), with
this exception preserved as the ClientError cause.
This is the common supertype for every extension hard failure, so a caller can test for "an
extension request failed" with a single instanceof check. The one case that needs to be
distinguished — the authenticator lacking a capability the relying party explicitly required — is
the subtype ExtensionNotSupportedException; everything else (request-shape and malformed
input, told apart by getCode(): ClientError.Code.CONFIGURATION_UNSUPPORTED ≙
NotSupportedError, ClientError.Code.BAD_REQUEST ≙ SyntaxError) carries
its human-readable detail in the message.
It is unchecked so it can be raised from the extension processing lambdas (whose functional
interfaces do not declare checked exceptions) without changing the Extension API.
-
Constructor Summary
ConstructorsConstructorDescriptionExtensionConfigurationException(ClientError.Code code, String message) ExtensionConfigurationException(ClientError.Code code, String message, Throwable cause) ExtensionConfigurationException(String message) -
Method Summary
Modifier and TypeMethodDescriptiongetCode()TheClientError.Codethe client should report when aborting the ceremony.The WebAuthnDOMExceptionname a client should reject the ceremony with for this failure:"SyntaxError"forClientError.Code.BAD_REQUEST(malformed input),"NotSupportedError"otherwise (an unsatisfiable/unsupported request).Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
ExtensionConfigurationException
-
ExtensionConfigurationException
-
ExtensionConfigurationException
-
-
Method Details
-
getCode
TheClientError.Codethe client should report when aborting the ceremony. -
getWebAuthnErrorName
The WebAuthnDOMExceptionname a client should reject the ceremony with for this failure:"SyntaxError"forClientError.Code.BAD_REQUEST(malformed input),"NotSupportedError"otherwise (an unsatisfiable/unsupported request). Kept here, next togetCode(), so theCode-to-spec-name mapping lives in one place rather than being re-derived by each caller.
-