aboutsummaryrefslogtreecommitdiff
path: root/api/events.py
diff options
context:
space:
mode:
Diffstat (limited to 'api/events.py')
-rw-r--r--api/events.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/api/events.py b/api/events.py
index 8974666..c811be4 100644
--- a/api/events.py
+++ b/api/events.py
@@ -10,10 +10,13 @@ import time
def get_token(environ):
cookie = environ.get("HTTP_COOKIE")
if not cookie: return None
+
parsed = cookies.SimpleCookie()
parsed.load(cookie)
+
token = parsed.get("token")
if not token: return None
+
return token.value
@io.on("connect")