Class ModifiablePasswordPolicyStateJSON
java.lang.Object
com.unboundid.ldap.sdk.unboundidds.ModifiablePasswordPolicyStateJSON
- All Implemented Interfaces:
Serializable
@NotMutable
@ThreadSafety(level=COMPLETELY_THREADSAFE)
public final class ModifiablePasswordPolicyStateJSON
extends Object
implements Serializable
This class provides support for reading and decoding the value of the
ds-pwp-modifiable-state-json virtual attribute, which may be used to
manipulate elements of a user's password policy state. The value of this
attribute is a JSON object, and using an LDAP modify operation to replace the
value with a new JSON object will cause the associated state elements to be
updated in the user entry. The
ModifiablePasswordPolicyStateJSONBuilder class can be used to
construct values to more easily manipulate that state. Note that the
PasswordPolicyStateExtendedRequest class provides a mechanism for
manipulating an even broader range of password policy state elements.
NOTE: This class, and other classes within the
com.unboundid.ldap.sdk.unboundidds package structure, are only
supported for use against Ping Identity, UnboundID, and
Nokia/Alcatel-Lucent 8661 server products. These classes provide support
for proprietary functionality or for external specifications that are not
considered stable or mature enough to be guaranteed to work in an
interoperable way with other types of LDAP servers.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe name of the operational attribute that holds a JSON representation of the modifiable elements in a user's password policy state. -
Constructor Summary
ConstructorsConstructorDescriptionModifiablePasswordPolicyStateJSON(JSONObject modifiablePasswordPolicyStateObject) Creates a new instance of this object from the provided JSON object. -
Method Summary
Modifier and TypeMethodDescriptionAttempts to retrieve and decode the modifiable password policy state information from the provided user entry.get(LDAPInterface connection, String userDN) Attempts to retrieve and decode the modifiable password policy state information for the specified user.Retrieves a timestamp that indicates the time the user's account became (or will become) active.Retrieves a timestamp that indicates the time the user's account will (or did) expire.Retrieves the value of a flag that indicates whether the user's account has been administratively disabled.Retrieves the value of a flag that indicates whether the user account is currently locked as a result of too many failed authentication attempts.Retrieves the JSON object that contains the encoded modifiable password policy state information.Retrieves the value of a flag that indicates whether the user must change their password before they will be allowed to perform any other operations in the server.Retrieves a timestamp that indicates the time the user's password was last changed.Retrieves a timestamp that indicates the time the user was first warned about an upcoming password expiration.toString()Retrieves a string representation of the password policy state information.
-
Field Details
-
MODIFIABLE_PASSWORD_POLICY_STATE_JSON_ATTRIBUTE
The name of the operational attribute that holds a JSON representation of the modifiable elements in a user's password policy state.- See Also:
-
-
Constructor Details
-
ModifiablePasswordPolicyStateJSON
Creates a new instance of this object from the provided JSON object.- Parameters:
modifiablePasswordPolicyStateObject- The JSON object containing the encoded modifiable password policy state.
-
-
Method Details
-
get
@Nullable public static ModifiablePasswordPolicyStateJSON get(@NotNull LDAPInterface connection, @NotNull String userDN) throws LDAPException Attempts to retrieve and decode the modifiable password policy state information for the specified user.- Parameters:
connection- The connection to use to communicate with the server. It must not benull, and it must be established and authenticated as an account with permission to access the target user's password policy state information.userDN- The DN of the user for whom to retrieve the password policy state. It must not benull.- Returns:
- The modifiable password policy state information for the specified
user, or
nullbecause no modifiable password policy state information is available for the user. - Throws:
LDAPException- If a problem is encountered while trying to retrieve the user's entry or decode the modifiable password policy state JSON object.
-
get
@Nullable public static ModifiablePasswordPolicyStateJSON get(@NotNull Entry userEntry) throws LDAPException Attempts to retrieve and decode the modifiable password policy state information from the provided user entry.- Parameters:
userEntry- The entry for the user for whom to obtain the modifiable password policy state information. It must not benull.- Returns:
- The modifiable password policy state information from the provided
user entry, or
nullif no modifiable password policy state information is available for the user. - Throws:
LDAPException- If a problem is encountered while trying to decode the modifiable password policy state JSON object.
-
getModifiablePasswordPolicyStateJSONObject
Retrieves the JSON object that contains the encoded modifiable password policy state information.- Returns:
- The JSON object that contains the encoded modifiable password policy state information.
-
getPasswordChangedTime
Retrieves a timestamp that indicates the time the user's password was last changed.- Returns:
- A non-negative value that represents the password changed time in
number of milliseconds since the epoch (the same format used by
System.currentTimeMillis), a negative value if the field was present with a JSON null value (indicating that the user doesn't have a password changed time), ornullif the field was not included in the JSON object.
-
getAccountIsDisabled
Retrieves the value of a flag that indicates whether the user's account has been administratively disabled.- Returns:
Boolean.TRUEif the account has been administratively disabled,Boolean.FALSEif the account has not been administratively disabled, ornullif this flag was not included in the password policy state JSON object.
-
getAccountActivationTime
Retrieves a timestamp that indicates the time the user's account became (or will become) active.- Returns:
- A non-negative value that represents the account activation time
in number of milliseconds since the epoch (the same format used by
System.currentTimeMillis), a negative value if the field was present with a JSON null value (indicating that the user doesn't have an account activation time), ornullif the field was not included in the JSON object.
-
getAccountExpirationTime
Retrieves a timestamp that indicates the time the user's account will (or did) expire.- Returns:
- A non-negative value that represents the account expiration time
in number of milliseconds since the epoch (the same format used by
System.currentTimeMillis), a negative value if the field was present with a JSON null value (indicating that the user doesn't have an account expiration time), ornullif the field was not included in the JSON object.
-
getAccountIsFailureLocked
Retrieves the value of a flag that indicates whether the user account is currently locked as a result of too many failed authentication attempts.- Returns:
Boolean.TRUEif the user account is locked as a result of too many failed authentication attempts,Boolean.FALSEif the user account is not locked because of too many failed authentication attempts, ornullif this flag was not included in the password policy state JSON object.
-
getPasswordExpirationWarnedTime
Retrieves a timestamp that indicates the time the user was first warned about an upcoming password expiration.- Returns:
- A non-negative value that represents the password expiration
warned time in number of milliseconds since the epoch (the same
format used by
System.currentTimeMillis), a negative value if the field was present with a JSON null value (indicating that the user doesn't have an password expiration warned time), ornullif the field was not included in the JSON object.
-
getMustChangePassword
Retrieves the value of a flag that indicates whether the user must change their password before they will be allowed to perform any other operations in the server.- Returns:
Boolean.TRUEif the user must change their password before they will be allowed to perform any other operations in the server,Boolean.FALSEif the user is not required to change their password, ornullif this flag was not included in the password policy state JSON object.
-
toString
Retrieves a string representation of the password policy state information.
-