[Catalyst] Session expiry per user

Bill Moseley moseley at hank.org
Fri Mar 14 12:53:04 GMT 2008


On Fri, Mar 14, 2008 at 12:33:19PM +0100, Alexandre Jousset wrote:
> 	Hello list,
> 
> 	I've problems to set session expiry time per user.
> 
> 	My goal is to have a default expiry time of "until you quit the 
> browser" unless the user logs in and select a checkbox to have the site 
> "remember" her (i.e. set expiry time to 1 year).

There's a plugin that is designed for that:

http://search.cpan.org/~nuffin/Catalyst-Plugin-Session-DynamicExpiry-0.02/lib/Catalyst/Plugin/Session/DynamicExpiry.pm

I'm not using it, but I looked at it in detail one day and had some
problems.  I think I posted a patch.  Yes, December 5th with the
subject Patch for Catalyst::Plugin::Session::DynamicExpiry

> $c->config->{session}{expires} = 31536000 if $c->req->param('remember_me');

That's per process.

-- 
Bill Moseley
moseley at hank.org




More information about the Catalyst mailing list