I don't know if anyone has used the LDAP library to access the active directory... is it possible to search using the domain? in the "eFilter" variable when I pass the user "emujica" it manages to obtain the user but if I pass it the domain, for example "domain\emujica" it fails to obtain the user... Does anyone know? How can I do it?
DefaultValuesAuthenticationSourceDecorator as = new DefaultValuesAuthenticationSourceDecorator();
as.setDefaultUser(userDn);
as.setDefaultPassword(password);
LdapTemplate ldapTemplate = new LdapTemplate(contextSource);
AbstractContext abstractContextMapper = new AbstractContext();
ldapTemplate.setIgnorePartialResultException(true);
//Search
ldapTemplate.search(DistinguishedName.EMPTY_PATH, eFilter.toString(), SearchControls.SUBTREE_SCOPE, abstractContextMapper);