Package org.ldaptive.auth.ext
Class PasswordPolicyAuthenticationResponseHandler
- java.lang.Object
-
- org.ldaptive.auth.ext.PasswordPolicyAuthenticationResponseHandler
-
- All Implemented Interfaces:
AuthenticationResponseHandler
public class PasswordPolicyAuthenticationResponseHandler extends Object implements AuthenticationResponseHandler
Attempts to parse the authentication response message and set the account state using data associated with a password policy control.
-
-
Field Summary
Fields Modifier and Type Field Description private Clock
expirationClock
Clock to convert time before expiration seconds to a datetime.
-
Constructor Summary
Constructors Constructor Description PasswordPolicyAuthenticationResponseHandler()
Creates a new password policy authentication response handler.PasswordPolicyAuthenticationResponseHandler(Clock clock)
Creates a new password policy authentication response handler.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private ZonedDateTime
getTimeBeforeExpiration(PasswordPolicyControl ppc)
Returns a zoned date time for the time before expiration on the supplied control.void
handle(AuthenticationResponse response)
Handle the response from an ldap authentication.
-
-
-
Field Detail
-
expirationClock
private final Clock expirationClock
Clock to convert time before expiration seconds to a datetime.
-
-
Constructor Detail
-
PasswordPolicyAuthenticationResponseHandler
public PasswordPolicyAuthenticationResponseHandler()
Creates a new password policy authentication response handler.
-
PasswordPolicyAuthenticationResponseHandler
PasswordPolicyAuthenticationResponseHandler(Clock clock)
Creates a new password policy authentication response handler.- Parameters:
clock
- used to convert time before expiration to a datetime
-
-
Method Detail
-
handle
public void handle(AuthenticationResponse response)
Description copied from interface:AuthenticationResponseHandler
Handle the response from an ldap authentication.- Specified by:
handle
in interfaceAuthenticationResponseHandler
- Parameters:
response
- produced from an authentication
-
getTimeBeforeExpiration
private ZonedDateTime getTimeBeforeExpiration(PasswordPolicyControl ppc)
Returns a zoned date time for the time before expiration on the supplied control.- Parameters:
ppc
- to inspect- Returns:
- date time or null
-
-