MfaPolicy

public protocol MfaPolicy : Sendable

Base protocol for all MFA policies.

MFA policies enforce security requirements before allowing credential operations. Each policy can evaluate device state and return whether the current conditions meet security requirements.

  • The unique name identifier for this policy.

    Declaration

    Swift

    var name: String { get }
  • evaluate(data:) Asynchronous

    Evaluates this policy against the current device context.

    Declaration

    Swift

    func evaluate(data: [String : Any]?) async throws -> Bool

    Parameters

    data

    Configuration data for this policy, parsed from a JSON policies string.

    Return Value

    true if the policy requirements are met, false otherwise.

  • description Extension method

    A string representation of this policy.

    Declaration

    Swift

    var description: String { get }