# Class PublicKeyCredentialRequestOptions

java.lang.Object
com.codename1.io.webauthn.PublicKeyCredentialRequestOptions

public final class PublicKeyCredentialRequestOptions extends Object

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 Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static final class`
  `PublicKeyCredentialRequestOptions.Builder`
  Fluent builder for the rare case of synthesising the options client-side (e.g. unit tests).

- ## Method Summary

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

  ### Methods inherited from class Object

  `clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## 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()