D1Authn
public class D1Authn
Entry point to access the Authn features.
Since
3.0.0-
Fetches an pending authn request.
Declaration
Swift
public func fetchAuthnRequest(_ completion: @escaping (D1Error?) -> Void)
Parameters
completion
The callback is invoked when the fetch authn request process is completed. Possible errors:
-
Get enrolled authn type.
Declaration
Swift
public func enrolledAuthnType() -> AuthnType?
-
Enroll the user’s device for authentication.
Declaration
Parameters
preferredAuthnType
The preferred authn type. If
AuthnType.biometric
is selected and BIOMETRICS are not setup on the device, enroll authentication credential will giveD1Error.cancelled
IfAuthnType.platform
is selected and BIOMETRICS are not setup on the device, and ios version on the device is >16, enroll authentication credential will fallback to device passkeys IfAuthnType.platform
is selected and BIOMETRICS are not setup on the device, and ios version on the device is >16, enroll authentication credential will giveD1Error.Code.cancelled
completion
The callback is invoked when the enrol authn credential process is completed. Possible errors:
-
Unenroll the user’s device .
Since
3.1.0Declaration
Swift
public func unenrollAuthnCredentials(_ completion: @escaping (D1Error?) -> Void)
Parameters
completion
The callback invoked when the unenroll is completed. If device is not enrolled, success callback is invoked. Possible errors: