public final class PublicKeyCredentialRequestOptions

  1. Object
  2. PublicKeyCredentialRequestOptions

W3C PublicKeyCredentialRequestOptionsJSON – the options blob your relying-party server sends to start a passkey sign-in (assertion) ceremony.

Mirrors PublicKeyCredentialCreationOptions: receive JSON from the server, parse via fromJson(String), hand to WebAuthnClient.get(PublicKeyCredentialRequestOptions), post the result back to your server for verification.

Nested types

class PublicKeyCredentialRequestOptions.BuilderFluent builder for the rare case of synthesising the options client-side (e.g. unit tests).

Methods

public static PublicKeyCredentialRequestOptions fromJson(String json)Parses a PublicKeyCredentialRequestOptionsJSON document.
public String toJson()
public Map<String, Object> asMap()
public String getRpId()rpId – the relying-party identifier the credential was registered against.
public String getChallenge()challenge, base64url-encoded as it appears on the wire.
public String getUserVerification()userVerification – one of "required", "preferred", "discouraged".
public static PublicKeyCredentialRequestOptions.Builder newBuilder()

Inherited methods

Method details

fromJson

public static PublicKeyCredentialRequestOptions fromJson(String json)
Parses a PublicKeyCredentialRequestOptionsJSON document. The JSON is preserved so any fields this class doesn’t model are still passed through to the authenticator unchanged.

toJson

public String toJson()

asMap

public Map<String, Object> asMap()

getRpId

public String getRpId()
rpId – the relying-party identifier the credential was registered against.

getChallenge

public String getChallenge()
challenge, base64url-encoded as it appears on the wire.

getUserVerification

public String getUserVerification()
userVerification – one of "required", "preferred", "discouraged".

newBuilder

public static PublicKeyCredentialRequestOptions.Builder newBuilder()