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 bySAPFiori
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 app to dismiss the Passcode View 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 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. -
didSetBiometricIDOption(to:fromController:)
Default implementationUser has chosen to enable or not using the biometric ID to login from Touch ID or Face ID enablemanet 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 implementationThe
FUIPasscodePolicy
for this app.Default Implementation
Returns default
FUIPasscodePolicy
, may be overridden by developerDeclaration
Swift
func passcodePolicy() -> FUIPasscodePolicy
Return Value
The FUIPasscodePolicy for this app.