perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Philip M. Gollucci" <>
Subject PerlAuthenHandler question
Date Fri, 06 Jan 2006 17:29:38 GMT

I've setup a AAA using the 3 handlers.  I took a small amount from the 
mod_perl Cookbook, to figure out how to do it using an HTML form instead 
of a REALM popup box.

So the good news is it works.

Here's the config:
         ### AAA
         <Location /timeline>
             AuthType Basic
             AuthName "ISST"
             Require valid-user

             PerlAccessHandler ISST::Access
             PerlAuthenHandler ISST::Authen
             PerlAuthzHandler ISST::Authz

Here's the ISST:Authen code  --- See the commented question in it.  Thanks!

sub handler {
     my $r = shift;

     my $user = ISST::User->getLoggedIn($r);

     ## can't used DECLINED or you get the REALM popup
     return Apache2::Const::OK if $r->uri =~

     if ($user) {
         return Apache2::Const::OK;
     else {
         $r->headers_out->set(Location => ISST::Const::URL_LOGIN);
         return Apache2::Const::REDIRECT;

"Love is not the one you can picture yourself marrying,
but the one you can't picture the rest of your life without."

"It takes a minute to have a crush on someone, an hour to like someone,
and a day to love someone, but it takes a lifetime to forget someone..."

"I wanna hold ya till I die ... I wanna hold ya till the fear in me 

Philip M. Gollucci ( 301.254.5198
Consultant /
Senior Software Engineer - TicketMaster -
1024D/A79997FA F357 0FDD 2301 6296 690F  6A47 D55A 7172 A799 97F

View raw message