I need to decide who has access based on the URI. I guess this means I
can't use Apache's Basic auth module, since I can't dynamically set
require. Does the cookbook have a code sample of checking the password for
basic authentication?

-Todd

On Mon, 20 May 2002, Geoffrey Young wrote:

> 
> 
> Todd Chapman wrote:
> 
> > Can dir_config be used to set 'require' in an authentication handler?
> 
> 
> no.  dir_config() provides access to a mod_perl specific table of variables, not 
>generic 
> Apache configuration directives.
> 
> there is no API for setting the Require directive - it needs to be in your 
>httpd.conf.
> 
> 
> > I would then return DECLINED do that Apache's Basic auth handler would do
> > the heavy lifting of checking the password.
> 
> if you're looking to do conditional authentication what you really need to do is a 
>bit 
> backward - turn on all authentication hooks using the Require directive then use 
>your 
> handler to return OK when you don't want Apache to check the password.  See recipe 
>13.5 in 
> the cookbook for more information.
> 
> the "Satisfy any" Apache directive may be able to help as well if you're using 
>host-based 
> criteria to determine whether you want to require a login.
> 
> HTH
> 
> --Geoff
> 

Reply via email to