Class WebAuthnException


public class WebAuthnException extends IOException
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 Details

    • NOT_ALLOWED

      public static final String 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

      public static final String INVALID_STATE
      The credential being created already exists on the authenticator (mapped from the W3C InvalidStateError for create()), or the requested credential is no longer valid.
      See Also:
    • NOT_SUPPORTED

      public static final String NOT_SUPPORTED
      The platform does not support the requested public-key algorithm / transport / RP combination.
      See Also:
    • SECURITY_ERROR

      public static final String 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

      public static final String ABORTED

      The ceremony was cancelled by the caller (e.g. via

      invalid reference
      WebAuthnClient#cancel()
      ).
      See Also:
    • CONSTRAINT_ERROR

      public static final String 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

      public static final String 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

      public static final String TRANSPORT_ERROR
      Generic transport / network failure (e.g. while POSTing the registration or assertion response to your relying-party server).
      See Also:
    • INVALID_OPTIONS

      public static final String INVALID_OPTIONS
      The options JSON received from the relying party could not be parsed.
      See Also:
    • INVALID_RESPONSE

      public static final String INVALID_RESPONSE
      The response JSON returned by the authenticator could not be parsed back into a PublicKeyCredential.
      See Also:
  • 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.