FedericoCeratto/bottle-cork

Login timeout too short

Closed this issue · 1 comments

Hello,

This isn't really an issue with cork but I'm not sure how to specify the length of time required before the user is asked to log in again.

My hunch is that it would be specified in the session_opts dict that is passed in to beaker's SessionMiddleware. But I'm not sure exactly which attribute it would be. I've tried a few things but it doesn't seem to lengthen the amount of time before I'm logged out again.

Thank you for any help.

I figured it out.

session_opts = {
'session.cookie_expires': True,
'session.encrypt_key': 'my little secret',
'session.httponly': True,
'session.timeout': 3600 * 24, # 1 day
'session.type': 'cookie',
'session.validate_key': True,
}