Hann, Brian wrote:
Thanks, that worked. Now I can use the regular authentication stuff.
As I said in my last email, in the interest of preventing location pollution, is there some way I could make those PerlSetVars available to subsequent requests to a different location? I can't think of any way to do it without copying them to a separate location for each one. Perhaps with some kind of shared memory?
well, given your example setup
<Location /bob> AuthType basic AuthName bob PerlAuthenHandler Module::authen PerlAuthzHandler Module::authz PerlSetVar system_id 123 PerlSetVar enc_key 187187815781 Require valid-user ErrorDocument 401 /auth_fail_bob </Location> </Location /auth_fail_bob> SetHandler perl-script PerlHandler AuthFailure PerlSetVar system_id 123 PerlSetVar enc_key 187187815781 </Location>
I would think you could make that
ErrorDocument 401 /auth_fail
<Location /bob> AuthType basic AuthName bob PerlAuthenHandler Module::authen PerlAuthzHandler Module::authz PerlSetVar system_id 123 PerlSetVar enc_key 187187815781 Require valid-user </Location> </Location /auth_fail> SetHandler perl-script PerlHandler AuthFailure </Location>
the use the $r->prev() trick - requests to /bob that result in 401 errors handled by /auth_fail will have bob's PerlSetVar stuff in $r->prev->dir_config, same for /bill and /biff.
is that not what you mean?
--Geoff