Authenticating users using Unix or Windows credentials
by ricardoz on Apr.22, 2008, under Security, Tips
It’s usually very nice, and sometimes a requirement, to validate usernames and passwords using existing credentials. And in most situations big frameworks or single sign-on systems are just damn overkill and complex.
If you need to check your users credentials via an existing Unix system (that supports PAM) or a Windows domain controller check out this great and really simple library http://www.scribblin.gs/software/sysauth.html.
Once you have it installed (follow instructions on the author site) you need just one line of code to authenticate your users:
SysAuth.isAllowed(userName, password)