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