On 5/15/07, Jonathan Rockway <[EMAIL PROTECTED]> wrote:
Use the session plugin and set the session expiration to ... 1 week. If some
data needs to expire sooner than that ... expire it sooner than that.
Here's what I would do. Create a session and log the user in. Store a "last
login" time in the user_class. If the last_login (or last_activity;
whatever) is too long ago, delete data from the session and start over.
Yep, makes sense. However, even in that case, I was hoping that the
standard session/auth plugins would support this functionality without
doing anything additional in my Controller::Auth, i.e.:
if ($c->req->params->{login_remember}) {
$c->login($email, $password, $expires_long);
} else {
$c->login($email, $password, $expires_short);
}
Am I wrong in thinking that pretty much any decent login system has to
support this anyway?.. (This is my first Catalyst project, so I
wouldn't be surprised if there's a one-liner out there that would
solve this problem without a need for the above - sorry if that's the
case.)
--
-----------------------------------------------------
Evaldas Imbrasas
http://www.imbrasas.com
_______________________________________________
List: [email protected]
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/