[Zope-dev] REQUEST.AUTHENTICATED_USER question

Jens Vagelpohl jens@zope.com
Mon, 21 Jan 2002 07:39:21 -0500


the user gets modified automatically, provided you use common 
login-methodology and a user folder that supports it.

you don't set the user "manually".

jens


On Monday, January 21, 2002, at 12:35 , vio wrote:

> Hi,
> Does anybody know what is the method call to modify the 
> AUTHENTICATED_USER attribute? I am unable to trace where REQUEST feeds 
> data for its AUTHENTICATED_USER attribute.
>
> Some context to my question: I am using a custom method to authenticate 
> users coming to my site. So when the user logs in, he is 'Anonymous User'
>  (from call: AUTHENTICATED_USER.getUserName()). But after his login name 
> and password checked ok, how do I switch his identity in Zope from 
> 'Anonymous User' to his/her new identity?  What I am looking for is that 
> next time I call 'REQUEST.AUTHENTICATED_USER.getUserName()' to get the 
> new UserName he just logged in as, not 'Anonymous User' again.
>
> Examining CookieCrumbler.py source, this authentication product uses the 
> 'before_publishing_traverse hook' mechanism. But isn't there a simpler 
> way to do this than modifying REQUEST.RESPONSE at each traversal? Sounds 
> like a lot of overhead.
>
> Vio
>