Apache::OpenInteract2::HttpAuth - Use HTTP authentication to check logins against OpenInteract2 users
# In httpd.conf file, or in .htaccess # People must login to get to anything under /foo <Location /foo> # This is the normal OI content handler... SetHandler perl-script PerlHandler Apache::OpenInteract2 # ...this is the auth configuration PerlAuthenHandler Apache::OpenInteract2::HttpAuth AuthName "My Site Authentication" AuthType Basic Require valid-user Order deny,allow Allow from all </Location>
Simple Apache 1.x authentication handler that uses HTTP authentication rather than the normal cookie-based authentication. Fetch the user object with the given username from OpenInteract2 -- if it's not found then the request is denied. If the object is found and the passwords don't match then the request is denied.
Otherwise we store the fetched user object in the Apache property pnotes under the key 'login_user'. OI2 should handle this for you in its own authentication handler by first checking for this value in pnotes.
pnotes
Copyright (c) 2002-2005 Chris Winters. All rights reserved.
Chris Winters <chris@cwinters.com>
To install OpenInteract2::URL, copy and paste the appropriate command in to your terminal.
cpanm
cpanm OpenInteract2::URL
CPAN shell
perl -MCPAN -e shell install OpenInteract2::URL
For more information on module installation, please visit the detailed CPAN module installation guide.