Main Stories
Slash Boxes

Slash Open Source Project

Slashcode Log In

Log In

[ Create a new account ]

LDAP authentication v 0.01

posted by Krow on 01:55 PM November 22nd, 2001   Printer-friendly   Email story
dscottj writes "Thanks to all who have helped, I have a written very primitive program that uses an LDAP directory to authenticate users into a slash site. I'm (obviously) not a professional programmer, and don't know anything about CVSs, so I don't even know if this is suitable for "checking in". It's not even really a plugin as far as I can tell, although you might be able to turn it in to one. The code is located here. Here's how it works:
  • 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!"

This discussion has been archived. No new comments can be posted.
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login
Loading... please wait.