I am trying to make a LDAP connection. I am using apache directory api. I am using the following code:
LdapConnection connection = new LdapNetworkConenction("serverAddress",port);
connection.bind(DN,password);
Here instead of the DN i want to use the domain/username to bind to the directory service. 'When using the apache ds i am able to connect and authenticate via domain/username and not require the DN.
How can i do this using the apache directory api.