LDAPConnection.SCOPE_SUB, userLDAP, null, false);
while(searchResult.hasMoreElements()){
LDAPEntry entry = searchResult.next();
String dn = entry.getDN();
connection.authenticate(dn, password);
return connection.isAuthenticated();
}
}catch(LDAPReferralException e){
throwException(username);