MfaPolicyResult

public struct MfaPolicyResult : Sendable

Represents the result of policy evaluation for a credential. Encapsulates both the compliance status and identifies which policy (if any) caused non-compliance.

  • Returns true if the credential is compliant with all policies.

    Declaration

    Swift

    public var isSuccess: Bool { get }
  • Returns true if the credential failed at least one policy.

    Declaration

    Swift

    public var isFailure: Bool { get }
  • The name of the non-compliant policy, or nil if compliant.

    Declaration

    Swift

    public var nonCompliancePolicyName: String? { get }
  • The non-compliant policy instance, or nil if compliant.

    Declaration

    Swift

    public var nonCompliancePolicy: (any MfaPolicy)? { get }

Factory Methods

  • Creates a successful policy evaluation result.

    Declaration

    Swift

    static func success() -> MfaPolicyResult

    Return Value

    A compliant MfaPolicyResult.

  • Creates a failed policy evaluation result.

    Declaration

    Swift

    static func failure(policy: any MfaPolicy) -> MfaPolicyResult

    Parameters

    policy

    The policy that failed evaluation.

    Return Value

    A non-compliant MfaPolicyResult.