# Class PublicKeyCredentialCreationOptions.Builder

java.lang.Object
com.codename1.io.webauthn.PublicKeyCredentialCreationOptions.Builder

Enclosing class:
  `PublicKeyCredentialCreationOptions`

public static final class PublicKeyCredentialCreationOptions.Builder extends Object
Fluent builder for `PublicKeyCredentialCreationOptions`. The resulting JSON is W3C-compliant and forwarded verbatim to the OS authenticator.

Since:
  7.0.245

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Builder()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `PublicKeyCredentialCreationOptions.Builder`
  `authenticatorAttachment(String v)`
  `"platform"` to require a platform authenticator (Face ID / Touch ID on iOS, Android biometrics) or `"cross-platform"` for hardware keys.
  `PublicKeyCredentialCreationOptions`
  `build()`
  `PublicKeyCredentialCreationOptions.Builder`
  `challenge(String base64UrlChallenge)`
  Challenge bytes, base64url-encoded.
  `PublicKeyCredentialCreationOptions.Builder`
  `residentKey(String v)`
  `"required"` (the modern default for passkeys), `"preferred"` or `"discouraged"`.
  `PublicKeyCredentialCreationOptions.Builder`
  `rp(String id, String name)`
  `PublicKeyCredentialCreationOptions.Builder`
  `user(String id, String name, String displayName)`
  `PublicKeyCredentialCreationOptions.Builder`
  `userVerification(String v)`
  `"required"`, `"preferred"` (default) or `"discouraged"`.

  ### Methods inherited from class Object

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

- ## Constructor Details

  - ### Builder

    public Builder()

- ## Method Details

  - ### rp

    public PublicKeyCredentialCreationOptions.Builder rp(String id, String name)

  - ### user

    public PublicKeyCredentialCreationOptions.Builder user(String id, String name, String displayName)

  - ### challenge

    public PublicKeyCredentialCreationOptions.Builder challenge(String base64UrlChallenge)
    Challenge bytes, base64url-encoded.

  - ### authenticatorAttachment

    public PublicKeyCredentialCreationOptions.Builder authenticatorAttachment(String v)
    `"platform"` to require a platform authenticator (Face ID / Touch ID on iOS, Android biometrics) or `"cross-platform"` for hardware keys. `null` (the default) lets the OS pick.

  - ### userVerification

    public PublicKeyCredentialCreationOptions.Builder userVerification(String v)
    `"required"`, `"preferred"` (default) or `"discouraged"`.

  - ### residentKey

    public PublicKeyCredentialCreationOptions.Builder residentKey(String v)
    `"required"` (the modern default for passkeys), `"preferred"` or `"discouraged"`.

  - ### build

    public PublicKeyCredentialCreationOptions build()