public class WebAuthnException
- Object
- Throwable
- Exception
- IOException
- WebAuthnException
Thrown for failures during a WebAuthn / passkey ceremony driven by
WebAuthnClient. The getError() code mirrors the W3C exception names
returned by the platform authenticator ("NotAllowedError",
"InvalidStateError", "NotSupportedError", "SecurityError",
"AbortError", "ConstraintError") plus Codename One-specific values
for transport ("transport_error"), parsing
("invalid_options", "invalid_response") and the platform not
implementing public-key credentials at all ("not_supported").Fields
public static final String NOT_ALLOWED = "NotAllowedError" | User dismissed the OS passkey sheet, or the OS denied the request because the authenticator was unavailable or no credential matched. |
public static final String INVALID_STATE = "InvalidStateError" | The credential being created already exists on the authenticator (mapped from the W3C InvalidStateError for create()), or the requested credential is no longer valid. |
public static final String NOT_SUPPORTED = "NotSupportedError" | The platform does not support the requested public-key algorithm / transport / RP combination. |
public static final String SECURITY_ERROR = "SecurityError" | Origin / RP-ID validation failed. |
public static final String ABORTED = "AbortError" | The ceremony was cancelled by the caller (e.g. via WebAuthnClient.cancel()). |
public static final String CONSTRAINT_ERROR = "ConstraintError" | One of the option constraints (resident key required, user verification required, etc.) could not be satisfied by the available authenticators. |
public static final String NOT_IMPLEMENTED = "not_supported" | The platform lacks a public-key credential implementation. |
public static final String TRANSPORT_ERROR = "transport_error" | Generic transport / network failure (e.g. while POSTing the registration or assertion response to your relying-party server). |
public static final String INVALID_OPTIONS = "invalid_options" | The options JSON received from the relying party could not be parsed. |
public static final String INVALID_RESPONSE = "invalid_response" | The response JSON returned by the authenticator could not be parsed back into a PublicKeyCredential. |
Constructors
public WebAuthnException(String error, String message) | |
public WebAuthnException(String error, String message, Throwable cause) |
Methods
public String getError() | The short error code (see constants on this class). |
public String getErrorDescription() | Human-readable description supplied by the platform or the client. |
Inherited methods
Field details
NOT_ALLOWED
public static final String NOT_ALLOWED = "NotAllowedError"User dismissed the OS passkey sheet, or the OS denied the request
because the authenticator was unavailable or no credential matched.
INVALID_STATE
public static final String INVALID_STATE = "InvalidStateError"The credential being created already exists on the authenticator
(mapped from the W3C
InvalidStateError for create()), or the
requested credential is no longer valid.NOT_SUPPORTED
public static final String NOT_SUPPORTED = "NotSupportedError"The platform does not support the requested public-key algorithm /
transport / RP combination.
SECURITY_ERROR
public static final String SECURITY_ERROR = "SecurityError"Origin / RP-ID validation failed. Most often this means the app’s
associated domain (iOS) or asset link (Android) is not configured
for the relying-party identifier in the options JSON.
ABORTED
public static final String ABORTED = "AbortError"The ceremony was cancelled by the caller (e.g. via
WebAuthnClient.cancel()).CONSTRAINT_ERROR
public static final String CONSTRAINT_ERROR = "ConstraintError"One of the option constraints (resident key required, user verification
required, etc.) could not be satisfied by the available authenticators.
NOT_IMPLEMENTED
public static final String NOT_IMPLEMENTED = "not_supported"The platform lacks a public-key credential implementation. iOS < 16,
Android API < 28, JavaSE / desktop, web fallback without a native
WebAuthn implementation.
TRANSPORT_ERROR
public static final String TRANSPORT_ERROR = "transport_error"Generic transport / network failure (e.g. while POSTing the registration
or assertion response to your relying-party server).
INVALID_OPTIONS
public static final String INVALID_OPTIONS = "invalid_options"The options JSON received from the relying party could not be parsed.
INVALID_RESPONSE
public static final String INVALID_RESPONSE = "invalid_response"The response JSON returned by the authenticator could not be parsed
back into a
PublicKeyCredential.Constructor details
WebAuthnException
public WebAuthnException(String error, String message)WebAuthnException
public WebAuthnException(String error, String message, Throwable cause)Method details
getError
public String getError()The short error code (see constants on this class).
getErrorDescription
public String getErrorDescription()Human-readable description supplied by the platform or the client.