Class PublicKeyCredentialRequestOptions
Its `challenge` member must be present, while its other members are optional.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()
boolean
@NonNull ByteArray
A challenge that the selected authenticator signs, along with other data, when producing an authentication assertion.@NonNull AssertionExtensionInputs
Additional parameters requesting additional processing by the client and authenticator.getHints()
Zero or more hints, in descending order of preference, to guide the user agent in interacting with the user during this authentication operation.getRpId()
Specifies the relying party identifier claimed by the caller.int
hashCode()
Serialize thisPublicKeyCredentialRequestOptions
value to JSON suitable for sending to the client.toString()
-
Method Details
-
getTimeout
-
getAllowCredentials
-
getUserVerification
-
toCredentialsGetJson
Serialize thisPublicKeyCredentialRequestOptions
value to JSON suitable for sending to the client.Any
ByteArray
values in this data structure will beBase64Url
encoded. Those values MUST be decoded intoBufferSource
values (such asUint8Array
) on the client side before callingnavigator.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
public static PublicKeyCredentialRequestOptions.PublicKeyCredentialRequestOptionsBuilder.MandatoryStages builder() -
toBuilder
-
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. -
getHints
Zero or more hints, in descending order of preference, to guide the user agent in interacting with the user during this authentication operation.For example, the
PublicKeyCredentialHint.SECURITY_KEY
hint may be used to ask the client to emphasize the option of authenticating with an external security key, or thePublicKeyCredentialHint.CLIENT_DEVICE
hint may be used to ask the client to emphasize the option of authenticating a built-in passkey provider.These hints are not requirements, and do not bind the user-agent, but may guide it in providing the best experience by using contextual information about the request.
Hints MAY contradict information contained in
PublicKeyCredentialDescriptor.getTransports()
. When this occurs, the hints take precedence.This library does not take these hints into account in any way, other than passing them through so they can be used in the argument to
navigator.credentials.get()
on the client side.The default is empty.
- See Also:
-
PublicKeyCredentialHint
StartAssertionOptions.getHints()
PublicKeyCredentialRequestOptions.PublicKeyCredentialRequestOptionsBuilder.hints(List)
PublicKeyCredentialRequestOptions.PublicKeyCredentialRequestOptionsBuilder.hints(String...)
PublicKeyCredentialRequestOptions.PublicKeyCredentialRequestOptionsBuilder.hints(PublicKeyCredentialHint...)
- PublicKeyCredentialRequestOptions.hints
- §5.8.7. User-agent Hints Enumeration (enum PublicKeyCredentialHints)
-
getRpId
Specifies the relying party identifier claimed by the caller.If omitted, its value will be set by the client.
-
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
-
hashCode
public int hashCode() -
toString
-