Interface PasscodeAuthenticatorCallback


public interface PasscodeAuthenticatorCallback
A callback for handling the UI and results of Passcode Authenticator operations.

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 Type
    Method
    Description
    void
    Called when a passcode management operation (create, change, or delete) fails.
    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.
    void
    Called when a passcode management operation (create, change, or delete) completes successfully.
    default void
    setPasscode(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 Fragment provided by the Keyboard object. This method is one of two ways to provide a passcode, the other being the programmatic setPasscode(boolean, Fido2OperationInfo, SetPasscodeCallback) method. An application must implement at least one of them.

      Parameters:
      keyboard - The Keyboard object, which contains the secure keyboard Fragment to be displayed.
      fido2OperationInfo - Information about the ongoing operation for UI display purposes.
      controller - A Controller to 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-driven onStart(Keyboard, Fido2OperationInfo, Controller) method. An application must implement at least one of them.

      Parameters:
      isChangePasscode - true if the operation is to change the passcode, which requires providing both the old and new passcode. false otherwise.
      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

      @MainThread void onError(Fido2Exception exception)
      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 - A Fido2Exception that specifies what went wrong.
      Since:
      1.0.0