Class PublicKeyCredentialRequestOptions
java.lang.Object
com.codename1.backend.security.webauthn.PublicKeyCredentialRequestOptions
What a client is given to sign in with a passkey: a challenge, the relying party, and -- when the user said who they are first -- which credentials may answer.
toMap() is the WebAuthn JSON form, PublicKeyCredentialRequestOptionsJSON,
which a browser's PublicKeyCredential.parseRequestOptionsFromJSON and the
Codename One client's PublicKeyCredentialRequestOptions.fromJson take as
it is:
{"challenge": "9zV1...", "timeout": 300000, "rpId": "example.com",
"allowCredentials": [], "userVerification": "preferred"}
An empty allowCredentials asks the authenticator for any passkey it holds
for this relying party; its answer then names the user.
Made by WebAuthnRelyingPartyOperations.createCredentialRequestOptions(String).
-
Method Summary
Modifier and TypeMethodDescriptionThe optionstoStoredMap()wrote, read back; null whenstoredis not that.List<byte[]> The ids of the credentials that may answer; empty for any the authenticator holds.byte[]The challenge the authenticator's answer must sign.getRpId()longHow long the client may take, in milliseconds: a hint to it.byte[]The handle of the user who said who they are before the ceremony, whose credential the answer must then be; null when nobody did.required,preferredordiscouraged.toMap()The options as the JSON a client takes; see the class.toMap()and, beside it, what the server alone keeps: for where a ceremony's pending state is stored.
-
Method Details
-
getChallenge
public byte[] getChallenge()The challenge the authenticator's answer must sign. -
getTimeout
public long getTimeout()How long the client may take, in milliseconds: a hint to it. -
getRpId
-
getUserVerification
required,preferredordiscouraged. -
getAllowCredentials
The ids of the credentials that may answer; empty for any the authenticator holds. -
getUserId
public byte[] getUserId()The handle of the user who said who they are before the ceremony, whose credential the answer must then be; null when nobody did. Kept with the pending ceremony and not sent to the client. -
toMap
-
toStoredMap
-
fromMap
The optionstoStoredMap()wrote, read back; null whenstoredis not that.
-