public class AccountUsableResponseControl extends Control
ACCOUNT_USABLE_RESPONSE ::= CHOICE { is_available [0] INTEGER, -- Seconds before expiration -- is_not_available [1] MORE_INFO } MORE_INFO ::= SEQUENCE { inactive [0] BOOLEAN DEFAULT FALSE, reset [1] BOOLEAN DEFAULT FALSE, expired [2] BOOLEAN DEFAULT_FALSE, remaining_grace [3] INTEGER OPTIONAL, seconds_before_unlock [4] INTEGER OPTIONAL }
Modifier and Type | Field and Description |
---|---|
static ControlDecoder<AccountUsableResponseControl> |
DECODER
The Control Decoder that can be used to decode this control.
|
static byte |
TYPE_EXPIRED
The BER type to use for the MORE_INFO element that indicates that the
user's password is expired.
|
static byte |
TYPE_INACTIVE
The BER type to use for the MORE_INFO element that indicates that the
account has been inactivated.
|
static byte |
TYPE_MORE_INFO
The BER type to use for the MORE_INFO sequence when the account is not available.
|
static byte |
TYPE_REMAINING_GRACE_LOGINS
The BER type to use for the MORE_INFO element that provides the number of
remaining grace logins.
|
static byte |
TYPE_RESET
The BER type to use for the MORE_INFO element that indicates that the
password has been administratively reset.
|
static byte |
TYPE_SECONDS_BEFORE_EXPIRATION
The BER type to use for the seconds before expiration when the account is available.
|
static byte |
TYPE_SECONDS_BEFORE_UNLOCK
The BER type to use for the MORE_INFO element that indicates that the
password has been administratively reset.
|
Constructor and Description |
---|
AccountUsableResponseControl(boolean isCritical,
boolean isInactive,
boolean isReset,
boolean isExpired,
int remainingGraceLogins,
boolean isLocked,
int secondsBeforeUnlock)
Creates a new account usability response control that may be used to
indicate that the account is not available and provide information about
the underlying reason.
|
AccountUsableResponseControl(boolean isInactive,
boolean isReset,
boolean isExpired,
int remainingGraceLogins,
boolean isLocked,
int secondsBeforeUnlock)
Creates a new account usability response control that may be used to
indicate that the account is not available and provide information about
the underlying reason.
|
AccountUsableResponseControl(boolean isCritical,
int secondsBeforeExpiration)
Creates a new account usability response control that may be used to
indicate that the account is available and provide the number of seconds
until expiration.
|
AccountUsableResponseControl(int secondsBeforeExpiration)
Creates a new account usability response control that may be used to
indicate that the account is available and provide the number of seconds
until expiration.
|
Modifier and Type | Method and Description |
---|---|
int |
getRemainingGraceLogins()
Retrieves the number of remaining grace logins for the user.
|
int |
getSecondsBeforeExpiration()
Retrieves the length of time in seconds before the user's password expires.
|
int |
getSecondsBeforeUnlock()
Retrieves the length of time in seconds before the user's account is
automatically unlocked.
|
boolean |
isExpired()
Indicates whether the user's password is expired.
|
boolean |
isInactive()
Indicates whether the user's account has been inactivated by an
administrator.
|
boolean |
isLocked()
Indicates whether the user's account is locked for some reason.
|
boolean |
isReset()
Indicates whether the user's password has been administratively reset and
the user must change that password before any other operations will be
allowed.
|
boolean |
isUsable()
Indicates whether the associated user account is available for use.
|
void |
toString(StringBuilder buffer)
Appends a string representation of this control to the provided
buffer.
|
void |
writeValue(org.forgerock.opendj.io.Asn1Writer writer)
Writes this control's value to an ASN.1 writer.
|
getOid, isCritical, toString, write
public static final ControlDecoder<AccountUsableResponseControl> DECODER
public static final byte TYPE_SECONDS_BEFORE_EXPIRATION
public static final byte TYPE_MORE_INFO
public static final byte TYPE_INACTIVE
public static final byte TYPE_RESET
public static final byte TYPE_EXPIRED
public static final byte TYPE_REMAINING_GRACE_LOGINS
public static final byte TYPE_SECONDS_BEFORE_UNLOCK
public AccountUsableResponseControl(int secondsBeforeExpiration)
secondsBeforeExpiration
- The length of time in seconds until the
user's password expires, or -1 if the
user's password will not expire or the
expiration time is unknown.public AccountUsableResponseControl(boolean isCritical, int secondsBeforeExpiration)
isCritical
- Indicates whether this control should be
considered critical in processing the
request.secondsBeforeExpiration
- The length of time in seconds until the
user's password expires, or -1 if the
user's password will not expire or the
expiration time is unknown.public AccountUsableResponseControl(boolean isCritical, boolean isInactive, boolean isReset, boolean isExpired, int remainingGraceLogins, boolean isLocked, int secondsBeforeUnlock)
isCritical
- Indicates whether this control should be
considered critical in processing the
request.isInactive
- Indicates whether the user's account has been
inactivated by an administrator.isReset
- Indicates whether the user's password has
been reset by an administrator.isExpired
- Indicates whether the user's password is
expired.remainingGraceLogins
- The number of grace logins remaining. A
value of zero indicates that there are none
remaining. A value of -1 indicates that
grace login functionality is not enabled.isLocked
- Indicates whether the user's account is
currently locked out.secondsBeforeUnlock
- The length of time in seconds until the
account is unlocked. A value of -1 indicates
that the account will not be automatically
unlocked and must be reset by an
administrator.public AccountUsableResponseControl(boolean isInactive, boolean isReset, boolean isExpired, int remainingGraceLogins, boolean isLocked, int secondsBeforeUnlock)
isInactive
- Indicates whether the user's account has been
inactivated by an administrator.isReset
- Indicates whether the user's password has
been reset by an administrator.isExpired
- Indicates whether the user's password is
expired.remainingGraceLogins
- The number of grace logins remaining. A
value of zero indicates that there are none
remaining. A value of -1 indicates that
grace login functionality is not enabled.isLocked
- Indicates whether the user's account is
currently locked out.secondsBeforeUnlock
- The length of time in seconds until the
account is unlocked. A value of -1 indicates
that the account will not be automatically
unlocked and must be reset by an
administrator.public void writeValue(org.forgerock.opendj.io.Asn1Writer writer) throws IOException
Control
writeValue
in class Control
writer
- The ASN.1 writer to use.IOException
- If a problem occurs while writing to the
stream.public boolean isUsable()
true
if the associated user account is available, or
false
if not.public int getSecondsBeforeExpiration()
public boolean isInactive()
true
if the user's account has been inactivated by
an administrator, or false
if not.public boolean isReset()
true
if the user's password has been administratively
reset, or false
if not.public boolean isExpired()
true
if the user's password is expired, or
false
if not.public int getRemainingGraceLogins()
public boolean isLocked()
true
if the user's account is locked, or
false
if it is not.public int getSecondsBeforeUnlock()
public void toString(StringBuilder buffer)
Control
Copyright © 2010-2017 ForgeRock AS. All Rights Reserved.