Class PasswordServiceDescriptor
- java.lang.Object
-
- com.jscape.inet.mft.management.descriptors.Configuration
-
- com.jscape.inet.mft.management.descriptors.ServiceDescriptor
-
- com.jscape.inet.mft.management.descriptors.PasswordServiceDescriptor
-
- All Implemented Interfaces:
com.jscape.util.db.IntVersioned,java.io.Serializable
public class PasswordServiceDescriptor extends ServiceDescriptor
Password compliance descriptor.- Author:
- Alex Usun
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classPasswordServiceDescriptor.PasswordNotCompliantExceptionstatic classPasswordServiceDescriptor.PasswordRepeatedExceptionstatic classPasswordServiceDescriptor.UsernameNotCompliantException
-
Constructor Summary
Constructors Constructor Description PasswordServiceDescriptor()PasswordServiceDescriptor(PasswordServiceDescriptor that)PasswordServiceDescriptor(java.lang.Integer minPasswordLength, java.lang.Long minPasswordAge, java.lang.Long maxPasswordAge, java.lang.Integer passwordExpirationNotificationDays, java.lang.Integer equalPasswordsHistoryLength, boolean uppercaseRequired, boolean lowercaseRequired, boolean numericRequired, boolean nonAlphaNumericRequired, boolean nonCompliantPasswordLoginDenied, boolean firstTimeLoginResetPasswordRequired, java.lang.String usernamePattern, int version)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidassertLengthValid(char[] password)voidassertLowercaseIncluded(char[] password)voidassertNonAlphaNumericIncluded(char[] password)voidassertNotRepeated(char[] password, Account account)voidassertNumericIncluded(char[] password)voidassertUppercaseIncluded(char[] password)voidassertUsernameCompliant(java.lang.String username)Configurationcopy()java.lang.IntegergetEqualPasswordsHistoryLength()Gets number of previous passwords that may not match new password.java.lang.LonggetMaxPasswordAge()Gets maximum password age in days.java.lang.LonggetMinPasswordAge()Gets minimum password age.java.lang.IntegergetMinPasswordLength()Gets minimum password length in characters.java.lang.IntegergetPasswordExpirationNotificationDays()Gets number of days before password expiration to send password change notification.java.lang.StringgetUsernamePattern()Gets a regular expression to enforce username requirements.booleanisFirstTimeLoginResetPasswordRequired()Gets whether users forced to reset password at first time that they logs in.booleanisLowercaseRequired()Gets whether lowercase letters are required in password.booleanisNonAlphaNumericRequired()Gets whether non-alpha-numeric characters are required in password.booleanisNonCompliantPasswordLoginDenied()Gets whether login is denied if user uses a non-compliant password.booleanisNumericRequired()Gets whether numeric values are required in password.booleanisUppercaseRequired()Gets whether uppercase letters are required in password.voidsetEqualPasswordsHistoryLength(java.lang.Integer value)Sets number of previous passwords that may not match new password.voidsetFirstTimeLoginResetPasswordRequired(boolean value)Sets whether users forced to reset password at first time that they logs in.voidsetLowercaseRequired(boolean value)Sets whether lowercase letters are required in password.voidsetMaxPasswordAge(java.lang.Long value)Sets maximum password age in days.voidsetMinPasswordAge(java.lang.Long value)Sets minimum password age.voidsetMinPasswordLength(java.lang.Integer value)Sets minimum password length in characters.voidsetNonAlphaNumericRequired(boolean value)Sets whether non-alpha-numeric characters are required in password.voidsetNonCompliantPasswordLoginDenied(boolean value)Sets whether login is denied if user uses a non-compliant password.voidsetNumericRequired(boolean value)Sets whether numeric values are required in password.voidsetPasswordExpirationNotificationDays(java.lang.Integer value)Sets number of days before password expiration to send password change notification.voidsetUppercaseRequired(boolean value)Sets whether uppercase letters are required in password.voidsetUsernamePattern(java.lang.String value)Sets a regular expression to enforce username requirements.java.lang.StringtoString()-
Methods inherited from class com.jscape.inet.mft.management.descriptors.Configuration
getVersion, setVersion
-
-
-
-
Constructor Detail
-
PasswordServiceDescriptor
public PasswordServiceDescriptor(java.lang.Integer minPasswordLength, java.lang.Long minPasswordAge, java.lang.Long maxPasswordAge, java.lang.Integer passwordExpirationNotificationDays, java.lang.Integer equalPasswordsHistoryLength, boolean uppercaseRequired, boolean lowercaseRequired, boolean numericRequired, boolean nonAlphaNumericRequired, boolean nonCompliantPasswordLoginDenied, boolean firstTimeLoginResetPasswordRequired, java.lang.String usernamePattern, int version)
-
PasswordServiceDescriptor
public PasswordServiceDescriptor(PasswordServiceDescriptor that)
-
PasswordServiceDescriptor
public PasswordServiceDescriptor()
-
-
Method Detail
-
getMinPasswordLength
public java.lang.Integer getMinPasswordLength()
Gets minimum password length in characters.- Returns:
- minimum password length
-
setMinPasswordLength
public void setMinPasswordLength(java.lang.Integer value)
Sets minimum password length in characters.- Parameters:
value- minimum password length
-
getMinPasswordAge
public java.lang.Long getMinPasswordAge()
Gets minimum password age.- Returns:
- maximum password age
-
setMinPasswordAge
public void setMinPasswordAge(java.lang.Long value)
Sets minimum password age.- Parameters:
value- maximum password age
-
getMaxPasswordAge
public java.lang.Long getMaxPasswordAge()
Gets maximum password age in days.- Returns:
- maximum password age
-
setMaxPasswordAge
public void setMaxPasswordAge(java.lang.Long value)
Sets maximum password age in days.- Parameters:
value- maximum password age
-
getPasswordExpirationNotificationDays
public java.lang.Integer getPasswordExpirationNotificationDays()
Gets number of days before password expiration to send password change notification.- Returns:
- number of days
-
setPasswordExpirationNotificationDays
public void setPasswordExpirationNotificationDays(java.lang.Integer value)
Sets number of days before password expiration to send password change notification.- Parameters:
value- number of days
-
getEqualPasswordsHistoryLength
public java.lang.Integer getEqualPasswordsHistoryLength()
Gets number of previous passwords that may not match new password.- Returns:
- number of previous passwords
-
setEqualPasswordsHistoryLength
public void setEqualPasswordsHistoryLength(java.lang.Integer value)
Sets number of previous passwords that may not match new password.- Parameters:
value- number of previous passwords
-
isUppercaseRequired
public boolean isUppercaseRequired()
Gets whether uppercase letters are required in password.- Returns:
trueif uppercase letters are required
-
setUppercaseRequired
public void setUppercaseRequired(boolean value)
Sets whether uppercase letters are required in password.- Parameters:
value- iftrueuppercase letters are required;falseotherwise
-
isLowercaseRequired
public boolean isLowercaseRequired()
Gets whether lowercase letters are required in password.- Returns:
trueif lowercase letters are required
-
setLowercaseRequired
public void setLowercaseRequired(boolean value)
Sets whether lowercase letters are required in password.- Parameters:
value- iftruelowercase letters are required;falseotherwise
-
isNumericRequired
public boolean isNumericRequired()
Gets whether numeric values are required in password.- Returns:
trueif numeric values are required
-
setNumericRequired
public void setNumericRequired(boolean value)
Sets whether numeric values are required in password.- Parameters:
value- iftruenumeric values are required;falseotherwise
-
isNonAlphaNumericRequired
public boolean isNonAlphaNumericRequired()
Gets whether non-alpha-numeric characters are required in password.- Returns:
trueif non-alpha-numeric characters are required
-
setNonAlphaNumericRequired
public void setNonAlphaNumericRequired(boolean value)
Sets whether non-alpha-numeric characters are required in password.- Parameters:
value- iftruenon-alpha-numeric characters are required;falseotherwise
-
isNonCompliantPasswordLoginDenied
public boolean isNonCompliantPasswordLoginDenied()
Gets whether login is denied if user uses a non-compliant password.- Returns:
trueif login is denied
-
setNonCompliantPasswordLoginDenied
public void setNonCompliantPasswordLoginDenied(boolean value)
Sets whether login is denied if user uses a non-compliant password.- Parameters:
value- iftruelogin is denied;falseotherwise
-
isFirstTimeLoginResetPasswordRequired
public boolean isFirstTimeLoginResetPasswordRequired()
Gets whether users forced to reset password at first time that they logs in.- Returns:
trueforce to reset password
-
setFirstTimeLoginResetPasswordRequired
public void setFirstTimeLoginResetPasswordRequired(boolean value)
Sets whether users forced to reset password at first time that they logs in.- Parameters:
value- iftrueforce to reset password;falseotherwise
-
getUsernamePattern
public java.lang.String getUsernamePattern()
Gets a regular expression to enforce username requirements.- Returns:
- regular expression
-
setUsernamePattern
public void setUsernamePattern(java.lang.String value)
Sets a regular expression to enforce username requirements.- Parameters:
value- regular expression
-
assertLengthValid
public void assertLengthValid(char[] password) throws PasswordServiceDescriptor.PasswordNotCompliantException
-
assertUppercaseIncluded
public void assertUppercaseIncluded(char[] password) throws PasswordServiceDescriptor.PasswordNotCompliantException
-
assertLowercaseIncluded
public void assertLowercaseIncluded(char[] password) throws PasswordServiceDescriptor.PasswordNotCompliantException
-
assertNumericIncluded
public void assertNumericIncluded(char[] password) throws PasswordServiceDescriptor.PasswordNotCompliantException
-
assertNonAlphaNumericIncluded
public void assertNonAlphaNumericIncluded(char[] password) throws PasswordServiceDescriptor.PasswordNotCompliantException
-
assertNotRepeated
public void assertNotRepeated(char[] password, Account account) throws PasswordServiceDescriptor.PasswordRepeatedException
-
assertUsernameCompliant
public void assertUsernameCompliant(java.lang.String username) throws PasswordServiceDescriptor.UsernameNotCompliantException
-
copy
public Configuration copy()
- Specified by:
copyin classConfiguration
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-