FUIPasscodeControllerDelegate

public protocol FUIPasscodeControllerDelegate : AnyObject

This protocol defines the functions needed for FUIPasscodeController to notify the app about passcode and TouchID events.

  • User has entered a passcode and the implementation should try the passcode user entered by either open the secure store or compared with saved passcode. If passcode has not been setup previously, the implementation should accept this passcode and store it as the effective passcode. If passcode was already setup, the implementation should try to match the passcode with saved passcode.

    Developer could use passcodeController.passcodeSource to obtain whether the passcode is from user input or generated by SAPFiori and accessed by Touch ID, Face ID, or device passcode.

    Throws

    FUIPasscodeControllerError when try passcode failed.

    Declaration

    Swift

    func shouldTryPasscode(_ passcode: String, forInputMode inputMode: FUIPasscodeInputMode, fromController passcodeController: FUIPasscodeController) throws

    Parameters

    passcode

    The passcode user entered.

    inputMode

    The purpose of the passcode entered

    passcodeController

    The FUIPasscodeController. This is for the app to dismiss the controller when appropriate.

  • User has chosen to cancel the passcode setup or enter passcode process.

    Declaration

    Swift

    func didCancelPasscodeEntry(fromController passcodeController: FUIPasscodeController)

    Parameters

    passcodeController

    The FUIPasscodeController. This is for the app to dismiss the Passcode View when appropriate.

  • User has chosen to reset the passcode.

    Declaration

    Swift

    func shouldResetPasscode(fromController passcodeController: FUIPasscodeController)

    Parameters

    passcodeController

    The FUIPasscodeController. This is for app to dismiss the Passcode View when appropriate.

  • User has chosen to enable or not using the biometric ID to login from Touch ID or Face ID enablement screen, after the passcode policy changed from not allow to allow biometric ID.

    Default Implementation

    Default implementation - do nothing.

    Declaration

    Swift

    func didSetBiometricIDOption(to enabled: Bool, fromController passcodeController: FUIPasscodeController)

    Parameters

    enabled

    True if user wants to enable using biometric ID to login.

    passcodeController
  • passcodePolicy() Default implementation

    The FUIPasscodePolicy for this app.

    Default Implementation

    Returns default FUIPasscodePolicy, may be overridden by developer

    Declaration

    Swift

    func passcodePolicy() -> FUIPasscodePolicy

    Return Value

    The FUIPasscodePolicy for this app.

  • User tapped “Add New User” button from the FUIMultiUserPasscodeController.

    The implementation should go to the normal onboarding flow for the new user.

    This is for the app to dismiss the controller when appropriate.

    Declaration

    Swift

    func addNewUser(_ passcodeController: FUIPasscodeController)

    Parameters

    passcodeController
  • User has choosen to switch to another existing user from the FUIMultiUserPasscodeController.

    This is for the app to dismiss the controller when appropriate.

    Declaration

    Swift

    func switchUser(_ newUserId: String, passcodeController: FUIPasscodeController)

    Parameters

    newUserId

    The user ID for the new user in the user list.

    passcodeController