Class 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,
            ... }
     
    See Also:
    PasswordUpdateBehaviorRequestControlProperties, Serialized Form
    • Constructor Detail

      • 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 be null.
        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, or null 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 the allow-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, or null 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, or null 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, or null 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, or null 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, or null 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 class Control
        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, the oid 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 the value-base64 and value-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 the value-base64 and value-json fields must be present, and if the value-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 class Control
        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 be null.
        strict - Indicates whether to use strict mode when decoding the provided JSON object. If this is true, then this method will throw an exception if the provided JSON object contains any unrecognized fields. If this is false, 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.
      • toString

        public void toString​(@NotNull
                             java.lang.StringBuilder buffer)
        Appends a string representation of this LDAP control to the provided buffer.
        Overrides:
        toString in class Control
        Parameters:
        buffer - The buffer to which to append the string representation of this buffer.