public class PasswordPolicyControl extends AbstractControl implements RequestControl, ResponseControl
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 }
Modifier and Type | Class and Description |
---|---|
static class |
PasswordPolicyControl.Error
Enum for ppolicy errors.
|
Modifier and Type | Field and Description |
---|---|
static String |
OID
OID of this control.
|
logger
Constructor and Description |
---|
PasswordPolicyControl()
Default constructor.
|
PasswordPolicyControl(boolean critical)
Creates a new password policy control.
|
Modifier and Type | Method and Description |
---|---|
void |
decode(byte[] berValue)
Initializes this response control with the supplied BER encoded data.
|
byte[] |
encode()
Provides the BER encoding of this control.
|
PasswordPolicyControl.Error |
getError()
Returns the password policy error.
|
int |
getGraceAuthNsRemaining()
Returns the number of grace authentications remaining.
|
int |
getTimeBeforeExpiration()
Returns the time before expiration in seconds.
|
int |
hashCode()
Returns the hash code for this object.
|
void |
setError(PasswordPolicyControl.Error e)
Sets the password policy error.
|
void |
setGraceAuthNsRemaining(int count)
Sets the number of grace authentications remaining.
|
void |
setTimeBeforeExpiration(int time)
Sets the time before expiration in seconds.
|
String |
toString() |
equals, getCriticality, getOID
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getCriticality, getOID
public static final String OID
public PasswordPolicyControl()
public PasswordPolicyControl(boolean critical)
critical
- whether this control is criticalpublic int getTimeBeforeExpiration()
public void setTimeBeforeExpiration(int time)
time
- before expirationpublic int getGraceAuthNsRemaining()
public void setGraceAuthNsRemaining(int count)
count
- number of grace authentications remainingpublic PasswordPolicyControl.Error getError()
public void setError(PasswordPolicyControl.Error e)
e
- password policy errorpublic int hashCode()
AbstractControl
hashCode
in class AbstractControl
public byte[] encode()
RequestControl
encode
in interface RequestControl
public void decode(byte[] berValue)
ResponseControl
decode
in interface ResponseControl
berValue
- BER encoded response controlCopyright © 2019. All rights reserved.