[sessions] make persistent session keys customizable
This commit is contained in:
parent
32d7bb41fd
commit
1887f41eab
|
@ -25,15 +25,19 @@ class BasicSession(Session, CaptchaSession, StorableObject):
|
|||
ssl = False
|
||||
__remember = None
|
||||
|
||||
_has_info_keys = [ "lasso_login_dump", "lasso_session_dump",
|
||||
"question_key", "after_url", "name_identifiers", "proxied_idp",
|
||||
"authentication_method", "message" ]
|
||||
|
||||
def __init__(self, id = None):
|
||||
Session.__init__(self, id)
|
||||
self.name_identifiers = []
|
||||
|
||||
def has_info(self):
|
||||
return self.lasso_login_dump or self.lasso_session_dump or self.question_key or \
|
||||
self.after_url or self.name_identifiers or self.proxied_idp or \
|
||||
self.authentication_method or self.message or \
|
||||
Session.has_info(self) or CaptchaSession.has_info(self)
|
||||
for key in self._has_info_keys:
|
||||
if getattr(self, key, None):
|
||||
return True
|
||||
return Session.has_info(self) or CaptchaSession.has_info(self)
|
||||
is_dirty = has_info
|
||||
|
||||
def get_session_id(self):
|
||||
|
|
Reference in New Issue