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

Public properties

  • _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?

Lifecycle

  • Initializes WebAuthnAuthenticationCallback from AM’s WebAuthn Authentication NodeJSON response

    Throws

    AuthErrorfor invalid Callback response

    Declaration

    Swift

    public required init(json: [String : Any]) throws

    Parameters

    json

    JSON response of Callback

Public methods

  • Authenticates against AM’s WebAuthn Authentication Node based on the JSON callback and WebAuthn’s properties within the Callback

    Declaration

    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 designated HiddenValueCallback

    window

    Optional Window set the presenting Window for the Apple Passkeys UI. If not set it will default to UIApplication.shared.windows.first

    preferImmediatelyAvailableCredentials

    Optional preferImmediatelyAvailableCredentials set this to true if you want to use only local credentials. Default value false

    usePasskeysIfAvailable

    Optional usePasskeysIfAvailable set this to enable Passkeys in supported devices (iOS 16+). Setting this to true will not affect older OSs

    onSuccess

    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)

WebAuthnManagerDelegate