I\'m maintaining some legacy Java LDAP code. I know next to nothing about LDAP.
The program below basically just sends the userid and password to the LDAP server,
There are two types of BIND operations, simple and SASL. In the case of the simple BIND, there are four possibilities:
anonymous, no authentication takes place. This is the initial state, and also the state when a BIND request is received by the serverunauthenticated, no authentication takes placeWhen a connection is initially established, the connection is anonymous. Each BIND request resets the connection state to anonymous. Each successful BIND request changes the authorization state of the connection to that of the distinguished name. Each unsuccessful BIND request leaves the connection unauthenticated.
The semantics of BIND are defined in LDAP: Authentication