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
respondArgsA
TGFFido2RespondArgsobject containing the FIDO2 request and other arguments required to fulfill the request.completionBlockThe completion handler to call when the execution is complete. It takes the following parameters:
- response - A successful
id<TGFFido2Response>object, ornilif an error occurred. - error - An
NSErrorobject detailing the error, ornilon success. SeeTGFFido2Errorfor possible error types.
Return Value
An
id<TGFFido2Task>object that can be used to manage the asynchronous operation, ornilif the operation could not be started. - response - A successful
-
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
errorOn input, a pointer to an error object. If an error occurs, this pointer is set to an
NSErrorobject. You may specifynilif you are not interested in the error information.Return Value
An array of
TGFFido2AuthenticatorRegistrationInfoobjects representing the registered authenticators, ornilif 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
userIdThe user ID to filter the authenticator registrations by.
errorOn input, a pointer to an error object. If an error occurs, this pointer is set to an
NSErrorobject. You may specifynilif you are not interested in the error information.Return Value
An array of
TGFFido2AuthenticatorRegistrationInfoobjects representing the registered authenticators for the given user ID, ornilif 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) throwsParameters
authenticatorRegistrationThe
TGFFido2AuthenticatorRegistrationInfoobject for the registration to be deleted.errorOn input, a pointer to an error object. If an error occurs, this pointer is set to an
NSErrorobject. You may specifynilif you are not interested in the error information.Return Value
YESif 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() throwsParameters
errorOn input, a pointer to an error object. If an error occurs, this pointer is set to an
NSErrorobject containing information about the error. You may specifynilfor this parameter if you are not interested in the error information.Return Value
YESif all registrations were successfully deleted; otherwise,NO.