Backend API. Server-side code: this runs in a Codename One backend, not in the app on the device.
public final class WebAuthnException
- Object
- Throwable
- Exception
- RuntimeException
- AuthenticationException
- WebAuthnException
A passkey ceremony that was refused, with which check refused it.
getReason is one of the constants here: a short name a test, a log line
or an alert can match. The message says the same for a person, and may name
what was received – an origin, an attestation format – so it is for the
server’s own log and is not sent to whoever made the request.
Fields
Constructors
public WebAuthnException(String reason, String message) | |
public WebAuthnException(String reason, String message, Throwable cause) |
Methods
public String getReason() | Which check refused the ceremony: one of the constants of this class. |
Inherited methods
Field details
MALFORMED
public static final String MALFORMED = "malformed"The request is not the JSON a ceremony takes, or a field of it is
missing or is not what it should be.
MALFORMED_CBOR
public static final String MALFORMED_CBOR = "malformed_cbor"A CBOR value could not be read: truncated, nested too deep, too large,
or of a kind the ceremonies have no use for.
NO_CHALLENGE
public static final String NO_CHALLENGE = "no_challenge"No ceremony was waiting in this session, or it had been used already.
CHALLENGE_EXPIRED
public static final String CHALLENGE_EXPIRED = "challenge_expired"The ceremony was started too long ago.
CHALLENGE_MISMATCH
public static final String CHALLENGE_MISMATCH = "challenge_mismatch"The client signed another challenge than the one this session was given.
WRONG_TYPE
public static final String WRONG_TYPE = "wrong_type"The client data is for the other ceremony: a registration where a
sign-in was expected, or the reverse.
ORIGIN_MISMATCH
public static final String ORIGIN_MISMATCH = "origin_mismatch"The ceremony ran on an origin the relying party does not allow.
CROSS_ORIGIN
public static final String CROSS_ORIGIN = "cross_origin"The ceremony ran inside a frame of another origin, which is not allowed.
RP_ID_MISMATCH
public static final String RP_ID_MISMATCH = "rp_id_mismatch"The authenticator answered for another relying party.
USER_NOT_PRESENT
public static final String USER_NOT_PRESENT = "user_not_present"The authenticator did not see the user: the user-present flag is clear.
USER_NOT_VERIFIED
public static final String USER_NOT_VERIFIED = "user_not_verified"The ceremony required the user to be verified, and the flag is clear.
MALFORMED_AUTHENTICATOR_DATA
public static final String MALFORMED_AUTHENTICATOR_DATA = "malformed_authenticator_data"The authenticator data is not what the specification lays out.
UNSUPPORTED_ALGORITHM
public static final String UNSUPPORTED_ALGORITHM = "unsupported_algorithm"The credential’s key is of an algorithm this server does not verify.
INVALID_KEY
public static final String INVALID_KEY = "invalid_key"The credential’s key is not a key of the algorithm it names.
UNSUPPORTED_ATTESTATION
public static final String UNSUPPORTED_ATTESTATION = "unsupported_attestation"The attestation is in a format this server does not verify.
ATTESTATION_INVALID
public static final String ATTESTATION_INVALID = "attestation_invalid"The attestation statement does not verify.
CREDENTIAL_EXISTS
public static final String CREDENTIAL_EXISTS = "credential_exists"A credential with this id is registered already, to this user or another.
UNKNOWN_CREDENTIAL
public static final String UNKNOWN_CREDENTIAL = "unknown_credential"No credential with this id is registered.
CREDENTIAL_NOT_ALLOWED
public static final String CREDENTIAL_NOT_ALLOWED = "credential_not_allowed"The credential is not one the ceremony allowed.
USER_MISMATCH
public static final String USER_MISMATCH = "user_mismatch"The credential belongs to another user than the one the ceremony is for,
or the response names no user where it must.
SIGNATURE_INVALID
public static final String SIGNATURE_INVALID = "signature_invalid"The signature is not the credential’s signature of this ceremony.
COUNTER_REGRESSION
public static final String COUNTER_REGRESSION = "counter_regression"The signature counter did not advance: the credential may have been
copied.
BACKUP_STATE_INVALID
public static final String BACKUP_STATE_INVALID = "backup_state_invalid"The backup flags contradict each other, or what was recorded when the
credential was registered.
ACCOUNT_UNAVAILABLE
public static final String ACCOUNT_UNAVAILABLE = "account_unavailable"The user the credential belongs to cannot sign in here.
Constructor details
WebAuthnException
public WebAuthnException(String reason, String message)WebAuthnException
public WebAuthnException(String reason, String message, Throwable cause)Method details
getReason
public String getReason()Which check refused the ceremony: one of the constants of this class.