Class WebAuthnException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.io.IOException
com.codename1.io.webauthn.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").- Since:
- 7.0.245
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe ceremony was cancelled by the caller (e.g.static final StringOne of the option constraints (resident key required, user verification required, etc.) could not be satisfied by the available authenticators.static final StringThe options JSON received from the relying party could not be parsed.static final StringThe response JSON returned by the authenticator could not be parsed back into aPublicKeyCredential.static final StringThe credential being created already exists on the authenticator (mapped from the W3CInvalidStateErrorforcreate()), or the requested credential is no longer valid.static final StringUser dismissed the OS passkey sheet, or the OS denied the request because the authenticator was unavailable or no credential matched.static final StringThe platform lacks a public-key credential implementation.static final StringThe platform does not support the requested public-key algorithm / transport / RP combination.static final StringOrigin / RP-ID validation failed.static final StringGeneric transport / network failure (e.g. while POSTing the registration or assertion response to your relying-party server). -
Constructor Summary
ConstructorsConstructorDescriptionWebAuthnException(String error, String message) WebAuthnException(String error, String message, Throwable cause) -
Method Summary
Modifier and TypeMethodDescriptiongetError()The short error code (see constants on this class).Human-readable description supplied by the platform or the client.Methods inherited from class Throwable
addSuppressed, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, setStackTrace, toString
-
Field Details
-
NOT_ALLOWED
User dismissed the OS passkey sheet, or the OS denied the request because the authenticator was unavailable or no credential matched.- See Also:
-
INVALID_STATE
The credential being created already exists on the authenticator (mapped from the W3CInvalidStateErrorforcreate()), or the requested credential is no longer valid.- See Also:
-
NOT_SUPPORTED
The platform does not support the requested public-key algorithm / transport / RP combination.- See Also:
-
SECURITY_ERROR
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.- See Also:
-
ABORTED
The ceremony was cancelled by the caller (e.g. via
).invalid reference
WebAuthnClient#cancel()- See Also:
-
CONSTRAINT_ERROR
One of the option constraints (resident key required, user verification required, etc.) could not be satisfied by the available authenticators.- See Also:
-
NOT_IMPLEMENTED
The platform lacks a public-key credential implementation. iOS < 16, Android API < 28, JavaSE / desktop, web fallback without a native WebAuthn implementation.- See Also:
-
TRANSPORT_ERROR
Generic transport / network failure (e.g. while POSTing the registration or assertion response to your relying-party server).- See Also:
-
INVALID_OPTIONS
The options JSON received from the relying party could not be parsed.- See Also:
-
INVALID_RESPONSE
The response JSON returned by the authenticator could not be parsed back into aPublicKeyCredential.- See Also:
-
-
Constructor Details
-
WebAuthnException
-
WebAuthnException
-
-
Method Details
-
getError
The short error code (see constants on this class). -
getErrorDescription
Human-readable description supplied by the platform or the client.
-