On Tue, Dec 18, 2012 at 12:37 PM, tonthon <[email protected]> wrote:

> Hi,
>
> We've got an application using beaker and SessionAuthenticationPolicy.
>
> I'm trying to figure out how to add a "remember me" option to our login
> process.
>
> Is it possible to handle the session.timeout dynamically ?
> Should I use a custom cookie instead and handle it on login and in a
> custom forbidden view ?
>

I don't think you need to handle session.timeout. The timeout is used when
loading a session to determine, based on its creation time, if it should be
considered valid still. What you want to change is the cookie expiration, I
think.

Just set `request.session.cookie_expires = False` when remember me is
checked. I think that should work. The default is to set cookies which
expire when the browser is closed.

You can set the timeout for considering "remember me" cookies valid with
the "session.timeout" option in your configuration.

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.

Reply via email to