Interface DevicePasscodeUserVerifier
All the methods of the objects implementing this interface will be invoked in the main/UI thread.
The SDK does not provide implementations of this interface. The implementation must be done by the user of the SDK if the device passcode authenticator is required.
- See Also:
-
Registration.devicePasscodeUserVerifier(DevicePasscodeUserVerifier)
Authentication.devicePasscodeUserVerifier(DevicePasscodeUserVerifier)
AuthCloudApiRegistration.devicePasscodeUserVerifier(DevicePasscodeUserVerifier)
OutOfBandRegistration.devicePasscodeUserVerifier(DevicePasscodeUserVerifier)
OutOfBandAuthentication.devicePasscodeUserVerifier(DevicePasscodeUserVerifier)
-
Method Summary
Modifier and TypeMethodDescriptionvoid
This method is invoked when either valid device passcode credentials were provided and verified locally.void
verifyDevicePasscode
(DevicePasscodeUserVerificationContext context, DevicePasscodeUserVerificationHandler handler) The user verification interaction.
-
Method Details
-
verifyDevicePasscode
void verifyDevicePasscode(DevicePasscodeUserVerificationContext context, DevicePasscodeUserVerificationHandler handler) The user verification interaction. In the case of the registration the user must provide credentials as required by the FIDO UAF protocol. In the case of the authentication, this is invoked for the user to provide credentials.In the case of the device passcode authenticator, since the UI management is delegated to the operating system, the
verifyUser
method will not be invoked when a recoverable error occurs: the operating system will inform the end-user of the problem that happened. This implies thatverifyUser
is only invoked once when using the device passcode authenticator.Basic implementation layout:
[...] @Override public void verifyDevicePasscode(DevicePasscodeUserVerificationContext context, DevicePasscodeUserVerificationHandler handler) { // Trigger the device passcode authentication process. The handler can be used to cancel listening // for credentials programmatically DevicePasscodePromptOptions promptOptions = DevicePasscodePromptOptions.builder() .title("Authenticate") .build(); OsAuthenticationListenHandler osAuthenticationListenHandler = handler.listenForOsCredentials(promptOptions); // The Operating System will display the device passcode prompt. }
- Parameters:
context
- the object providing the information required for the verification processhandler
- the object that must be notified with the result of the interaction
-
onValidCredentialsProvided
void onValidCredentialsProvided()This method is invoked when either valid device passcode credentials were provided and verified locally. The method is invoked afterverifyDevicePasscode(DevicePasscodeUserVerificationContext, DevicePasscodeUserVerificationHandler)
has been invoked andDevicePasscodeUserVerificationHandler.listenForOsCredentials(DevicePasscodePromptOptions)
is invoked in theDevicePasscodeUserVerificationHandler
ofverifyUser
and the end-user provides valid biometric credentials.This method can be used for instance to display some progress message indicating that the operation is ongoing.
Note that invoking this method does not mean that the UAF operation completed successfully (this is notified through methods such as
Authentication.onSuccess(Consumer)
orRegistration.onSuccess(Runnable)
once the FIDO UAF server validates the request generated with the credentials).
-