You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by David Radunz <dj...@webmastery.com.au> on 2002/05/09 07:51:20 UTC

problems with authentication handler

Greetings, 

I have written a mod_perl authentication module and I am trying to figure 
out how to get it to protect top level directories. I have it setup in such 
a way that it calls lower level directories to display the login form and 
when I protect the top level directory it just loops and gives me the login 
screen when i attempt to login. I assume this is because it needs 
authentication to send the information to the login handler. I tried to fix 
the problem by adding a PerlFixupHandler to a subroutine that returns OK, 
which didn't fix the problem. 

Here is the httpd.conf entry: 

<Location />
 AuthType Apache::CookieLogin
 AuthName TestAuth
 PerlAuthenHandler Apache::CookieLogin::authenticate
 PerlAuthzHandler Apache::CookieLogin::authorize
 require valid-user
</Location>

<Location /login>
 AuthType Apache::CookieLogin
 AuthName TestAuth
 SetHandler perl-script
 PerlFixupHandler Apache::CookieLogin::no_auth_req
 PerlHandler Apache::CookieLogin::login_handler
</Location> 

<Location /loginform>
 AuthType Apache::CookieLogin
 AuthName TestAuth
 SetHandler perl-script
 PerlFixupHandler Apache::CookieLogin::no_auth_req
 Perlhandler Apache::CookieLogin::login_screen
</Location> 

<Location /logout>
 AuthType Apache::CookieLogin
 AuthName TestAuth
 SetHandler perl-script
 PerlFixupHandler Apache::CookieLogin::no_auth_req
 Perlhandler Apache::CookieLogin::logout
</Location> 


the no_auth_req subroutine: 

sub no_auth_req {
return OK;
} 

any ideas would be greatly appreciated. 

Thanks, 

DJ