[Seaside] How can I access the authenticated user of a request?
Ian Prince
ian at inextenso.com
Wed Oct 29 10:46:17 CET 2003
On Mercredi, oct 29, 2003, at 09:50 Europe/Zurich, Avi Bryant wrote:
> Ian Prince wrote:
>
>> P.S. on second thought wouldn't access to (say) request cookies be
>> useful for retrieving long-lasting seaside-session-independent user
>> preferences (e.g. retrieving an email address a user had previously
>> entered in a "old" seaside session).
>
> I'm not a big fan of cookies - why not store that stuff server side?
I agree.
I might want to access the request headers for other information though
(User-Agent for example).
> However, I can see that someone else might want to use them. My
> inclination, then, would be to have methods on session like #cookieAt:
> and #cookieAt:put:. These would deal with requests (and responses)
> internally, but they wouldn't make you know anything about which
> headers are used to transmit cookies and so on.
Do you have a code example of how I might refer to the request, say to
display the User-Agent?
I must be missing something really obvious as I still can't see how I
can reference the request in my code. In Zope/DTML this is trivial -
just write <dtml-var REQUEST>.
Thanks in advance.
Ian.
More information about the Seaside
mailing list