Interface PasscodeAuthenticatorCallback
An implementation of this interface is required to handle both UI-driven passcode entry (via the secure keyboard) and programmatic passcode entry. It also receives the final success or error result of management operations like creating, changing, or deleting a passcode.
Note: All methods in this callback are invoked on the main UI thread.
- Since:
- 1.0.0
-
Method Summary
Modifier and TypeMethodDescriptionvoidonError(Fido2Exception exception) Called when a passcode management operation (create, change, or delete) fails.default voidonStart(Keyboard keyboard, Fido2OperationInfo fido2OperationInfo, Controller controller) Called when the SDK requires the user to enter a passcode via the secure keyboard UI.voidCalled when a passcode management operation (create, change, or delete) completes successfully.default voidsetPasscode(boolean isChangePasscode, Fido2OperationInfo fido2OperationInfo, SetPasscodeCallback setPasscodeCallback) Called when the SDK requires a passcode to be provided programmatically.
-
Method Details
-
onStart
@MainThread default void onStart(Keyboard keyboard, Fido2OperationInfo fido2OperationInfo, Controller controller) Called when the SDK requires the user to enter a passcode via the secure keyboard UI.The application should display the
Fragmentprovided by theKeyboardobject. This method is one of two ways to provide a passcode, the other being the programmaticsetPasscode(boolean, Fido2OperationInfo, SetPasscodeCallback)method. An application must implement at least one of them.- Parameters:
keyboard- TheKeyboardobject, which contains the secure keyboardFragmentto be displayed.fido2OperationInfo- Information about the ongoing operation for UI display purposes.controller- AControllerto cancel the operation.- Throws:
UnsupportedOperationException- throws an exception when the implementation is not provided.- Since:
- 1.0.0
-
setPasscode
@MainThread default void setPasscode(boolean isChangePasscode, Fido2OperationInfo fido2OperationInfo, SetPasscodeCallback setPasscodeCallback) Called when the SDK requires a passcode to be provided programmatically.The application should provide the passcode using the
SetPasscodeCallback. This method is one of two ways to provide a passcode, the other being the UI-drivenonStart(Keyboard, Fido2OperationInfo, Controller)method. An application must implement at least one of them.- Parameters:
isChangePasscode-trueif the operation is to change the passcode, which requires providing both the old and new passcode.falseotherwise.fido2OperationInfo- Information about the ongoing operation for UI display purposes.setPasscodeCallback- The callback to use for providing the passcode to the SDK.- Throws:
UnsupportedOperationException- throws an exception when the implementation is not provided.- Since:
- 1.8.0
-
onSuccess
@MainThread void onSuccess()Called when a passcode management operation (create, change, or delete) completes successfully. No further callbacks will be issued for this operation.Note: This callback is not invoked for FIDO2 registration or authentication operations. It is only for the management operations in
PasscodeAuthenticator.- Since:
- 1.0.0
-
onError
Called when a passcode management operation (create, change, or delete) fails. No further callbacks will be issued for this operation.Note: This callback is not invoked for FIDO2 registration or authentication operations. It is only for the management operations in
PasscodeAuthenticator.- Parameters:
exception- AFido2Exceptionthat specifies what went wrong.- Since:
- 1.0.0
-