perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John Kelly" <john_ke...@uk.ibm.com>
Subject Problems changing the realm with auth_name
Date Wed, 30 Jan 2002 09:51:32 GMT
Hi,

I'm running Apache/1.3.20 (Win32) mod_perl/1.25_01-dev
and am having problem using auth_name to dynamically set the realm. The 
call seems to be ignored, using the AuthName directive from http.conf.

Looking around I saw anote from someone which implied they also had a 
problem with this on NT (I'm running XP Professional) but that was some 
time ago.

Excuse me if I've done something obviously wrong, but I've only been 
writing mod_perl for 4 days.

My httpd.conf look like this

<Location /private >

   SetHandler perl-script
   PerlSendHeader on
 
   AuthName temp
   AuthType Basic
   require valid-user

   PerlAccessHandler Apache::AccessPrivate 

</Location>

and the access handler part of my AccessPrivate.pm file is here...

sub handler {
 
   my $r = shift;
 
   my $uri = $r->parsed_uri;

   my @pi = split /\//,$uri->path_info();
   shift @pi;
   my $realm = shift @pi;
 
   $r->auth_name("$realm");
   $r->set_handlers(PerlAuthenHandler => [\&authenticate]); 
   $r->set_handlers(PerlHandler => [\&content]);
 
   return OK;
}

regards
John

John Kelly
IBM Hursley


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Mime
View raw message