FUIPasscodePolicy

public struct FUIPasscodePolicy

The passcode policy structure.

  • The default minimum length of characters in passcode is 8.

    Declaration

    Swift

    static public let passcodePolicyDefaultMinLength = 8
  • The default value for hasDigit of FUIPasscodePolicy is false.

    Declaration

    Swift

    static public let passcodePolicyDefaultHasDigit = false
  • The default value for hasUpper of FUIPasscodePolicy is false.

    Declaration

    Swift

    static public let passcodePolicyDefaultHasUpper = false
  • The default value for hasLower of FUIPasscodePolicy is false.

    Declaration

    Swift

    static public let passcodePolicyDefaultHasLower = false
  • The default value for hasSpecial of FUIPasscodePolicy is false.

    Declaration

    Swift

    static public let passcodePolicyDefaultHasSpecial = false
  • The default value for minUniqueChars of FUIPasscodePolicy is no limit.

    Declaration

    Swift

    static public let passcodePolicyDefaultMinUniqueChars = passcodePolicyNoLimit
  • The default value for retryLimit of FUIPasscodePolicy is no limit.

    Declaration

    Swift

    static public let passcodePolicyDefaultRetryLimit = passcodePolicyNoLimit
  • The default value for allowsTouchID of FUIPasscodePolicy is true.

    Declaration

    Swift

    static public let passcodePolicyDefaultAllowsTouchID = true
  • The default value for isDigitsOnly of FUIPasscodePolicy is false.

    Declaration

    Swift

    static public let passcodePolicyDefaultIsDigitsOnly = false
  • The default value for minCharGroups of FUIPasscodePolicy is no limit.

    Declaration

    Swift

    static public let passcodePolicyMinCharGroups = passcodePolicyNoLimit
  • This value (-1) represents no limit in properties of type Int in FUIPasscodePolicy.

    Declaration

    Swift

    static public let passcodePolicyNoLimit = -1
  • The minimum number of characters in passcode. The validate function will return false if the length of the passcode is less than this minLength.

    Declaration

    Swift

    public var minLength: Int
  • Should passcode need to have digit. The validate function will return false if hasDigit is true and there is no digit in the passcode.

    Declaration

    Swift

    public var hasDigit: Bool
  • Should passcode need to have uppercase characters. The validate function will return false if hasUpper is true and there is no upper-case characters in the passcode.

    Declaration

    Swift

    public var hasUpper: Bool
  • Should passcode need to have lowercase characters. The validate function will return false if hasLower is true and there is no lower-case characters in the passcode.

    Declaration

    Swift

    public var hasLower: Bool
  • Should passcode need to have special characters. The validate function will return false if hasSpecial is true and there is no special characters in the passcode.

    Declaration

    Swift

    public var hasSpecial: Bool
  • How many unique characters should there be in the passcode. The validate function will return false if the number of unique characters in the passcode is less than minUniqueChars.

    Declaration

    Swift

    public var minUniqueChars: Int
  • How many retries user could have before lock timeout.

    Declaration

    Swift

    public var retryLimit: Int
  • Allows the passcode be stored in Touch ID protected keychain item.

    Declaration

    Swift

    public var allowsTouchID: Bool
  • The passcode should contain digit only if this property is true. All the hasDigit, hasUpper, hasLower, and hasSpecial will be igrnored if this property is true.

    Declaration

    Swift

    public var isDigitsOnly: Bool
  • The minimum character groups in the passcode. If this FUIPasscodePoly is used in a FUIPasscodeCreateController, and this value is greater than one, then the FUIPasscodeSetupView will display the character groups views.

    Declaration

    Swift

    public var minCharGroups: Int
  • Init with default values.

    Declaration

    Swift

    public init()
  • Validate a passcode against the policy.

    Declaration

    Swift

    public func validate(passcode: String) -> Bool

    Parameters

    passcode

    The passcode to be checked.

    Return Value

    True if validated.

  • convenience initializer using HCPms specific dictionary. Can be called with the root HCPms config or with the PasswordPolicy dictionary

    Declaration

    Swift

    public init?(hcpmsConfiguration param: Dictionary<String, Any>)
  • convenience initializer using HCPms specific PasswordPolicy dictionary

    Declaration

    Swift

    public init?(hcpmsPasscodePolicyDictionary dict: Dictionary<String, Any>)