Class PasswordProvider

java.lang.Object
com.unboundid.ldap.sdk.PasswordProvider
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
ReadFromFilePasswordProvider

This class defines an API that may be used to obtain a clear-text password that may be used for authentication or other purposes. Passwords must be returned in the form of a byte array, and the contents of that array will be zeroed out as soon as the password is no longer required in order to minimize the length of time that the password will remain in memory.
See Also:
  • Constructor Details

  • Method Details

    • getPasswordBytes

      @NotNull public abstract byte[] getPasswordBytes() throws LDAPException
      Retrieves a password in a newly-created byte array. Once the password is no longer required, the contents of the array will be overwritten so that the password is no longer contained in memory.
      Returns:
      A byte array containing the password that should be used.
      Throws:
      LDAPException - If a problem is encountered while attempting to obtain the password.