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 Node
based 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
node
Optional
Node
object to set WebAuthn value to the designatedHiddenValueCallback
window
Optional
Window
set the presenting Window for the Apple Passkeys UI. If not set it will default toUIApplication.shared.windows.first
preferImmediatelyAvailableCredentials
Optional
preferImmediatelyAvailableCredentials
set this to true if you want to use only local credentials. Default valuefalse
usePasskeysIfAvailable
Optional
usePasskeysIfAvailable
set this to enable Passkeys in supported devices (iOS 16+). Setting this to true will not affect older OSsonSuccess
Completion callback for successful WebAuthn assertion outcome; note that the outcome will automatically be set to the designated
HiddenValueCallback
onError
Error 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()