Interface PinUserVerifier
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 PIN authenticator is required.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
This method is invoked when valid PIN credentials were provided and verified locally.void
verifyPin
(PinUserVerificationContext context, PinUserVerificationHandler handler) The user verification interaction called during authentication.
-
Method Details
-
verifyPin
The user verification interaction called during authentication.If there is a recoverable error during the verification, this method will be invoked again, and the
PinUserVerificationContext.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.If the user provided invalid credentials, and it results in a non-recoverable error, then a method such as
Authentication.onError(Consumer)
orRegistration.onError(Consumer)
} will be invoked.Basic implementation layout:
[...] @Override public void verifyPin(PinUserVerificationContext context, PinUserVerificationHandler handler) { // Check if the context has a recoverable error and present it to the end-user. // Display a UI prompting the user to provide the PIN, once provided, return it invoking: // handler.verifyPin(userProvidedPin); }
- 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 PIN credentials were provided and verified locally. The method is invoked afterverifyPin(PinUserVerificationContext, PinUserVerificationHandler)
has been invoked andPinUserVerificationHandler.verifyPin(char[])
is invoked in thePinUserVerificationHandler
ofverifyUser
and the provided PIN credentials are valid.This method can be used for instance to hide the UI used to ask for credentials to the user (some text fields to get PIN credentials) 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)
(AuthorizationProvider)} orRegistration.onSuccess(Runnable)
once the FIDO UAF server validates the request generated with the credentials).
-