While working on a project, I built this simple example, using the OpenLDAP libraries to authenticate user credentials against a version 3 LDAP. This example is based on my own retooling of code and examples found in a few different places:
- a post on StackOverflow.
- Oracle's guide "LDAP SDK for C Programming".
- a publicly available LDAP server developers can test their code against. Many thanks to Forum Systems!!! The LDAP server they provided saved me at least a few hours of effort. ๐
With a little tweaking of this code, this project can be used as a starting point to implement an LDAP client with user authentication.