FUIPasscodePolicy
public struct FUIPasscodePolicy
The passcode policy structure.
-
The default minimum length of characters in passcode is 8.
Declaration
Swift
public static let passcodePolicyDefaultMinLength: Int
-
The default value for
hasDigit
ofFUIPasscodePolicy
is false.Declaration
Swift
public static let passcodePolicyDefaultHasDigit: Bool
-
The default value for
hasUpper
ofFUIPasscodePolicy
is false.Declaration
Swift
public static let passcodePolicyDefaultHasUpper: Bool
-
The default value for
hasLower
ofFUIPasscodePolicy
is false.Declaration
Swift
public static let passcodePolicyDefaultHasLower: Bool
-
The default value for
hasSpecial
ofFUIPasscodePolicy
is false.Declaration
Swift
public static let passcodePolicyDefaultHasSpecial: Bool
-
The default value for
minUniqueChars
ofFUIPasscodePolicy
is no limit.Declaration
Swift
public static let passcodePolicyDefaultMinUniqueChars: Int
-
The default value for
retryLimit
ofFUIPasscodePolicy
is no limit.Declaration
Swift
public static let passcodePolicyDefaultRetryLimit: Int
-
The default value for
allowsTouchID
ofFUIPasscodePolicy
is true.Declaration
Swift
public static let passcodePolicyDefaultAllowsTouchID: Bool
-
The default value for
isDigitsOnly
ofFUIPasscodePolicy
is false.Declaration
Swift
public static let passcodePolicyDefaultIsDigitsOnly: Bool
-
This value (-1) represents no limit in properties of type Int in FUIPasscodePolicy.
Declaration
Swift
public static let passcodePolicyNoLimit: Int
-
The minimum number of characters in passcode. The
validate
function will return false if the length of the passcode is less than thisminLength
.Declaration
Swift
public var minLength: Int
-
Should passcode need to have digit. The
validate
function will return false ifhasDigit
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 ifhasUpper
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 ifhasLower
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 ifhasSpecial
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 thanminUniqueChars
.Declaration
Swift
public var minUniqueChars: Int
-
How many retries are available to the user, before they are permanently locked-out.
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
-
Init with default values.
Declaration
Swift
public init()
-
Add a user defined passcode rule to the passcode policy.
Declaration
Swift
public mutating func addPasscodeRule(passcodeRule: FUIPasscodeRule)
Parameters
passcodeRule
The FUIPasscodeRule to be added to the passcode policy.
-
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.
-
Gets the number of required character groups for this policy based on the properties
hasDigit
,hasDigit
,hasUpper
,hasSpecial
.Declaration
Swift
public func numberOfRequiredGroups() -> Int
Return Value
The number of required character groups for this policy.
-
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>)