// ---- extract password from JNDI environment
byte[] credentials = bindContext.getCredentials();
LdapPrincipal principal = getStoredPassword( bindContext );
IoSession session = bindContext.getIoSession();
if ( session != null )
{
SocketAddress clientAddress = session.getRemoteAddress();
principal.setClientAddress( clientAddress );
SocketAddress serverAddress = session.getServiceAddress();
principal.setServerAddress( serverAddress );
}
// Get the stored password, either from cache or from backend
byte[][] storedPasswords = principal.getUserPasswords();