hi!
RedHat Linux 7.1
apache 1.3.19
perl 5
mod_perl 1.24
embperl (latest version)
apache::authcookie (latest version)
I found this great module that allows login and logout from a web site using cookies.
the problem is that I don't know how to use it myself. Yes, I've read and reread the
documentation that comes with installing the module.
I want to get an authentication/authorization scheme going for my web page and I
thought I'd get started just using the Sample::AuthCookieHandler package.
Login.htm is page that displays a form where users can add their credentials. It also
includes a hidden field, destination, where the path to the protected page is written,
../CIP/Welcome2.htm
At /bla/bla/site/htdocs I have two directories. Intro, which doesn't require
authentication/authorization and CIP, which DOES require it.
this is how I've configured my httpd.conf file:
PerlRequire /usr/src/Apache-AuthCookie-2.011/t/Sample/AuthCookieHandler.pm
PerlSetVar /bla/bla/site/htdocs /
PerlSetVar perl-script Intro/Login.htm
<Location /CIP>
AuthType Sample::AuthCookieHandler
AuthName Darkness
PerlAuthenHandler Sample::AuthCookieHandler->authenticate
PerlAuthzHandler Sample::AuthCookieHandler->authorize
require valid-user
</Location>
<Location /Intro>
AuthType Sample::AuthCookieHandler
AuthName Darkness
PerlFixupHandler Sample::AuthCookieHandler->recognize_user
</Location>
<Files LOGIN>
AuthType Sample::AuthCookieHandler
AuthName Darkness
SetHandler perl-script
PerlHandler Sample::AuthCookieHandler->login
</Files>
i don't know how to write the file LOGIN. What does it do?
It is also located at /bla/bla/site/htdocs.
My server complains that it doesn't have access to it but I've made sure that it is
executable for all users.
the login.htm page is accessed from the "unprotected" pages in the ../htdocs/Intro
directory.
I also don't understand how the subroutines are called. If I explicitly want to call
login, which parameters do I use? How do I specify package name ($self) and apache
request object ($r).
I have not altered the subroutines in Apache::AuthCookie and Sample::AuthCookieHandler
in any way.
I hope there is anyone out there who feels like answering these, probably simple,
questions. I've searched the archives already.
Thanks for all help!
Emma