Lately I solved it.
So many mistakes in just a few lines of codes.
Ok, here's what I changed:
1. Change Port
Obviously Port 80 wasn't the right one, so I got the error above.
After changing to Port 389 (Default Port) I got error code 49 (wrong
credentials).
2. Change OU
What I didn't know: I'm not an employe, but just a student for the
company ;)
So I modified this ou from ou=employe to ou=student and everything
works fine now.
public boolean login(String name, String password) {
LDAPConnection connection = new LDAPConnection();
String dn = "uid="+name+",OU=student,OU=user,DC=xyz";
try {
connection.connect("dc1.xyz", 389);
connection.bind(dn, password);
return true;
} catch (LDAPException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return false;
}
Again, thank you for your time and help.
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en