You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@perl.apache.org by John Kelly <jo...@uk.ibm.com> on 2002/01/30 10:51:32 UTC

Problems changing the realm with auth_name

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