Slashcode Log In
LDAP authentication v 0.01
- A user is taken to a login screen (a basic one is here) where they enter a username & password.
- This pair is authenticated against the LDAP directory.
- If successful, the program first checks to see if the pair already exists in the slash user database
- If they do not exist, it adds them
- If they do exist, it makes sure the password matches. If it doesn't, it changes the slash password to match the LDAP password
- It then passes all the relevant values to users.pl for further processing (see the comments in the code for why this happens).
I've still got a ways to go on this one, as I'm sure you can tell. I wouldn't say this is even close to the right way to do this, but it is one way and it does seem to work in my own testing. I have found several references to LDAP requests, but not much code, so I thought it might be good to throw this out here for people to look at/tinker with/laugh at over the US holiday. Those brave enough to try it need to download and install the Bundle::Net::LDAP bundle. Enjoy!"