I am currently using the netscape.ldap package to handle LDAP Connection and Authentication. I don't know if this is the best framework for LDAP Management but it's what I've got anyways.
Using this I really have to check if the user exists or not by doing so obisouly ugly and bad statements, such as followed:
try{
conn.connect(this.host, this.port, this.dn, this.password);
this.validUser = true;
}
catch(LDAPException e) {
this.validUser = false;
}
This is seriously very ugly and bad practice, however, it's simple and understandable. And that's the most important part, I want it to be as simple and easy on the eyes as possible.
However the documentation for netscape.ldap feels outdated. So, anyone got suggestions on how I can implement this better or with another package? ( Prefferable not with hundreds of dependencies ).
Also I'd like to be able to do something like: conn.add("user", "pass"); without having to bother looking into the various security methods I'd have to implement to get the password right.