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