[Catalyst] Implementing a 'remember me on this computer' button
Eden Cardim
edencardim at gmail.com
Mon Apr 11 19:24:52 GMT 2011
>>>>> "Edmund" == Edmund von der Burg <evdb at ecclestoad.co.uk> writes:
Edmund> That is a configuration parameter and so gets set at startup and is
Edmund> applied to all cookies from then on. I want to be able to change the
Edmund> expiry for an particular cookie so that some sessions persist and
Edmund> others don't.
You can always manipulate the session cookies manually. Use
$c->get_session_cookie, it returns a CGI::Simple::Cookie.
--8<---------------cut here---------------start------------->8---
->config->{Plugin::Session::State::Cookie}{cookie_expires} = 0;
$c->authenticate;
$c->get_session_cookie->expires($ttl) if $remember_user;
--8<---------------cut here---------------end--------------->8---
Should do the trick.
--
Eden Cardim Need help with your Catalyst or DBIx::Class project?
Code Monkey http://www.shadowcat.co.uk/catalyst/
Shadowcat Systems Ltd. Want a managed development or deployment platform?
http://blog.edencardim.com/ http://www.shadowcat.co.uk/servers/
More information about the Catalyst
mailing list