Class PasscodePolicy
-
- All Implemented Interfaces:
@Serializable() public final class PasscodePolicy extends PredefinedPolicy
Represents the passcode policy.
-
-
Field Summary
Fields Modifier and Type Field Description private final Booleanenabledprivate final IntegerlockTimeoutprivate final IntegerminLengthprivate final BooleanlowerRequiredprivate final BooleanupperRequiredprivate final BooleandigitRequiredprivate final BooleanspecialCharRequiredprivate final BooleanfingerPrintEnabledprivate final IntegeruniqueCharNumberprivate final IntegerretryLimitprivate final BooleandigitOnlyprivate final BooleanlocalizingDigitsToLatinprivate final IntegerexpireInDaysprivate final BooleandefaultPasswordEnabledprivate final IntegerhistoryCount
-
Constructor Summary
Constructors Constructor Description PasscodePolicy(Boolean enabled, Integer lockTimeout, Integer minLength, Boolean lowerRequired, Boolean upperRequired, Boolean digitRequired, Boolean specialCharRequired, Boolean fingerPrintEnabled, Integer uniqueCharNumber, Integer retryLimit, Boolean digitOnly, Boolean localizingDigitsToLatin, Integer expireInDays, Boolean defaultPasswordEnabled, Integer historyCount)
-
Method Summary
Modifier and Type Method Description final BooleangetEnabled()Whether the passcode policy is enabled or not. final IntegergetLockTimeout()The app lock time out setting, in seconds. final IntegergetMinLength()The minimum length the passcode. final BooleangetLowerRequired()Whether the passcode requires lower case letters. final BooleangetUpperRequired()Whether the passcode requires upper case letters. final BooleangetDigitRequired()Whether the passcode requires digital numbers. final BooleangetSpecialCharRequired()Whether the passcode requires special letters. final BooleangetFingerPrintEnabled()Whether the biometric is enabled. final IntegergetUniqueCharNumber()How many unique letters are required in the passcode. final IntegergetRetryLimit()final BooleangetDigitOnly()Whether the passcode can only contain digital numbers. final BooleangetLocalizingDigitsToLatin()final IntegergetExpireInDays()final BooleangetDefaultPasswordEnabled()When this is 'true', even the passcode policy is enabled, the passcode creation process can still be skipped for the primary user. final IntegergetHistoryCount()The passcode history count which cannot be reused. StringtoString()StringtoStringWithDefaultValues()final BooleancheckLower(CharArray code)final BooleancheckUpper(CharArray code)final BooleancheckDigit(CharArray code)final BooleancheckDigitalOnly(CharArray code)final BooleancheckSpecial(CharArray code)final BooleancheckUniqueChars(CharArray code)final CharArraylocalizeDigitsToLatin(CharArray code)final BooleancanSkipPasscodeCreation()Checks if the passcode creation can be skipped on this policy. final BooleanvalidatePasscode(CharArray code, List<String> history, Function1<String, String> algorithm)Validates the given code with this passcode policy. final static PasscodePolicycreateFromJsonString(String jsonString)-
Methods inherited from class com.sap.cloud.mobile.foundation.settings.policies.PredefinedPolicy
getKeyPath -
Methods inherited from class com.sap.cloud.mobile.foundation.settings.policies.AbstractSettingsEntity
toJsonString -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
PasscodePolicy
PasscodePolicy(Boolean enabled, Integer lockTimeout, Integer minLength, Boolean lowerRequired, Boolean upperRequired, Boolean digitRequired, Boolean specialCharRequired, Boolean fingerPrintEnabled, Integer uniqueCharNumber, Integer retryLimit, Boolean digitOnly, Boolean localizingDigitsToLatin, Integer expireInDays, Boolean defaultPasswordEnabled, Integer historyCount)
-
-
Method Detail
-
getEnabled
final Boolean getEnabled()
Whether the passcode policy is enabled or not.
-
getLockTimeout
final Integer getLockTimeout()
The app lock time out setting, in seconds.
-
getMinLength
final Integer getMinLength()
The minimum length the passcode.
-
getLowerRequired
final Boolean getLowerRequired()
Whether the passcode requires lower case letters.
-
getUpperRequired
final Boolean getUpperRequired()
Whether the passcode requires upper case letters.
-
getDigitRequired
final Boolean getDigitRequired()
Whether the passcode requires digital numbers.
-
getSpecialCharRequired
final Boolean getSpecialCharRequired()
Whether the passcode requires special letters.
-
getFingerPrintEnabled
final Boolean getFingerPrintEnabled()
Whether the biometric is enabled.
-
getUniqueCharNumber
final Integer getUniqueCharNumber()
How many unique letters are required in the passcode.
-
getRetryLimit
final Integer getRetryLimit()
-
getDigitOnly
final Boolean getDigitOnly()
Whether the passcode can only contain digital numbers.
-
getLocalizingDigitsToLatin
final Boolean getLocalizingDigitsToLatin()
-
getExpireInDays
final Integer getExpireInDays()
-
getDefaultPasswordEnabled
final Boolean getDefaultPasswordEnabled()
When this is 'true', even the passcode policy is enabled, the passcode creation process can still be skipped for the primary user.
-
getHistoryCount
final Integer getHistoryCount()
The passcode history count which cannot be reused. When it's less than or equal to 0, it means the passcode history will NOT be checked.
-
toString
String toString()
-
toStringWithDefaultValues
String toStringWithDefaultValues()
-
checkLower
final Boolean checkLower(CharArray code)
-
checkUpper
final Boolean checkUpper(CharArray code)
-
checkDigit
final Boolean checkDigit(CharArray code)
-
checkDigitalOnly
final Boolean checkDigitalOnly(CharArray code)
-
checkSpecial
final Boolean checkSpecial(CharArray code)
-
checkUniqueChars
final Boolean checkUniqueChars(CharArray code)
-
localizeDigitsToLatin
final CharArray localizeDigitsToLatin(CharArray code)
-
canSkipPasscodeCreation
final Boolean canSkipPasscodeCreation()
Checks if the passcode creation can be skipped on this policy.
-
validatePasscode
final Boolean validatePasscode(CharArray code, List<String> history, Function1<String, String> algorithm)
Validates the given code with this passcode policy.
- Parameters:
code- the passcodehistory- The passcode history which contains the encrypted passcode hashes.algorithm- The encryption algorithm which was applied before saving the passcode into local database.
-
createFromJsonString
final static PasscodePolicy createFromJsonString(String jsonString)
-
-
-
-