Package org.ldaptive.auth.ext
Class EDirectoryAuthenticationResponseHandler
java.lang.Object
org.ldaptive.AbstractFreezable
org.ldaptive.auth.ext.EDirectoryAuthenticationResponseHandler
- All Implemented Interfaces:
AuthenticationResponseHandler,Freezable
public class EDirectoryAuthenticationResponseHandler
extends AbstractFreezable
implements AuthenticationResponseHandler
Attempts to parse the authentication response and set the account state using data associated with eDirectory. The
Authenticator should be configured to return 'passwordExpirationTime' and
'loginGraceRemaining' attributes, so they can be consumed by this handler. If this handler is assigned a warningPeriod, this handler will only emit warnings during that window before password expiration. Otherwise,
a warning is always emitted if passwordExpirationTime is set.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String[]Attributes needed to enforce password policy.private final ClockClock to calculate current date for comparison with expiration time.private final LoggerLogger for this class.private PeriodAmount of time before expiration to produce a warning. -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new edirectory authentication response handler.Creates a new edirectory authentication response handler.Creates a new edirectory authentication response handler. -
Method Summary
Modifier and TypeMethodDescriptionReturns the amount of time before expiration to produce a warning.voidhandle(AuthenticationResponse response) Handle the response from an ldap authentication.voidsetWarningPeriod(Period period) Sets the amount of time before expiration to produce a warning.toString()Methods inherited from class org.ldaptive.AbstractFreezable
assertMutable, freeze, freeze, freeze, isFrozen
-
Field Details
-
ATTRIBUTES
Attributes needed to enforce password policy. -
logger
Logger for this class. -
expirationClock
Clock to calculate current date for comparison with expiration time. -
warningPeriod
Amount of time before expiration to produce a warning.
-
-
Constructor Details
-
EDirectoryAuthenticationResponseHandler
EDirectoryAuthenticationResponseHandler(Clock clock) Creates a new edirectory authentication response handler.- Parameters:
clock- used to convert time before expiration to a datetime
-
EDirectoryAuthenticationResponseHandler
public EDirectoryAuthenticationResponseHandler()Creates a new edirectory authentication response handler. -
EDirectoryAuthenticationResponseHandler
Creates a new edirectory authentication response handler.- Parameters:
warning- length of time before expiration that should produce a warning
-
-
Method Details
-
handle
Description copied from interface:AuthenticationResponseHandlerHandle the response from an ldap authentication.- Specified by:
handlein interfaceAuthenticationResponseHandler- Parameters:
response- produced from an authentication
-
getWarningPeriod
Returns the amount of time before expiration to produce a warning.- Returns:
- warning period
-
setWarningPeriod
Sets the amount of time before expiration to produce a warning.- Parameters:
period- warning period
-
toString
-