Interface PasswordPolicyResponse
-
- All Superinterfaces:
Control
- All Known Implementing Classes:
PasswordPolicyResponseImpl
public interface PasswordPolicyResponse extends Control
The PasswordPolicy response. It contains information about the error if we had one when injecting a bad password into the server. Here is the controlValue ASN.1 grammar:PasswordPolicyResponseValue ::= SEQUENCE { warning [0] CHOICE { timeBeforeExpiration [0] INTEGER (0 .. maxInt), graceAuthNsRemaining [1] INTEGER (0 .. maxInt) } OPTIONAL, error [1] ENUMERATED { passwordExpired (0), accountLocked (1), changeAfterReset (2), passwordModNotAllowed (3), mustSupplyOldPassword (4), insufficientPasswordQuality (5), passwordTooShort (6), passwordTooYoung (7), passwordInHistory (8) } OPTIONAL } }
- Version:
- $Rev$, $Date$
- Author:
- Apache Directory Project
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
getGraceAuthNRemaining()
Returns the number of possible attempts on the password before it's locked.PasswordPolicyErrorEnum
getPasswordPolicyError()
Returns the password policy error.int
getTimeBeforeExpiration()
Returns the time before expiration.void
setGraceAuthNRemaining(int graceAuthNRemaining)
Sets the number of remaining wrong authentication for this password.void
setPasswordPolicyError(PasswordPolicyErrorEnum ppolicyError)
Sets the PasswordPolicy error.void
setTimeBeforeExpiration(int timeBeforeExpiration)
Set a date of expiration for the password.-
Methods inherited from interface org.apache.directory.api.ldap.model.message.Control
getOid, isCritical, setCritical
-
-
-
-
Field Detail
-
OID
static final String OID
the password policy response control- See Also:
- Constant Field Values
-
-
Method Detail
-
getTimeBeforeExpiration
int getTimeBeforeExpiration()
Returns the time before expiration. Will return -1 if this warning was not present in the response.- Returns:
- The time before expiration of the password, or -1 if not set
-
setTimeBeforeExpiration
void setTimeBeforeExpiration(int timeBeforeExpiration)
Set a date of expiration for the password.- Parameters:
timeBeforeExpiration
- The time before the password will expire
-
getGraceAuthNRemaining
int getGraceAuthNRemaining()
Returns the number of possible attempts on the password before it's locked. Will return -1 if this warning was not present in the response.- Returns:
- The number of possible attempts on the password before it's locked
-
setGraceAuthNRemaining
void setGraceAuthNRemaining(int graceAuthNRemaining)
Sets the number of remaining wrong authentication for this password.- Parameters:
graceAuthNRemaining
- The number of remaining attempts
-
getPasswordPolicyError
PasswordPolicyErrorEnum getPasswordPolicyError()
Returns the password policy error.- Returns:
- The PasswordPolicyErrorEnum representing the error
-
setPasswordPolicyError
void setPasswordPolicyError(PasswordPolicyErrorEnum ppolicyError)
Sets the PasswordPolicy error.- Parameters:
ppolicyError
- The PasswordPolicyErrorEnum representing the error
-
-