PasswordPolicy

public struct PasswordPolicy : Codable, Sendable

A struct representing a password policy Conforms to Codable for JSON encoding/decoding.

  • A name identifying this password policy.

    Declaration

    Swift

    public let name: String
  • A human-readable description of the policy.

    Declaration

    Swift

    public let description: String
  • Whether profile data is excluded

    Declaration

    Swift

    public let excludesProfileData: Bool
  • Whether new passwords must not be similar to the current password.

    Declaration

    Swift

    public let notSimilarToCurrent: Bool
  • Whether commonly used passwords are excluded.

    Declaration

    Swift

    public let excludesCommonlyUsed: Bool
  • The maximum number of days a password is valid before it must be changed.

    Declaration

    Swift

    public let maxAgeDays: Int
  • The minimum number of days a password must be used before it can be changed.

    Declaration

    Swift

    public let minAgeDays: Int
  • The maximum number of repeated characters allowed in a password.

    Declaration

    Swift

    public let maxRepeatedCharacters: Int
  • The minimum number of unique characters required in a password.

    Declaration

    Swift

    public let minUniqueCharacters: Int
  • A nested History struct specifying password history restrictions, if any.

    Declaration

    Swift

    public let history: History?
  • A nested Lockout struct specifying lockout rules, if any.

    Declaration

    Swift

    public let lockout: Lockout?
  • A nested Length struct specifying minimum and maximum length constraints.

    Declaration

    Swift

    public let length: Length
  • A dictionary specifying minimum required counts for certain character types

    Declaration

    Swift

    public let minCharacters: [String : Int]
  • An integer denoting how many users or “population” this policy applies to

    Declaration

    Swift

    public let populationCount: Int
  • The creation timestamp of this policy

    Declaration

    Swift

    public let createdAt: String
  • The last update timestamp of this policy

    Declaration

    Swift

    public let updatedAt: String
  • Indicates whether this policy is the default one.

    Declaration

    Swift

    public let `default`: Bool
  • Initializes a new PasswordPolicy instance from the provided decoder.

    Declaration

    Swift

    public init(from decoder: Decoder) throws

    Parameters

    decoder

    The decoder to read data from.