Problems with your suggestion:

1. The realm will not be known until I get path_info so
<Location></Location> directives will not work.

2. How can I get Perl to do the password lookup in the dynamically
selected AuthUserFile?

Thanks for the help.

-Todd

On Wed, 27 Sep 2000, Carlos Ramirez wrote:

> You can you use Location to specify seperate AuthUserFile's like so:
> 
> <Location /companyA>
> AuthType Basic
> AuthName CompanyA
> AuthUserFile path/to/CompanyAUsersFile
> 
> </Location>
> ....
> <Location /companyN>
> AuthType Basic
> AuthName CompanyN
> AuthUserFile path/to/CompanyNUsersFIle
> </Location>
> 
> 
> Or you can write your own AuthHandler that lookups up AuthName, AuthUserFile
> in a seperate file against the path_info. This will eliminate the need to
> flood you httpd.conf file with a bunch of <Location></Location> directives.
> 
> 
> 
> 
> 
> 
> Todd Chapman wrote:
> 
> > I have read chapter 6 of the modperl book but still don't know how to set
> > up authenification the way I want. I would like to use Basic
> > authentification to protect virtual documents. The trick is that I want
> > to set AuthName and AuthUserFile based on path_info.
> >
> > For example:
> >
> > http://virtual/companyA/dir1
> >
> > would prompt for a password in the companyA realm and check it against the
> > appropriate AuthUserFile.
> >
> > How do I add this flexibility without reinventing the parts Apache already
> > does so well?
> >
> > Thanks.
> >
> > -Todd
> 
> --
> -----------------------------------------------------------------------
> Carlos Ramirez + Boeing + Reusable Space Systems + 714.372.4181
> -----------------------------------------------------------------------
> - Someday I'll find that peer and reset his connection!
> 
> 
> 

Reply via email to