TGFBiometricAuthenticatorDelegate
Objective-C
@protocol TGFBiometricAuthenticatorDelegate <NSObject>
Swift
protocol TGFBiometricAuthenticatorDelegate : NSObjectProtocol
A delegate protocol that an application can implement to customize the user experience for the proprietary biometric authenticator.
@since 1.0.0
-
Called by the SDK before presenting the Touch ID prompt, allowing the application to provide a custom message to be displayed in the dialog.
Note
This method is specific to Touch ID. The message for Face ID is configured via the
NSFaceIDUsageDescriptionkey in the application’sInfo.plist.Declaration
Objective-C
- (NSString *_Nonnull) biometricAuthenticatorTouchIdMessagePromptForOperationInfo: (nonnull TGFFido2OperationInfo *)operationInfo;Swift
func biometricAuthenticatorTouchIdMessagePrompt(_ operationInfo: TGFFido2OperationInfo) -> StringParameters
operationInfoAn object containing information about the ongoing FIDO2 operation.
Return Value
The localized string to display in the Touch ID prompt. This string must not be empty.
-
Called just before the SDK attempts to initiate a system biometric authentication (Touch ID or Face ID). This method allows the application to give final confirmation before the system prompt is displayed.
Declaration
Objective-C
- (void)biometricAuthenticatorShouldStartForOperationInfo: (nonnull TGFFido2OperationInfo *)operationInfo biometryType: (LABiometryType)biometryType startHandler: (void (^_Nonnull)(BOOL)) startHandler;Swift
func biometricAuthenticatorShouldStart(_ operationInfo: TGFFido2OperationInfo, biometryType: LABiometryType, startHandler: @escaping (Bool) -> Void)Parameters
operationInfoAn object containing information about the ongoing FIDO2 operation.
biometryTypeThe type of biometry available on the device (e.g.,
LABiometryTypeFaceID,LABiometryTypeTouchID). See Apple’sLABiometryTypedocumentation for details.startHandlerA block that your application must call. Pass
YESto allow the biometric prompt to be displayed, orNOto cancel the operation. -
Called when the Apple biometric authentication process has finished, regardless of whether it succeeded or failed.
Declaration
Objective-C
- (void)biometricAuthenticatorDidFinish;Swift
optional func biometricAuthenticatorDidFinish()