AbstractFidoCollector
public class AbstractFidoCollector : AnyFieldCollector, DaVinciAware, Submittable, @unchecked Sendable
An abstract base class for Fido collectors in a DaVinci flow.
-
Undocumented
Declaration
Swift
public private(set) var type: String { get } -
Undocumented
Declaration
Swift
public private(set) var key: String { get } -
Undocumented
Declaration
Swift
public private(set) var label: String { get } -
Undocumented
Declaration
Swift
public private(set) var required: Bool { get } -
The UUID of the field collector.
Declaration
Swift
public var id: String { get } -
Declaration
Swift
public func anyPayload() -> Any? -
Undocumented
Declaration
Swift
public func payload() -> [String : Any]? -
Declaration
Swift
public func initialize(with value: Any) -
Undocumented
Declaration
Swift
public required init(with json: [String : Any]) -
Validates this collector, returning a list of validation errors if any.
Declaration
Swift
public func validate() -> [ValidationError]Return Value
An array of
ValidationError. -
The DaVinci instance, providing access to configuration and logging.
Declaration
Swift
public var davinci: DaVinci? -
The logger for recording Fido related events.
Declaration
Swift
public var logger: Logger? { get } -
Returns the event type for submission.
Declaration
Swift
public func eventType() -> String -
A factory method to create the appropriate Fido collector based on the action specified in the JSON payload.
Throws
An error if the action is invalid or unsupported.Declaration
Swift
public static func getCollector(with json: [String : Any]) throws -> AbstractFidoCollectorParameters
jsonThe JSON payload from the server.
Return Value
An instance of a concrete
AbstractFidoCollectorsubclass. -
Handles errors that occur during FIDO operations and transforms them into WebAuthn-spec-compliant errors.
This method converts
ASAuthorizationErrorcodes andFidoErrortypes into human-readable error information based on the WebAuthn specification. The transformed error is returned to the caller.Declaration
Swift
public func handleError(error: Error) -> FidoErrorParameters
errorThe error to handle and transform.
Return Value
A transformed
FidoErrorthat is more human-readable and spec-compliant.
View on GitHub