Class PublicKeyCredentialRequestOptions

java.lang.Object
com.yubico.webauthn.data.PublicKeyCredentialRequestOptions

public final class PublicKeyCredentialRequestOptions extends Object
The PublicKeyCredentialRequestOptions dictionary supplies get() with the data it needs to generate an assertion.

Its `challenge` member must be present, while its other members are optional.

See Also:
  • Method Details

    • getTimeout

      public Optional<Long> getTimeout()
    • getAllowCredentials

      public Optional<List<PublicKeyCredentialDescriptor>> getAllowCredentials()
    • getUserVerification

      public Optional<UserVerificationRequirement> getUserVerification()
    • toCredentialsGetJson

      public String toCredentialsGetJson() throws com.fasterxml.jackson.core.JsonProcessingException
      Serialize this PublicKeyCredentialRequestOptions value to JSON suitable for sending to the client.

      Any ByteArray values in this data structure will be Base64Url encoded. Those values MUST be decoded into BufferSource values (such as Uint8Array) on the client side before calling navigator.credentials.get() .

      After decoding binary values, the resulting JavaScript object is suitable for passing as an argument to navigator.credentials.get().

      Returns:
      a JSON value suitable for sending to the client and passing as an argument to navigator.credentials.get(), after decoding binary options from Base64Url strings.
      Throws:
      com.fasterxml.jackson.core.JsonProcessingException - if JSON serialization fails.
    • builder

    • toBuilder

    • getChallenge

      @NonNull public @NonNull ByteArray getChallenge()
      A challenge that the selected authenticator signs, along with other data, when producing an authentication assertion. See the §13.1 Cryptographic Challenges security consideration.
    • getRpId

      public String getRpId()
      Specifies the relying party identifier claimed by the caller.

      If omitted, its value will be set by the client.

    • getExtensions

      @NonNull public @NonNull AssertionExtensionInputs getExtensions()
      Additional parameters requesting additional processing by the client and authenticator.

      For example, if transaction confirmation is sought from the user, then the prompt string might be included as an extension.

    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object