TGFFido2Client

Objective-C


@interface TGFFido2Client : NSObject

Swift

class TGFFido2Client : NSObject

A FIDO2 client that processes FIDO2 requests and generates FIDO2 responses.

@since 1.0.0

  • Unavailable

    Unavailable. An instance of the client must be obtained through the SDK’s designated factory or builder.

    Declaration

    Objective-C

    - (nonnull instancetype)init;
  • Returns the FIDO2 SDK Version

    @since 1.2.0

    Declaration

    Objective-C

    + (nonnull NSString *)sdkVersion;

    Swift

    class func sdkVersion() -> String
  • Responds asynchronously to a FIDO2 request by generating a FIDO2 response. This operation may run for a long period of time and all UI is delegated to the caller.

    The returned task object can be used to cancel the ongoing operation.

    @since 1.0.0

    Declaration

    Objective-C

    - (id<TGFFido2Task> _Nullable)
        respondWithArgs:(TGFFido2RespondArgs *_Nonnull)respondArgs
             completion:(nonnull void (^)(id<TGFFido2Response> _Nullable,
                                          NSError *_Nullable))completionBlock;

    Swift

    func respond(with respondArgs: TGFFido2RespondArgs, completion completionBlock: @escaping ((any TGFFido2Response)?, (any Error)?) -> Void) -> (any TGFFido2Task)?

    Parameters

    respondArgs

    A TGFFido2RespondArgs object containing the FIDO2 request and other arguments required to fulfill the request.

    completionBlock

    The completion handler to call when the execution is complete. It takes the following parameters:

    • response - A successful id<TGFFido2Response> object, or nil if an error occurred.
    • error - An NSError object detailing the error, or nil on success. See TGFFido2Error for possible error types.

    Return Value

    An id<TGFFido2Task> object that can be used to manage the asynchronous operation, or nil if the operation could not be started.

  • Retrieves a list of all registered FIDO2 authenticators.

    @since 1.3.0

    Declaration

    Objective-C

    - (NSArray<TGFFido2AuthenticatorRegistrationInfo *> *_Nullable)
        authenticatorRegistrationsWithError:(NSError *_Nullable *_Nullable)error;

    Swift

    func authenticatorRegistrations() throws -> [TGFFido2AuthenticatorRegistrationInfo]

    Parameters

    error

    On input, a pointer to an error object. If an error occurs, this pointer is set to an NSError object. You may specify nil if you are not interested in the error information.

    Return Value

    An array of TGFFido2AuthenticatorRegistrationInfo objects representing the registered authenticators, or nil if an error occurred.

  • Retrieves a list of registered FIDO2 authenticators for a specified user ID.

    @since 1.6.0

    Declaration

    Objective-C

    - (NSArray<TGFFido2AuthenticatorRegistrationInfo *> *_Nullable)
        authenticatorRegistrationsForUserId:(nonnull NSString *)userId
                                  withError:(NSError *_Nullable *_Nullable)error;

    Swift

    func authenticatorRegistrations(forUserId userId: String) throws -> [TGFFido2AuthenticatorRegistrationInfo]

    Parameters

    userId

    The user ID to filter the authenticator registrations by.

    error

    On input, a pointer to an error object. If an error occurs, this pointer is set to an NSError object. You may specify nil if you are not interested in the error information.

    Return Value

    An array of TGFFido2AuthenticatorRegistrationInfo objects representing the registered authenticators for the given user ID, or nil if an error occurred.

  • Deletes a specific authenticator registration.

    @since 1.3.0

    Declaration

    Objective-C

    - (BOOL)deleteAuthenticatorRegistration:
                (nonnull TGFFido2AuthenticatorRegistrationInfo *)
                    authenticatorRegistration
                                      error:(NSError *_Nullable *_Nullable)error;

    Swift

    func deleteAuthenticatorRegistration(_ authenticatorRegistration: TGFFido2AuthenticatorRegistrationInfo) throws

    Parameters

    authenticatorRegistration

    The TGFFido2AuthenticatorRegistrationInfo object for the registration to be deleted.

    error

    On input, a pointer to an error object. If an error occurs, this pointer is set to an NSError object. You may specify nil if you are not interested in the error information.

    Return Value

    YES if the operation completed successfully; otherwise, NO.

  • Deletes all authenticator registrations stored by the SDK.

    Note

    This method will also delete Passcode Authenticator enrollment.

    @since 4.0.0

    Declaration

    Objective-C

    + (BOOL)resetWithError:(NSError *_Nullable *_Nullable)error;

    Swift

    class func reset() throws

    Parameters

    error

    On input, a pointer to an error object. If an error occurs, this pointer is set to an NSError object containing information about the error. You may specify nil for this parameter if you are not interested in the error information.

    Return Value

    YES if all registrations were successfully deleted; otherwise, NO.