perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Geoffrey Young <ge...@modperlcookbook.org>
Subject Re: Client certificate based authentication
Date Mon, 09 Apr 2007 15:55:04 GMT
Jonathan Vanasco wrote:
> 
> On Apr 8, 2007, at 6:29 AM, Erik Norgaard wrote:
> 
>> First, this might me a stupid question, but I haven't found (or 
>> understood) how this works. When you have multiple handlers each 
>> being called in different stages of the request handling, how do  you
>> pass information from one handler to the next?
>> I am thinking of a separate authentication handler (not  authorization
>> as that depends on the action the user wants to do),  how to I pass on
>> authentication details to the response handler?
> 
> 
> pnotes
>     http://perl.apache.org/docs/2.0/api/Apache2/RequestUtil.html#C_pnotes_

while pnotes is a gem, keep in mind that there are official channels for
communication of user data when rolling your own authentication
mechanism - authentication handlers are expected to set $r->user() and
$r->connection->auth_type().

furthermore, I know from experience that some folks have a difficult
time understanding the phase separation, so I'll just say it for
clarity's sake... you don't need to pass some special flag to the
response handler saying "this user has been authenticated" or anything
like that - if the user fails authentication they won't ever make it to
your response handler.

this might help you a bit:

  http://www.modperlcookbook.org/chapters/ch13.pdf

especially the final two recipes, which involve rolling your own auth
mechanism.

HTH

--Geoff


Mime
View raw message