summaryrefslogtreecommitdiffstats
path: root/deluge/ui/web/auth.py
diff options
context:
space:
mode:
authorDamien Churchill <damoc@gmail.com>2009-08-18 22:04:58 +0000
committerDamien Churchill <damoc@gmail.com>2009-08-18 22:04:58 +0000
commit97163b7cb01a7f0ff4b1785945211959d493b443 (patch)
tree9957bac8ce5f36be56d37aded167ef4e029a31ce /deluge/ui/web/auth.py
parent199a307cd91c82cfec0d6a307fca3d1be06d4f45 (diff)
downloaddeluge-97163b7cb01a7f0ff4b1785945211959d493b443.tar.gz
deluge-97163b7cb01a7f0ff4b1785945211959d493b443.tar.bz2
deluge-97163b7cb01a7f0ff4b1785945211959d493b443.zip
change the session timeout to be configurable
Diffstat (limited to 'deluge/ui/web/auth.py')
-rw-r--r--deluge/ui/web/auth.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/deluge/ui/web/auth.py b/deluge/ui/web/auth.py
index 19cc45571..88ab81edf 100644
--- a/deluge/ui/web/auth.py
+++ b/deluge/ui/web/auth.py
@@ -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 \ No newline at end of file
+ return d