[Catalyst] Re: "You have been automatically logged out."

A. Pagaltzis pagaltzis at gmx.de
Thu Feb 22 16:25:40 GMT 2007


* Jonathan Rockway <jon at jrock.us> [2007-02-21 18:25]:
> It's probably worth it for someone to write an abstraction that
> automates this:
> 
> 1) Session expired; save $c->req->params and the intended
>    action

That’s not enough. Basically you need to serialise the request,
lock, stock and barrel. You need the method, URI, body and
possibly some of the headers. Give the blob a unique key and
stick it in a cache (so you don’t need to write expiry code;
plus the database is a bad place for this blob anyway as it can
get large).

> 2) Require authentication

The login form should contain the stored req key, of course.

> 3) restore params, forward to the saved intended action.

Better yet, actually unwind processing and start over with the
unserialised request, pretending it was the one that had just
happened. That way you achieve such magic as seamless processing
of uploads across session timeouts.

Regards,
-- 
Aristotle Pagaltzis // <http://plasmasturm.org/>



More information about the Catalyst mailing list