A central source for user authentication is a worthwhile thing for a company to have. Unfortunately, for much of the corporate world, this means Microsoft Active Directory. Hey, it’s not all bad. At least Ruby applications can access Active Directory with the ruby-net-ldap gem. Still, code in a Rails application which has to deal with LDAP attributes can look downright foreign next to all of your nifty English-looking attribute names, and ActiveLdap, while very cool, is overkill for simple tasks. Sometimes you just want a simple way to get at a few key attributes about your users once they log in. Maybe you’re looking to cache that info in a local database table so that you can enforce database integrity checks, for instance? Here’s a single file you can just drop into your Rails (or plain old Ruby) project and use any way you see fit.
Read the rest of this post
Filed under Uncategorized
Apr 4, 2008