Class PublicKeyCredentialRequestOptions.PublicKeyCredentialRequestOptionsBuilder
- Enclosing class:
- PublicKeyCredentialRequestOptions
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
-
Method Summary
Modifier and TypeMethodDescriptionallowCredentials
(@NonNull Optional<List<PublicKeyCredentialDescriptor>> allowCredentials) A list ofPublicKeyCredentialDescriptor
objects representing public key credentials acceptable to the caller, in descending order of the caller’s preference (the first item in the list is the most preferred credential, and so on down the list).allowCredentials
(List<PublicKeyCredentialDescriptor> allowCredentials) A list ofPublicKeyCredentialDescriptor
objects representing public key credentials acceptable to the caller, in descending order of the caller’s preference (the first item in the list is the most preferred credential, and so on down the list).build()
A challenge that the selected authenticator signs, along with other data, when producing an authentication assertion.extensions
(@NonNull AssertionExtensionInputs extensions) Additional parameters requesting additional processing by the client and authenticator.hints
(@NonNull PublicKeyCredentialHint... hints) Zero or more hints, in descending order of preference, to guide the user agent in interacting with the user during this authentication operation.Zero or more hints, in descending order of preference, to guide the user agent in interacting with the user during this authentication operation.Zero or more hints, in descending order of preference, to guide the user agent in interacting with the user during this authentication operation.Specifies the relying party identifier claimed by the caller.Specifies the relying party identifier claimed by the caller.timeout
(long timeout) Specifies a time, in milliseconds, that the caller is willing to wait for the call to complete.Specifies a time, in milliseconds, that the caller is willing to wait for the call to complete.toString()
userVerification
(UserVerificationRequirement userVerification) Describes the Relying Party's requirements regarding user verification for thenavigator.credentials.get()
operation.
-
Method Details
-
timeout
public PublicKeyCredentialRequestOptions.PublicKeyCredentialRequestOptionsBuilder timeout(@NonNull @NonNull Optional<Long> timeout) Specifies a time, in milliseconds, that the caller is willing to wait for the call to complete.This is treated as a hint, and MAY be overridden by the client.
-
timeout
public PublicKeyCredentialRequestOptions.PublicKeyCredentialRequestOptionsBuilder timeout(long timeout) Specifies a time, in milliseconds, that the caller is willing to wait for the call to complete.This is treated as a hint, and MAY be overridden by the client.
-
hints
public PublicKeyCredentialRequestOptions.PublicKeyCredentialRequestOptionsBuilder hints(@NonNull @NonNull String... hints) Zero or more hints, in descending order of preference, to guide the user agent in interacting with the user during this authentication operation.Setting this property multiple times overwrites any value set previously.
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.
-
hints
public PublicKeyCredentialRequestOptions.PublicKeyCredentialRequestOptionsBuilder hints(@NonNull @NonNull PublicKeyCredentialHint... hints) Zero or more hints, in descending order of preference, to guide the user agent in interacting with the user during this authentication operation.Setting this property multiple times overwrites any value set previously.
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.
-
hints
public PublicKeyCredentialRequestOptions.PublicKeyCredentialRequestOptionsBuilder hints(@NonNull @NonNull List<String> hints) Zero or more hints, in descending order of preference, to guide the user agent in interacting with the user during this authentication operation.Setting this property multiple times overwrites any value set previously.
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.
-
rpId
public PublicKeyCredentialRequestOptions.PublicKeyCredentialRequestOptionsBuilder rpId(@NonNull @NonNull Optional<String> rpId) Specifies the relying party identifier claimed by the caller.If omitted, its value will be set by the client.
-
rpId
Specifies the relying party identifier claimed by the caller.If omitted, its value will be set by the client.
-
allowCredentials
public PublicKeyCredentialRequestOptions.PublicKeyCredentialRequestOptionsBuilder allowCredentials(@NonNull @NonNull Optional<List<PublicKeyCredentialDescriptor>> allowCredentials) A list ofPublicKeyCredentialDescriptor
objects representing public key credentials acceptable to the caller, in descending order of the caller’s preference (the first item in the list is the most preferred credential, and so on down the list). -
allowCredentials
public PublicKeyCredentialRequestOptions.PublicKeyCredentialRequestOptionsBuilder allowCredentials(List<PublicKeyCredentialDescriptor> allowCredentials) A list ofPublicKeyCredentialDescriptor
objects representing public key credentials acceptable to the caller, in descending order of the caller’s preference (the first item in the list is the most preferred credential, and so on down the list). -
challenge
public PublicKeyCredentialRequestOptions.PublicKeyCredentialRequestOptionsBuilder challenge(@NonNull @NonNull ByteArray challenge) A challenge that the selected authenticator signs, along with other data, when producing an authentication assertion. See the §13.1 Cryptographic Challenges security consideration.- Returns:
this
.
-
userVerification
public PublicKeyCredentialRequestOptions.PublicKeyCredentialRequestOptionsBuilder userVerification(UserVerificationRequirement userVerification) Describes the Relying Party's requirements regarding user verification for thenavigator.credentials.get()
operation.Eligible authenticators are filtered to only those capable of satisfying this requirement.
By default, this is not set. When not set, the default in the browser is
UserVerificationRequirement.PREFERRED
. -
extensions
public PublicKeyCredentialRequestOptions.PublicKeyCredentialRequestOptionsBuilder extensions(@NonNull @NonNull AssertionExtensionInputs extensions) 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.
- Returns:
this
.
-
build
-
toString
-