Class GeneratedPassword
java.lang.Object
com.unboundid.ldap.sdk.unboundidds.extensions.GeneratedPassword
- All Implemented Interfaces:
Serializable
@NotMutable
@ThreadSafety(level=COMPLETELY_THREADSAFE)
public final class GeneratedPassword
extends Object
implements 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 Summary
ConstructorsConstructorDescriptionGeneratedPassword(byte[] password, boolean validationAttempted, List<String> validationErrors) Creates a generated password object with the provided information.GeneratedPassword(String password, boolean validationAttempted, List<String> validationErrors) Creates a generated password object with the provided information. -
Method Summary
Modifier and TypeMethodDescriptionstatic GeneratedPassworddecode(ASN1Element element) Decodes the provided ASN.1 element as a generated password object.encode()Encodes this generated password to a sequence suitable for inclusion in the value of aGeneratePasswordExtendedResult.byte[]Retrieves the bytes that comprise the server-generated password.Retrieves a string representation of the server-generated password.Retrieves a list of problems identified while the server was validating the quality of the generated password.toString()Retrieves a string representation of this generated password object.voidtoString(StringBuilder buffer) Appends a string representation of this generated password object to the provided buffer.booleanIndicates whether the server attempted to validate the quality of the generated password.
-
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
Retrieves the bytes that comprise the server-generated password.- Returns:
- The bytes that comprise the server-generated password.
-
validationAttempted
Indicates whether the server attempted to validate the quality of the generated password.- Returns:
trueif the server attempted to validate the quality of the generated password, orfalseif 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 aGeneratePasswordExtendedResult.- 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 benull.- 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. -
toString
Appends a string representation of this generated password object to the provided buffer.- Parameters:
buffer- The buffer to which the information should be appended.
-