How to Authenticate against Luminis Ldap using CFML
authentication from custom code has a few steps
1. You bind as the directory manager.
2. The directory manager takes the typed in username and queries the ldap for the user's DN.
3. You perform another ldap query, this time, binding as the user DN and the user typed password.
4. You catch any errors, or otherwise determine if the bind attempt was successful.
5. You set a cookie, session variable, or some means of knowing that the user is logged in.
This is some CFML with a login form, that posts to itself, and sets a session variable if the user logs in successfully.
edit: I noticed that this was my script for an application that was to allow only employees to login, so if you want to use it to authenticate all roles, change the filter section.
filter = "(&(objectclass=*)(pdsRole=*employee*)(pdsLoginId=#pdsLoginId#))";

Recent comments
15 hours 36 min ago
17 hours 21 min ago
21 hours 54 min ago
22 hours 56 min ago
1 day 16 hours ago
1 day 17 hours ago
1 day 18 hours ago
1 day 18 hours ago
1 day 20 hours ago
2 days 36 min ago