change the session timeout to be configurable
This commit is contained in:
parent
199a307cd9
commit
97163b7cb0
|
@ -121,8 +121,10 @@ class Auth(JSONComponent):
|
|||
m.update(str(random.getrandbits(40)))
|
||||
m.update(m.hexdigest())
|
||||
session_id = m.hexdigest()
|
||||
|
||||
config = component.get("DelugeWeb").config
|
||||
|
||||
expires = int(time.time()) + 3600
|
||||
expires = int(time.time()) + config["session_timeout"]
|
||||
expires_str = time.strftime('%a, %d %b %Y %H:%M:%S UTC',
|
||||
time.gmtime(expires))
|
||||
|
||||
|
@ -298,4 +300,4 @@ class Auth(JSONComponent):
|
|||
log.debug("Failed to detect the login method")
|
||||
d.callback(False)
|
||||
|
||||
return d
|
||||
return d
|
||||
|
|
|
@ -85,6 +85,7 @@ CONFIG_DEFAULTS = {
|
|||
"pwd_salt": "c26ab3bbd8b137f99cd83c2c1c0963bcc1a35cad",
|
||||
"pwd_sha1": "2ce1a410bcdcc53064129b6d950f2e9fee4edc1e",
|
||||
"base": "",
|
||||
"session_timeout": 3600,
|
||||
"sessions": {},
|
||||
"sidebar_show_zero": False,
|
||||
"sidebar_show_trackers": False,
|
||||
|
|
Loading…
Reference in New Issue