Interface FingerprintUserVerifier
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 fingerprint authenticator is required.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
This method is invoked when valid fingerprint credentials were provided and verified locally.void
verifyFingerprint
(FingerprintUserVerificationContext context, FingerprintUserVerificationHandler handler) The user verification interaction.
-
Method Details
-
verifyFingerprint
void verifyFingerprint(FingerprintUserVerificationContext context, FingerprintUserVerificationHandler 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. If there is a recoverable error during the verification, this method will be invoked again, and theFingerprintUserVerificationContext.lastRecoverableError()
will contain the error. The recoverable error can be used to inform the user of the recoverable error that occurred, because the UI is the responsibility of the developer using the SDK. The operation must be canceled. Basic implementation layout:[...] @Override public void verifyFingerprint(FingerprintUserVerificationContext context, FingerprintUserVerificationHandler handler) { // Trigger the fingerprint authentication process. The handler can be used to cancel listening // for credentials OsAuthenticationListenHandler osAuthenticationListenHandler = handler.listenForOsCredentials(); // Display a fingerprint screen asking the user to provide fingerprint credentials (so that the // user knows what to do) }
- 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 valid fingerprint credentials were provided and verified locally. The method is invoked afterverifyFingerprint(FingerprintUserVerificationContext, FingerprintUserVerificationHandler)
has been invoked andFingerprintUserVerificationHandler.listenForOsCredentials()
is invoked in theFingerprintUserVerificationHandler
ofverifyUser
and the end-user provides valid fingerprints.This method can be used for instance to hide the UI used to ask for credentials to the user (some screen asking the user to use the fingerprint sensor) and then 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).
-