Package com.unboundid.ldap.sdk
Class PasswordProvider
java.lang.Object
com.unboundid.ldap.sdk.PasswordProvider
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
ReadFromFilePasswordProvider
@Extensible
@ThreadSafety(level=INTERFACE_THREADSAFE)
public abstract class PasswordProvider
extends Object
implements Serializable
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract byte[]Retrieves a password in a newly-created byte array.
-
Constructor Details
-
PasswordProvider
public PasswordProvider()
-
-
Method Details
-
getPasswordBytes
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.
-