* authentication is based on the entry which uid is equal to the user name we received.
*/
private CoreSession authenticate( String user, String password ) throws InvalidNameException, Exception
{
LdapSession ldapSession = getLdapSession();
CoreSession adminSession = getAdminSession();
DirectoryService directoryService = adminSession.getDirectoryService();
LdapServer ldapServer = ldapSession.getLdapServer();
OperationManager operationManager = directoryService.getOperationManager();
// first, we have to find the entries which has the uid value
EqualityNode<String> filter = new EqualityNode<String>(