com.unboundid.ldap.sdk
Class PasswordProvider

java.lang.Object
  extended by com.unboundid.ldap.sdk.PasswordProvider
All Implemented Interfaces:
java.io.Serializable

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
PasswordProvider()
           
 
Method Summary
abstract  byte[] getPasswordBytes()
          Retrieves a password in a newly-created byte array.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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.