TGFFido2RequestFactory
Objective-C
@interface TGFFido2RequestFactory : NSObject
Swift
class TGFFido2RequestFactory : NSObject
A factory class used to create instances of TGFFido2Request from various sources, such as a JSON string or a native passkey request object.
@since 1.0.0
-
Parses a FIDO2 request from a JSON string into a
TGFFido2Requestobject.Declaration
Objective-C
+ (TGFFido2Request *_Nullable) requestWithJsonString:(nonnull NSString *)json error:(NSError *_Nullable *_Nullable)error;Swift
class func request(_ json: String) throws -> TGFFido2RequestParameters
jsonThe FIDO2 request, formatted as a JSON string.
errorOn input, a pointer to an error object. If parsing fails, this pointer is set to an
NSErrorobject containing information about the failure. You may specifynilfor this parameter if you are not interested in the error information.Return Value
A
TGFFido2Requestobject on success, ornilif parsing fails. -
Parses a FIDO2 request from a native
ASPasskeyCredentialRequestinto aTGFFido2Requestobject.Warning
This method MUST only be used when handling requests for hybrid authenticators (e.g., using a phone to sign in on a nearby computer).
@since 4.0.0
Declaration
Objective-C
+ (TGFFido2Request *_Nullable) requestWithPasskeyCredentialRequest: (nonnull ASPasskeyCredentialRequest *)request error:(NSError *_Nullable *_Nullable)error;Swift
class func request(_ request: ASPasskeyCredentialRequest) throws -> TGFFido2RequestParameters
requestAn
ASPasskeyCredentialRequestobject provided by the system.errorOn input, a pointer to an error object. If parsing fails, this pointer is set to an
NSErrorobject containing information about the failure. You may specifynilfor this parameter if you are not interested in the error information.Return Value
A
TGFFido2Requestobject on success, ornilif parsing fails.