Partially, and yes that seems to work.  But here's the thing:

When a user fails to enter a good password they will be given a chance
to enter questions like "What is your mother's maiden name", etc. and
get their account unlocked.

Without passing the enc_key and system_id in form parameters, is there
any way I could make them available to whichever handler that is for the
full series of requests?  The handler gets those values when the user
first gets to auth_fail but after that there isn't really any way I can
keep passing them on, is there?

Thanks,

Brian

-----Original Message-----
From: Geoffrey Young [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 20, 2003 1:45 PM
To: Hann, Brian
Cc: [EMAIL PROTECTED]
Subject: Re: notes() and mod_perl ErrorDocuments




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



Reply via email to