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.
|
private static class |
PasswordPolicyControl.ErrorHandler
Parse handler implementation for the error.
|
private static class |
PasswordPolicyControl.GraceAuthnsRemainingHandler
Parse handler implementation for the grace authns remaining.
|
private static class |
PasswordPolicyControl.TimeBeforeExpirationHandler
Parse handler implementation for the time before expiration.
|
| Modifier and Type | Field and Description |
|---|---|
private PasswordPolicyControl.Error |
error
Ppolicy error.
|
private int |
graceAuthNsRemaining
Ppolicy warning.
|
private static int |
HASH_CODE_SEED
hash code seed.
|
static String |
OID
OID of this control.
|
private int |
timeBeforeExpiration
Ppolicy warning.
|
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.
|
boolean |
equals(Object o) |
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() |
getCriticality, getOIDclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetCriticality, getOIDpublic static final String OID
private static final int HASH_CODE_SEED
private int timeBeforeExpiration
private int graceAuthNsRemaining
private PasswordPolicyControl.Error error
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 boolean equals(Object o)
equals in class AbstractControlpublic int hashCode()
AbstractControlhashCode in class AbstractControlpublic byte[] encode()
RequestControlencode in interface RequestControlpublic void decode(byte[] berValue)
ResponseControldecode in interface ResponseControlberValue - BER encoded response controlCopyright © 2003-2019 Virginia Tech. All Rights Reserved.