How do I set a cookie?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

How do I set a cookie?

tblanchard
I want to stash some user identity information in a cookie so users  
can return to the site and be automatically logged in.

Where is the appropriate place to intercept the response to set the  
cookie?

Thanks,
-Todd
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: How do I set a cookie?

Avi  Bryant

On Mar 20, 2006, at 5:48 PM, Todd Blanchard wrote:

> I want to stash some user identity information in a cookie so users  
> can return to the site and be automatically logged in.
>
> Where is the appropriate place to intercept the response to set the  
> cookie?

The simplest thing is to do this in a callback:

self session redirectWithCookie: (WACookie key: 'foo' value: 'bar')

Avi
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside