Class StartAssertionOptions.StartAssertionOptionsBuilder
- Enclosing class:
- StartAssertionOptions
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
extensions
(@NonNull AssertionExtensionInputs extensions) Extension inputs for this authentication operation.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.timeout
(long timeout) The value forPublicKeyCredentialRequestOptions.getTimeout()
for this authentication operation.The value forPublicKeyCredentialRequestOptions.getTimeout()
for this authentication operation.toString()
userHandle
(@NonNull Optional<ByteArray> userHandle) The user handle of the user to authenticate, if the user has already been identified.userHandle
(ByteArray userHandle) The user handle of the user to authenticate, if the user has already been identified.The username of the user to authenticate, if the user has already been identified.The username of the user to authenticate, if the user has already been identified.userVerification
(@NonNull Optional<UserVerificationRequirement> userVerification) The value forPublicKeyCredentialRequestOptions.getUserVerification()
for this authentication operation.userVerification
(UserVerificationRequirement userVerification) The value forPublicKeyCredentialRequestOptions.getUserVerification()
for this authentication operation.
-
Method Details
-
username
public StartAssertionOptions.StartAssertionOptionsBuilder username(@NonNull @NonNull Optional<String> username) The username of the user to authenticate, if the user has already been identified.Mutually exclusive with
userHandle(Optional)
. Setting this to a present value will setuserHandle(Optional)
to empty.If this or
userHandle(Optional)
is present, thenRelyingParty.startAssertion(StartAssertionOptions)
will setPublicKeyCredentialRequestOptions.getAllowCredentials()
to the list of that user's credentials.If this and
StartAssertionOptions.getUserHandle()
are both absent, that implies authentication with a discoverable credential (passkey) - meaning identification of the user is deferred until after receiving the response from the client.The default is empty (absent).
- See Also:
-
username
The username of the user to authenticate, if the user has already been identified.Mutually exclusive with
userHandle(Optional)
. Setting this to a non-null value will setuserHandle(Optional)
to empty.If this or
userHandle(Optional)
is present, thenRelyingParty.startAssertion(StartAssertionOptions)
will setPublicKeyCredentialRequestOptions.getAllowCredentials()
to the list of that user's credentials.If this and
StartAssertionOptions.getUserHandle()
are both absent, that implies authentication with a discoverable credential (passkey) - meaning identification of the user is deferred until after receiving the response from the client.The default is empty (absent).
-
userHandle
public StartAssertionOptions.StartAssertionOptionsBuilder userHandle(@NonNull @NonNull Optional<ByteArray> userHandle) The user handle of the user to authenticate, if the user has already been identified.Mutually exclusive with
username(Optional)
. Setting this to a present value will setusername(Optional)
to empty.If this or
username(Optional)
is present, thenRelyingParty.startAssertion(StartAssertionOptions)
will setPublicKeyCredentialRequestOptions.getAllowCredentials()
to the list of that user's credentials.If this and
StartAssertionOptions.getUsername()
are both absent, that implies authentication with a discoverable credential (passkey) - meaning identification of the user is deferred until after receiving the response from the client.The default is empty (absent).
-
userHandle
The user handle of the user to authenticate, if the user has already been identified.Mutually exclusive with
username(Optional)
. Setting this to a non-null value will setusername(Optional)
to empty.If this or
username(Optional)
is present, thenRelyingParty.startAssertion(StartAssertionOptions)
will setPublicKeyCredentialRequestOptions.getAllowCredentials()
to the list of that user's credentials.If this and
StartAssertionOptions.getUsername()
are both absent, that implies authentication with a discoverable credential (passkey) - meaning identification of the user is deferred until after receiving the response from the client.The default is empty (absent).
- See Also:
-
userVerification
public StartAssertionOptions.StartAssertionOptionsBuilder userVerification(@NonNull @NonNull Optional<UserVerificationRequirement> userVerification) The value forPublicKeyCredentialRequestOptions.getUserVerification()
for this authentication operation.If set to
UserVerificationRequirement.REQUIRED
, thenRelyingParty.finishAssertion(FinishAssertionOptions)
will enforce that user verificationwas performed in this authentication ceremony.The default is
UserVerificationRequirement.PREFERRED
. -
userVerification
public StartAssertionOptions.StartAssertionOptionsBuilder userVerification(UserVerificationRequirement userVerification) The value forPublicKeyCredentialRequestOptions.getUserVerification()
for this authentication operation.If set to
UserVerificationRequirement.REQUIRED
, thenRelyingParty.finishAssertion(FinishAssertionOptions)
will enforce that user verificationwas performed in this authentication ceremony.The default is
UserVerificationRequirement.PREFERRED
. -
timeout
public StartAssertionOptions.StartAssertionOptionsBuilder timeout(@NonNull @NonNull Optional<Long> timeout) The value forPublicKeyCredentialRequestOptions.getTimeout()
for this authentication operation.This library does not take the timeout into account in any way, other than passing it through to the
PublicKeyCredentialRequestOptions
so it can be used as an argument tonavigator.credentials.get()
on the client side.The default is empty.
-
timeout
The value forPublicKeyCredentialRequestOptions.getTimeout()
for this authentication operation.This library does not take the timeout into account in any way, other than passing it through to the
PublicKeyCredentialRequestOptions
so it can be used as an argument tonavigator.credentials.get()
on the client side.The default is empty.
-
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 to the
PublicKeyCredentialRequestOptions
so they can be used in the argument tonavigator.credentials.get()
on the client side.The default is empty.
-
hints
public StartAssertionOptions.StartAssertionOptionsBuilder 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 to the
PublicKeyCredentialRequestOptions
so they can be used in the argument tonavigator.credentials.get()
on the client side.The default is empty.
-
hints
public StartAssertionOptions.StartAssertionOptionsBuilder 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 to the
PublicKeyCredentialRequestOptions
so they can be used in the argument tonavigator.credentials.get()
on the client side.The default is empty.
-
extensions
public StartAssertionOptions.StartAssertionOptionsBuilder extensions(@NonNull @NonNull AssertionExtensionInputs extensions) Extension inputs for this authentication operation.If
RelyingParty.getAppId()
is set,RelyingParty.startAssertion(StartAssertionOptions)
will overwrite anyappId
extension input set herein.The default specifies no extension inputs.
- Returns:
this
.
-
build
-
toString
-