Class GeneratedPassword

java.lang.Object
com.unboundid.ldap.sdk.unboundidds.extensions.GeneratedPassword
All Implemented Interfaces:
Serializable

This class defines a data structure that holds information about a password generated by the server and returned to the client in a GeneratePasswordExtendedResult.
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:
  • Constructor Details

    • GeneratedPassword

      public GeneratedPassword(@NotNull String password, boolean validationAttempted, @Nullable List<String> validationErrors)
      Creates a generated password object with the provided information.
      Parameters:
      password - The password that was generated. It must not be @code null} or empty.
      validationAttempted - Indicates whether the server attempted to validate the quality of the generated password.
      validationErrors - An optional list of messages with information about any problems identified while the server was validating the quality of the generated password.
    • GeneratedPassword

      public GeneratedPassword(@NotNull byte[] password, boolean validationAttempted, @Nullable List<String> validationErrors)
      Creates a generated password object with the provided information.
      Parameters:
      password - The password that was generated. It must not be @code null} or empty.
      validationAttempted - Indicates whether the server attempted to validate the quality of the generated password.
      validationErrors - An optional list of messages with information about any problems identified while the server was validating the quality of the generated password.
  • Method Details

    • getPasswordString

      Retrieves a string representation of the server-generated password.
      Returns:
      A string representation of the server-generated password.
    • getPasswordBytes

      @NotNull public byte[] getPasswordBytes()
      Retrieves the bytes that comprise the server-generated password.
      Returns:
      The bytes that comprise the server-generated password.
    • validationAttempted

      public boolean validationAttempted()
      Indicates whether the server attempted to validate the quality of the generated password.
      Returns:
      true if the server attempted to validate the quality of the generated password, or false if not.
    • getValidationErrors

      Retrieves a list of problems identified while the server was validating the quality of the generated password.
      Returns:
      A list of problems identified while the server was validating the quality of the generated password, or an empty list if no validation was attempted or if the generated password satisfied all of the requirements for all of the appropriate password validators.
    • encode

      Encodes this generated password to a sequence suitable for inclusion in the value of a GeneratePasswordExtendedResult.
      Returns:
      An ASN.1 sequence containing an encoded representation of this generated password object.
    • decode

      Decodes the provided ASN.1 element as a generated password object.
      Parameters:
      element - The ASN.1 element to be decoded. It must not be null.
      Returns:
      The generated password object that was decoded.
      Throws:
      LDAPException - If a problem is encountered while decoding the provided element as a generated password.
    • toString

      Retrieves a string representation of this generated password object.
      Overrides:
      toString in class Object
      Returns:
      A string representation of this generated password object.
    • toString

      public void toString(@NotNull StringBuilder buffer)
      Appends a string representation of this generated password object to the provided buffer.
      Parameters:
      buffer - The buffer to which the information should be appended.