Interesting mod_perl handlers

At least, I hope this are of interest to someone.

It appears that Apache on Win32 does not allow authentication (via Basic Authentication as configured in httpd.conf or .htaccess files) against a Windows domain. (On Unixish systems, this can be achieved using Samba and the Authen::Smb or Apache::AuthenSmb modules.) So, I wrote an authentication mod_perl. All it does take the username/password provided by the web browser, and authenticate against the domain configured in httpd.conf, via the Win32::AuthenticateUser module which is bundled with ActiveState's distributation of Perl. It's fast, and since it properly hooks into the authentication stage of the Apache request cycle, it has the same flexibility as your standard .htaccess options. This handler is 25 lines, including blank lines and comments... pretty simple, but demonstrates the power of mod_perl. I still need to hook in some access controls by user/group, but their should be a function in one of the Win32::* modules somewhere for that.


See also mod_perl, Perl, or installing mod_perl on Win32