Class PasswordUpdateBehaviorRequestControl
- java.lang.Object
-
- com.unboundid.ldap.sdk.Control
-
- com.unboundid.ldap.sdk.unboundidds.controls.PasswordUpdateBehaviorRequestControl
-
- All Implemented Interfaces:
java.io.Serializable
@NotMutable @ThreadSafety(level=COMPLETELY_THREADSAFE) public final class PasswordUpdateBehaviorRequestControl extends Control
This class provides an implementation of a request control that can be included in an add request, modify request, or password modify extended request to control the way the server should behave when performing a password change. The requester must have the password-reset privilege.
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.
This request control has an OID of 1.3.6.1.4.1.30221.2.5.51. The criticality may be either true or false. It must have a value, and the value should have the following encoding:PasswordUpdateBehaviorRequest ::= SEQUENCE { isSelfChange [0] BOOLEAN OPTIONAL, allowPreEncodedPassword [1] BOOLEAN OPTIONAL, skipPasswordValidation [2] BOOLEAN OPTIONAL, ignorePasswordHistory [3] BOOLEAN OPTIONAL, ignoreMinimumPasswordAge [4] BOOLEAN OPTIONAL, passwordStorageScheme [5] OCTET STRING OPTIONAL, mustChangePassword [6] BOOLEAN OPTIONAL, ... }
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
PASSWORD_UPDATE_BEHAVIOR_REQUEST_OID
The OID (1.3.6.1.4.1.30221.2.5.51) for the password update behavior request control.
-
Constructor Summary
Constructors Constructor Description PasswordUpdateBehaviorRequestControl(Control control)
Creates a new password update behavior request control that is decoded from the provided generic control.PasswordUpdateBehaviorRequestControl(PasswordUpdateBehaviorRequestControlProperties properties, boolean isCritical)
Creates a new password update behavior request control with the provided information.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static PasswordUpdateBehaviorRequestControl
decodeJSONControl(JSONObject controlObject, boolean strict)
Attempts to decode the provided object as a JSON representation of a password update behavior control.java.lang.Boolean
getAllowPreEncodedPassword()
Indicates whether this control should override the value of theallow-pre-encoded-passwords
configuration property for the target user's password policy, and if so, what the overridden value should be.java.lang.String
getControlName()
Retrieves the user-friendly name for this control, if available.java.lang.Boolean
getIgnoreMinimumPasswordAge()
Indicates whether this control should override the server's normal behavior with regard to checking the minimum password age, and if so, what the overridden behavior should be.java.lang.Boolean
getIgnorePasswordHistory()
Indicates whether this control should override the server's normal behavior with regard to checking the password history for any new passwords included in the password update, and if so, what the overridden behavior should be.java.lang.Boolean
getIsSelfChange()
Indicates whether this control should override the server's automatic classification of the password update as a self change or an administrative reset, and if so, what the overridden value should be.java.lang.Boolean
getMustChangePassword()
Indicates whether this control should override the server's normal behavior with regard to requiring a password change, and if so, what that behavior should be.java.lang.String
getPasswordStorageScheme()
Indicates whether this control should override the server's normal behavior with regard to selecting the password storage scheme to use to encode new password values, and if so, which password storage scheme should be used.java.lang.Boolean
getSkipPasswordValidation()
Indicates whether this control should override the server's normal behavior with regard to invoking password validators for any new passwords included in the password update, and if so, what the overridden behavior should be.JSONObject
toJSONControl()
Retrieves a representation of this password update behavior request control as a JSON object.void
toString(java.lang.StringBuilder buffer)
Appends a string representation of this LDAP control to the provided buffer.-
Methods inherited from class com.unboundid.ldap.sdk.Control
decode, decode, decodeControls, decodeJSONControl, deregisterDecodeableControl, encode, encodeControls, equals, getOID, getValue, hashCode, hasValue, isCritical, readFrom, registerDecodeableControl, registerDecodeableControl, toString, writeTo
-
-
-
-
Field Detail
-
PASSWORD_UPDATE_BEHAVIOR_REQUEST_OID
@NotNull public static final java.lang.String PASSWORD_UPDATE_BEHAVIOR_REQUEST_OID
The OID (1.3.6.1.4.1.30221.2.5.51) for the password update behavior request control.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
PasswordUpdateBehaviorRequestControl
public PasswordUpdateBehaviorRequestControl(@NotNull PasswordUpdateBehaviorRequestControlProperties properties, boolean isCritical)
Creates a new password update behavior request control with the provided information.- Parameters:
properties
- The set of properties to use for the request control. It must not benull
.isCritical
- Indicates whether the control should be considered critical.
-
PasswordUpdateBehaviorRequestControl
public PasswordUpdateBehaviorRequestControl(@NotNull Control control) throws LDAPException
Creates a new password update behavior request control that is decoded from the provided generic control.- Parameters:
control
- The control to be decoded as a password update behavior request control. It must not benull
.- Throws:
LDAPException
- If the provided control cannot be parsed as a password update behavior request control.
-
-
Method Detail
-
getIsSelfChange
@Nullable public java.lang.Boolean getIsSelfChange()
Indicates whether this control should override the server's automatic classification of the password update as a self change or an administrative reset, and if so, what the overridden value should be.- Returns:
Boolean.TRUE
if the server should treat the password update as a self change,Boolean.FALSE
if the server should treat the password update as an administrative reset, ornull
if the server should automatically determine whether the password update is a self change or an administrative reset.
-
getAllowPreEncodedPassword
@Nullable public java.lang.Boolean getAllowPreEncodedPassword()
Indicates whether this control should override the value of theallow-pre-encoded-passwords
configuration property for the target user's password policy, and if so, what the overridden value should be.- Returns:
Boolean.TRUE
if the server should accept a pre-encoded password in the password update even if the server's password policy configuration would normally not permit this,Boolean.FALSE
if the server should reject a pre-encoded password in the password update even if the server's password policy configuration would normally accept it, ornull
if the password policy configuration should be used to determine whether to accept pre-encoded passwords.
-
getSkipPasswordValidation
@Nullable public java.lang.Boolean getSkipPasswordValidation()
Indicates whether this control should override the server's normal behavior with regard to invoking password validators for any new passwords included in the password update, and if so, what the overridden behavior should be.- Returns:
Boolean.TRUE
if the server should skip invoking the password validators configured in the target user's password policy validators for any new passwords included in the password update even if the server would normally perform password validation,Boolean.FALSE
if the server should invoke the password validators even if it would normally skip them, ornull
if the password policy configuration should be used to determine whether to skip password validation.
-
getIgnorePasswordHistory
@Nullable public java.lang.Boolean getIgnorePasswordHistory()
Indicates whether this control should override the server's normal behavior with regard to checking the password history for any new passwords included in the password update, and if so, what the overridden behavior should be.- Returns:
Boolean.TRUE
if the server should not check to see whether any new password matches the current password or is in the user's password history even if it would normally perform that check,Boolean.FALSE
if the server should check to see whether any new password matches the current or previous password even if it would normally not perform such a check, ornull
if the password policy configuration should be used to determine whether to ignore the password history.
-
getIgnoreMinimumPasswordAge
@Nullable public java.lang.Boolean getIgnoreMinimumPasswordAge()
Indicates whether this control should override the server's normal behavior with regard to checking the minimum password age, and if so, what the overridden behavior should be.- Returns:
Boolean.TRUE
if the server should accept the password change even if it has been less than the configured minimum password age since the password was last changed,Boolean.FALSE
if the server should reject the password change if it has been less than teh configured minimum password age, ornull
if the password policy configuration should be used to determine the appropriate behavior.
-
getPasswordStorageScheme
@Nullable public java.lang.String getPasswordStorageScheme()
Indicates whether this control should override the server's normal behavior with regard to selecting the password storage scheme to use to encode new password values, and if so, which password storage scheme should be used.- Returns:
- The name of the password storage scheme that should be used to
encode any new password values, or
null
if the target user's password policy configuration should determine the appropriate schemes for encoding new passwords.
-
getMustChangePassword
@Nullable public java.lang.Boolean getMustChangePassword()
Indicates whether this control should override the server's normal behavior with regard to requiring a password change, and if so, what that behavior should be.- Returns:
Boolean.TRUE
if the user will be required to change their password before being allowed to perform any other operation,Boolean.FALSE
if the user will not be required to change their password before being allowed to perform any other operation, ornull
if the password policy configuration should be used to control this behavior.
-
getControlName
@NotNull public java.lang.String getControlName()
Retrieves the user-friendly name for this control, if available. If no user-friendly name has been defined, then the OID will be returned.- Overrides:
getControlName
in classControl
- Returns:
- The user-friendly name for this control, or the OID if no user-friendly name is available.
-
toJSONControl
@NotNull public JSONObject toJSONControl()
Retrieves a representation of this password update behavior request control as a JSON object. The JSON object uses the following fields:-
oid
-- A mandatory string field whose value is the object identifier for this control. For the password update behavior request control, the OID is "1.3.6.1.4.1.30221.2.5.51". -
control-name
-- An optional string field whose value is a human-readable name for this control. This field is only intended for descriptive purposes, and when decoding a control, theoid
field should be used to identify the type of control. -
criticality
-- A mandatory Boolean field used to indicate whether this control is considered critical. -
value-base64
-- An optional string field whose value is a base64-encoded representation of the raw value for this password update behavior request control. Exactly one of thevalue-base64
andvalue-json
fields must be present. -
value-json
-- An optional JSON object field whose value is a user-friendly representation of the value for this password update behavior request control. Exactly one of thevalue-base64
andvalue-json
fields must be present, and if thevalue-json
field is used, then it will use the following fields:-
is-self-change
-- An optional Boolean field that may be used to explicitly indicate whether the server should treat the password update as a self change or an administrative reset. -
allow-pre-encoded-password
-- An optional Boolean field that may be used to explicitly indicate whether the server should allow the new password to be provided in pre-encoded form. -
skip-password-validation
-- An optional Boolean field that may be used to explicitly indicate whether the server should skip the password validation processing that it may otherwise perform for the new password. -
ignore-password-history
-- An optional Boolean field that may be used to explicitly indicate whether the server should ignore the user's password history when determining whether to accept the new password. -
ignore-minimum-password-age
-- An optional Boolean field that may be used to explicitly indicate whether the server should ignore any minimum password age constraints that may otherwise be in place for the user. -
password-storage-scheme
-- An optional string field whose value is the name of the password storage scheme that the server should use when encoding the new password. -
must-change-password
-- An optional Boolean field that may be used to explicitly indicate whether the server should require the user to change their password before they will be allowed to request any other operations.
-
- Overrides:
toJSONControl
in classControl
- Returns:
- A JSON object that contains a representation of this control.
-
-
decodeJSONControl
@NotNull public static PasswordUpdateBehaviorRequestControl decodeJSONControl(@NotNull JSONObject controlObject, boolean strict) throws LDAPException
Attempts to decode the provided object as a JSON representation of a password update behavior control.- Parameters:
controlObject
- The JSON object to be decoded. It must not benull
.strict
- Indicates whether to use strict mode when decoding the provided JSON object. If this istrue
, then this method will throw an exception if the provided JSON object contains any unrecognized fields. If this isfalse
, then unrecognized fields will be ignored.- Returns:
- The password update behavior request control that was decoded from the provided JSON object.
- Throws:
LDAPException
- If the provided JSON object cannot be parsed as a valid password update behavior request control.
-
-