public class ActiveDirectoryAuthenticationResponseHandler extends Object implements AuthenticationResponseHandler
expirationPeriod
, then the Authenticator
should be configured to return the 'pwdLastSet' attribute so it can be consumed by this handler. This will cause the
handler to emit a warning for the pwdLastSet value plus the expiration amount. The scope of that warning can be
further narrowed by providing a warningPeriod
. By default if the msDS-UserPasswordExpiryTimeComputed
attribute is found, expirationPeriod is ignored.Modifier and Type | Field and Description |
---|---|
static String[] |
ATTRIBUTES
Attributes needed to enforce password policy.
|
private Period |
expirationPeriod
Amount of time since a password was set until it will expire.
|
private Period |
warningPeriod
Amount of time before expiration to produce a warning.
|
Constructor and Description |
---|
ActiveDirectoryAuthenticationResponseHandler()
Default constructor.
|
ActiveDirectoryAuthenticationResponseHandler(Period warning)
Creates a new active directory authentication response handler.
|
ActiveDirectoryAuthenticationResponseHandler(Period expiration,
Period warning)
Creates a new active directory authentication response handler.
|
Modifier and Type | Method and Description |
---|---|
Period |
getExpirationPeriod()
Returns the amount of time since a password was set until it will expire.
|
Period |
getWarningPeriod()
Returns the amount of time before expiration to produce a warning.
|
void |
handle(AuthenticationResponse response)
Handle the response from an ldap authentication.
|
void |
setExpirationPeriod(Period period)
Sets amount of time since a password was set until it will expire.
|
void |
setWarningPeriod(Period period)
Sets the amount of time before expiration to produce a warning.
|
String |
toString() |
public static final String[] ATTRIBUTES
private Period expirationPeriod
private Period warningPeriod
public ActiveDirectoryAuthenticationResponseHandler()
public ActiveDirectoryAuthenticationResponseHandler(Period warning)
warning
- length of time before expiration that should produce a warningpublic ActiveDirectoryAuthenticationResponseHandler(Period expiration, Period warning)
expiration
- length of time that a password is validwarning
- length of time before expiration that should produce a warningpublic void handle(AuthenticationResponse response)
AuthenticationResponseHandler
handle
in interface AuthenticationResponseHandler
response
- produced from an authenticationpublic Period getExpirationPeriod()
public void setExpirationPeriod(Period period)
period
- expiration periodpublic Period getWarningPeriod()
public void setWarningPeriod(Period period)
period
- warning periodCopyright © 2003-2019 Virginia Tech. All Rights Reserved.