WebAuthnAuthenticationCallback
open class WebAuthnAuthenticationCallback : WebAuthnCallback
extension WebAuthnAuthenticationCallback: PlatformAuthenticatorAuthenticationDelegate
extension WebAuthnAuthenticationCallback: FRWebAuthnManagerDelegate
WebAuthnAuthenticationCallback is a representation of AM’s WebAuthn Authentication Node to generate WebAuthn assertion based on given credentials, and optionally set the WebAuthn outcome value in Node‘s designated HiddenValueCallback
-
_type value in Callback response
Declaration
Swift
public var _type: String -
User Verification configuration value from Callback response
Declaration
Swift
public var userVerification: WAUserVerification -
Challenge string value from Callback response
Declaration
Swift
public var challenge: String -
Relying Party Identifier value from Callback response
Declaration
Swift
public var relyingPartyId: String -
Allowed credentials list of credential identifiers from Callback response
Declaration
Swift
public var allowCredentials: [[UInt8]] -
Timeout configuration value from Callback response
Declaration
Swift
public var timeout: Int -
Delegation to perform required user interaction while generating assertion
Declaration
Swift
public weak var delegate: PlatformAuthenticatorAuthenticationDelegate?
-
authenticate(node:window: preferImmediatelyAvailableCredentials: usePasskeysIfAvailable: onSuccess: onError: ) Authenticates against AM’s
WebAuthn Authentication Nodebased on the JSON callback and WebAuthn’s properties within the CallbackDeclaration
Swift
public func authenticate(node: Node? = nil, window: UIWindow? = UIApplication.shared.windows.first, preferImmediatelyAvailableCredentials: Bool = false, usePasskeysIfAvailable: Bool = false, onSuccess: @escaping StringCompletionCallback, onError: @escaping ErrorCallback)Parameters
nodeOptional
Nodeobject to set WebAuthn value to the designatedHiddenValueCallbackwindowOptional
Windowset the presenting Window for the Apple Passkeys UI. If not set it will default toUIApplication.shared.windows.firstpreferImmediatelyAvailableCredentialsOptional
preferImmediatelyAvailableCredentialsset this to true if you want to use only local credentials. Default valuefalseusePasskeysIfAvailableOptional
usePasskeysIfAvailableset this to enable Passkeys in supported devices (iOS 16+). Setting this to true will not affect older OSsonSuccessCompletion callback for successful WebAuthn assertion outcome; note that the outcome will automatically be set to the designated
HiddenValueCallbackonErrorError callback to notify any error thrown while generating WebAuthn assertion
-
Declaration
Swift
public func localKeyExistsAndPasskeysAreAvailable() -
Declaration
Swift
public func selectCredential(keyNames: [String], selectionCallback: @escaping WebAuthnCredentialsSelectionCallback)
-
Declaration
Swift
public func didFinishAuthorization() -
Declaration
Swift
public func didCompleteWithError(_ error: Error) -
Declaration
Swift
public func didCancelModalSheet()
View on GitHub