DeviceAuthenticationCollector

open class DeviceAuthenticationCollector : FieldCollector<[String : Any]>, Submittable, Closeable, @unchecked Sendable

A collector for device authentication information.

This class is responsible for collecting information about device authentication, including the available devices and the user’s selection.

  • The list of available authentication devices.

    Declaration

    Swift

    public private(set) var devices: [Device] { get }
  • The device selected by the user for authentication.

    Declaration

    Swift

    public var value: Device?
  • Initializes a new instance of DeviceAuthenticationCollector with the given JSON input.

    Declaration

    Swift

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

    Parameters

    json

    A dictionary containing the collector’s configuration.

  • Returns the event type for this collector.

    Declaration

    Swift

    public func eventType() -> String

    Return Value

    A string representing the event type, which is “submit”.

  • Constructs the payload to be sent to the server.

    Declaration

    Swift

    override open func payload() -> [String : Any]?

    Return Value

    A dictionary containing the selected device’s information, or nil if no device is selected.

  • Resets the collector’s state by clearing the selected device.

    Declaration

    Swift

    public func close()