TGFFido2UiDelegate
Objective-C
@protocol TGFFido2UiDelegate <NSObject>
Swift
protocol TGFFido2UiDelegate : NSObjectProtocol
A delegate protocol that an application must implement to handle user interactions during a FIDO2 operation. The FIDO2 SDK does not provide any UI and relies on the conforming delegate to display information and capture user input.
Note
All delegate callbacks are invoked on the Main thread.@since 1.0.0
-
Called when a FIDO2 request matches more than one available authenticator. Your application must implement this method to display a list of authenticators and allow the user to select one.
Declaration
Objective-C
- (void)showAuthenticators: (NSArray<TGFFido2AuthenticatorInfo *> *_Nonnull)authenticators forOperationInfo:(nonnull TGFFido2OperationInfo *)operationInfo authenticatorSelectionHandler: (nonnull void (^)(TGFFido2AuthenticatorInfo *_Nonnull)) authenticatorSelectionHandler cancelHandler:(nonnull void (^)(void))cancelHandler;Swift
func showAuthenticators(_ authenticators: [TGFFido2AuthenticatorInfo], operationInfo: TGFFido2OperationInfo, authenticatorSelectionHandler: @escaping (TGFFido2AuthenticatorInfo) -> Void, cancelHandler: @escaping () -> Void)Parameters
authenticatorsAn array of
TGFFido2AuthenticatorInfoobjects, each representing an authenticator that the user can choose.operationInfoA
TGFFido2OperationInfoobject containing details about the FIDO2 operation (e.g., Relying Party information).authenticatorSelectionHandlerA block to be called with the authenticator the user selected. You MUST call either this handler or
cancelHandler.cancelHandlerA block to be called if the user cancels the selection. You MUST call either this handler or
authenticatorSelectionHandler. -
Called after a new authenticator is registered, allowing the application to provide a user-friendly name or description for it.
Declaration
Objective-C
- (void)retrieveAuthenticatorDescription: (nonnull TGFFido2AuthenticatorInfo *)selectedAuthenticator authenticatorDescriptionHandler: (void (^_Nonnull)(TGFAuthenticatorDescriptor *_Nonnull)) authenticatorDescriptionHandler cancelHandler:(nonnull void (^)(void))cancelHandler;Swift
func retrieveAuthenticatorDescription(_ selectedAuthenticator: TGFFido2AuthenticatorInfo, authenticatorDescriptionHandler: @escaping (TGFAuthenticatorDescriptor) -> Void, cancelHandler: @escaping () -> Void)Parameters
selectedAuthenticatorInformation about the authenticator that was just registered.
authenticatorDescriptionHandlerA block to be called with a
TGFAuthenticatorDescriptorcontaining the new friendly name. You MUST call either this handler orcancelHandler.cancelHandlerA block to be called if the user cancels the process of naming the authenticator. You MUST call either this handler or
authenticatorDescriptionHandler. -
Called when user confirmation is required for a FIDO2 operation with transaction details (Transaction Confirmation). Your application must display the transaction details and ask the user to confirm or cancel.
Declaration
Objective-C
- (void)showTransactionDetails: (nonnull NSDictionary<NSString *, NSString *> *)transactionDetails proceedHandler:(nonnull void (^)(void))proceedHandler cancelHandler:(nonnull void (^)(void))cancelHandler;Swift
func showTransactionDetails(_ transactionDetails: [String : String], proceedHandler: @escaping () -> Void, cancelHandler: @escaping () -> Void)Parameters
transactionDetailsA dictionary containing the transaction details to be displayed to the user.
proceedHandlerA block to be called to inform the SDK to proceed with the transaction. You MUST call either this handler or
cancelHandler.cancelHandlerA block to be called to cancel the transaction. You MUST call either this handler or
proceedHandler.