public class LdapPasswordPolicyEnforcer extends AbstractPasswordPolicyEnforcer
| Modifier and Type | Field and Description |
|---|---|
protected String |
dateAttribute
The attribute that contains the date the password will expire or last password change
|
protected String |
dateFormat
The format of the date in DateAttribute
|
protected String |
validDaysAttribute
The attribute that contains the number of days the user's password is valid
|
protected Boolean |
warnAll
Disregard WarnPeriod and warn all users of password expiration
|
protected String |
warningDaysAttribute
The attribute that contains the user's warning days
|
logger| Constructor and Description |
|---|
LdapPasswordPolicyEnforcer() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet() |
long |
getNumberOfDaysToPasswordExpirationDate(String userId) |
void |
setContextSource(org.springframework.ldap.core.ContextSource contextSource)
Method to set the data source and generate a LDAPTemplate.
|
void |
setDateAttribute(String dateAttribute) |
void |
setDateFormat(String dateFormat) |
void |
setFilter(String filter) |
void |
setIgnorePartialResultException(boolean ignorePartialResultException) |
void |
setMaxNumberResults(int maxNumberResults) |
void |
setNoWarnAttribute(String noWarnAttribute) |
void |
setNoWarnValues(List<String> noWarnValues) |
void |
setScope(int scope) |
void |
setSearchBase(String searchBase) |
void |
setTimeout(int timeout) |
void |
setValidDays(int validDays) |
void |
setValidDaysAttribute(String validDaysAttribute) |
void |
setWarnAll(Boolean warnAll) |
void |
setWarningDays(int warningDays) |
void |
setWarningDaysAttribute(String warnDays) |
protected String dateAttribute
protected String dateFormat
protected String validDaysAttribute
protected Boolean warnAll
protected String warningDaysAttribute
public long getNumberOfDaysToPasswordExpirationDate(String userId) throws LdapPasswordPolicyEnforcementException
userId - The unique ID of the userLdapPasswordPolicyEnforcementExceptionpublic void setContextSource(org.springframework.ldap.core.ContextSource contextSource)
dataSource - the data source to use.public void setDateAttribute(String dateAttribute)
DateAttribute - The DateAttribute to set.public void setDateFormat(String dateFormat)
dateFormat - String to pass to SimpleDateFormat() that describes the
date in the ExpireDateAttribute. This parameter is required.public void setFilter(String filter)
filter - The LDAP filter to set.public void setIgnorePartialResultException(boolean ignorePartialResultException)
public void setMaxNumberResults(int maxNumberResults)
maxNumberResults - The maxNumberResults to set.public void setNoWarnAttribute(String noWarnAttribute)
noWarnAttribute - The noWarnAttribute to set.public void setNoWarnValues(List<String> noWarnValues)
noWarnAttribute - The noWarnAttribute to set.public void setScope(int scope)
filter - The scope to set.public void setSearchBase(String searchBase)
searchBase - The searchBase to set.public void setTimeout(int timeout)
timeout - The timeout to set.public void setValidDays(int validDays)
validDays - Number of days that a password is valid for.
Used as a default if DateAttribute is not set or is not found in the LDAP resultspublic void setValidDaysAttribute(String validDaysAttribute)
ValidDaysAttribute - The ValidDaysAttribute to set.public void setWarnAll(Boolean warnAll)
warnAll - Disregard warningPeriod and warn all users of password expiration.public void setWarningDays(int warningDays)
warningDays - Number of days before expiration that a warning
message is displayed to set. Used as a default if warningDaysAttribute is
not set or is not found in the LDAP results. This parameter is required.public void setWarningDaysAttribute(String warnDays)
WarningDaysAttribute - The WarningDaysAttribute to set.Copyright © 2004-2012 Jasig. All Rights Reserved.