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
hasDigitofFUIPasscodePolicyis false.Declaration
Swift
public static let passcodePolicyDefaultHasDigit: Bool -
The default value for
hasUpperofFUIPasscodePolicyis false.Declaration
Swift
public static let passcodePolicyDefaultHasUpper: Bool -
The default value for
hasLowerofFUIPasscodePolicyis false.Declaration
Swift
public static let passcodePolicyDefaultHasLower: Bool -
The default value for
hasSpecialofFUIPasscodePolicyis false.Declaration
Swift
public static let passcodePolicyDefaultHasSpecial: Bool -
The default value for
minUniqueCharsofFUIPasscodePolicyis no limit.Declaration
Swift
public static let passcodePolicyDefaultMinUniqueChars: Int -
The default value for
retryLimitofFUIPasscodePolicyis no limit.Declaration
Swift
public static let passcodePolicyDefaultRetryLimit: Int -
The default value for
allowsTouchIDofFUIPasscodePolicyis true.Declaration
Swift
public static let passcodePolicyDefaultAllowsTouchID: Bool -
The default value for
isDigitsOnlyofFUIPasscodePolicyis 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
validatefunction 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
validatefunction will return false ifhasDigitis true and there is no digit in the passcode.Declaration
Swift
public var hasDigit: Bool -
Should passcode need to have uppercase characters. The
validatefunction will return false ifhasUpperis true and there are no upper-case characters in the passcode.Declaration
Swift
public var hasUpper: Bool -
Should passcode need to have lowercase characters. The
validatefunction will return false ifhasLoweris true and there are no lower-case characters in the passcode.Declaration
Swift
public var hasLower: Bool -
Should passcode need to have special characters. The
validatefunction will return false ifhasSpecialis true and there are no special characters in the passcode.Declaration
Swift
public var hasSpecial: Bool -
How many unique characters should there be in the passcode. The
validatefunction 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 to 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 ignored if this property is true.
Declaration
Swift
public var isDigitsOnly: Bool -
If this property is true, and
isDigitsOnlyis also true, the passcode digits entered is converted to Latin digits.The default is false.
Declaration
Swift
public var isLocalizingDigitsToLatin: Bool -
The lock timeout in seconds. The default is 0.
If this property value is greater than 0, when user suspends the application and resumes after the timeout, the application should authenticate the user again. If user suspends the application and resumes before the timeout, the application does not need to authenticate user again.
If this property value is 0, then application should aways authenticate the user when application resumes from suspend.
Declaration
Swift
public var lockTimeout: Int -
The history number for passcode. The default value is 0.
Declaration
Swift
public var historyNumber: Int -
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
passcodeRuleThe FUIPasscodeRule to be added to the passcode policy.
-
Validate a passcode against the policy.
Declaration
Swift
public func validate(passcode: String) -> BoolParameters
passcodeThe 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() -> IntReturn 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: [String : Any]) -
convenience initializer using HCPms specific PasswordPolicy dictionary
Declaration
Swift
public init?(hcpmsPasscodePolicyDictionary dict: [String : Any])