Class GetPasswordQualityRequirementsExtendedResult

  • All Implemented Interfaces:
    LDAPResponse, java.io.Serializable

    @NotMutable
    @ThreadSafety(level=COMPLETELY_THREADSAFE)
    public final class GetPasswordQualityRequirementsExtendedResult
    extends ExtendedResult
    This class provides an implementation of an extended result that can provide information about the requirements that the server will enforce for operations that change or replace a user's password, including adding a new user, a user changing his/her own password, and an administrator resetting another user's password.
    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.

    If the get password quality request was processed successfully, then the result will include an OID of 1.3.6.1.4.1.30221.2.6.44 and a value with the following encoding:
       GetPasswordQualityRequirementsResultValue ::= SEQUENCE {
            requirements                SEQUENCE OF PasswordQualityRequirement,
            currentPasswordRequired     [0] BOOLEAN OPTIONAL,
            mustChangePassword          [1] BOOLEAN OPTIONAL,
            secondsUntilExpiration      [2] INTEGER OPTIONAL,
            ... }
     
    See Also:
    Serialized Form
    • Constructor Detail

      • GetPasswordQualityRequirementsExtendedResult

        public GetPasswordQualityRequirementsExtendedResult​(int messageID,
                                                            ResultCode resultCode,
                                                            java.lang.String diagnosticMessage,
                                                            java.lang.String matchedDN,
                                                            java.lang.String[] referralURLs,
                                                            java.util.Collection<PasswordQualityRequirement> passwordRequirements,
                                                            java.lang.Boolean currentPasswordRequired,
                                                            java.lang.Boolean mustChangePassword,
                                                            java.lang.Integer secondsUntilExpiration,
                                                            Control... controls)
        Creates a new get password quality requirements extended result with the provided information.
        Parameters:
        messageID - The message ID for the LDAP message that is associated with this LDAP result.
        resultCode - The result code for the response. This must not be null.
        diagnosticMessage - The diagnostic message for the response. This may be null if no diagnostic message is needed.
        matchedDN - The matched DN for the response. This may be null if no matched DN is needed.
        referralURLs - The set of referral URLs from the response. This may be null or empty if no referral URLs are needed.
        passwordRequirements - The password quality requirements for this result. This must be null or empty if this result is for an operation that was not processed successfully. It may be null or empty if the server will not enforce any password quality requirements for the target operation.
        currentPasswordRequired - Indicates whether the user will be required to provide his/her current password when performing a self change. This must be null if this result is for an operation that was not processed successfully or if the target operation is not a self change.
        mustChangePassword - Indicates whether the user will be required to change their password after the associated add or administrative reset before that user will be allowed to issue any other requests. This must be null if this result is for an operation that was not processed successfully or if the target operation is not an add or an administrative reset.
        secondsUntilExpiration - Indicates the maximum length of time, in seconds, that the password set in the target operation will be valid. If mustChangePassword is true then this will indicate the length of time that the user has to change his/her password after the add/reset. If mustChangePassword is null or false then this will indicate the length of time until the password expires. This must be null if this result is for an operation that was not processed successfully, or if the new password will be valid indefinitely.
        controls - The set of controls to include in the result. It may be null or empty if no controls are needed.
      • GetPasswordQualityRequirementsExtendedResult

        public GetPasswordQualityRequirementsExtendedResult​(ExtendedResult r)
                                                     throws LDAPException
        Creates a new get password quality requirements extended result from the provided generic result.
        Parameters:
        r - The generic extended result to parse as a get password quality requirements result.
        Throws:
        LDAPException - If the provided generic extended result cannot be parsed as a get password quality requirements result.
    • Method Detail

      • getPasswordRequirements

        public java.util.List<PasswordQualityRequirementgetPasswordRequirements()
        Retrieves the list of password quality requirements that specify the constraints that a proposed password must satisfy in order to be accepted by the server in an operation of the type specified in the get password quality requirements request.
        Returns:
        A list of the password quality requirements returned by the server, or an empty list if this result is for a non-successful get password quality requirements operation or if the server will not impose any password quality requirements for the specified operation type.
      • getCurrentPasswordRequired

        public java.lang.Boolean getCurrentPasswordRequired()
        Retrieves a flag that indicates whether the target user will be required to provide his/her current password in order to set a new password with a self change.
        Returns:
        A value of Boolean.TRUE if the target operation is a self change and the user will be required to provide his/her current password when setting a new one, Boolean.FALSE if the target operation is a self change and the user will not be required to provide his/her current password, or null if the target operation is not a self change or if this result is for a non-successful get password quality requirements operation.
      • getMustChangePassword

        public java.lang.Boolean getMustChangePassword()
        Retrieves a flag that indicates whether the target user will be required to immediately change his/her own password after the associated add or administrative reset operation before that user will be allowed to issue any other types of requests.
        Returns:
        A value of Boolean.TRUE if the target operation is an add or administrative reset and the user will be required to immediately perform a self change to select a new password before being allowed to perform any other kinds of operations, Boolean.FALSE if the target operation is an add or administrative reset but the user will not be required to immediately select a new password with a self change, or null if the target operation is not an add or administrative reset, or if this result is for a non-successful get password quality requirements operation.
      • getSecondsUntilExpiration

        public java.lang.Integer getSecondsUntilExpiration()
        Retrieves the length of time, in seconds, that the new password will be considered valid after the change is applied. If the associated operation is an add or an administrative reset and getMustChangePassword() returns Boolean.TRUE, then this will indicate the length of time that the user has to choose a new password with a self change before the account becomes locked. If the associated operation is a self change, or if getMustChangePassword returns Boolean.FALSE, then this will indicate the maximum length of time that the newly-selected password may be used until it expires.
        Returns:
        The length of time, in seconds, that the new password will be considered valid after the change is applied, or null if this result is for a non-successful get password quality requirements operation or if the newly-selected password can be used indefinitely.
      • getExtendedResultName

        public java.lang.String getExtendedResultName()
        Retrieves the user-friendly name for the extended result, if available. If no user-friendly name has been defined, but a response OID is available, then that will be returned. If neither a user-friendly name nor a response OID are available, then null will be returned.
        Overrides:
        getExtendedResultName in class ExtendedResult
        Returns:
        The user-friendly name for this extended request, the response OID if a user-friendly name is not available but a response OID is, or null if neither a user-friendly name nor a response OID are available.
      • toString

        public void toString​(java.lang.StringBuilder buffer)
        Appends a string representation of this extended response to the provided buffer.
        Specified by:
        toString in interface LDAPResponse
        Overrides:
        toString in class ExtendedResult
        Parameters:
        buffer - The buffer to which a string representation of this extended response will be appended.