Session object that uses container package for storage.
invalidate_corrupt (bool) – How to handle corrupt data when loading. When
set to True, then corrupt data will be silently
invalidated and a new session created,
otherwise invalid data will cause an exception.
use_cookies (bool) – Whether or not cookies should be created. When set to
False, it is assumed the user will handle storing the
session on their own.
type – What data backend type should be used to store the underlying
key – The name the cookie should be set to.
timeout (int) – How long session data is considered valid. This is used
regardless of the cookie being present or not to determine
whether session data is still valid.
cookie_expires – Expiration date for cookie
cookie_domain – Domain to use for the cookie.
cookie_path – Path to use for the cookie.
secure – Whether or not the cookie should only be sent over SSL.
httponly – Whether or not the cookie should only be accessible by
encrypt_key – The key to use for the local session encryption, if not
provided the session will not be encrypted.
validate_key – The key used to sign the local encrypted session
Invalidates this session, creates a new session id, returns
to the is_new state
class beaker.session.SessionObject(environ, **params)¶
Session proxy/lazy creator
This object proxies access to the actual session object, so that in
the case that the session hasn’t been used before, it will be
setup. This avoid creating and loading the session from persistent
storage unless its actually used during the request.
If its set to autosave, then the entire session will be saved
regardless of if save() has been called. Otherwise, just the
accessed time will be updated if save() was not called, or
the session will be saved if save() was called.