aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--opnfv_testapi/ui/auth/sign.py7
-rw-r--r--requirements.txt1
2 files changed, 6 insertions, 2 deletions
diff --git a/opnfv_testapi/ui/auth/sign.py b/opnfv_testapi/ui/auth/sign.py
index 9652364..0667227 100644
--- a/opnfv_testapi/ui/auth/sign.py
+++ b/opnfv_testapi/ui/auth/sign.py
@@ -27,6 +27,7 @@ import logging
import oauth2 as oauth
import requests
import json
+import memcache
root = logging.getLogger()
root.setLevel(logging.DEBUG)
@@ -316,6 +317,8 @@ class LoginHandler(base.BaseHandler):
raises.Unauthorized(message.invalid_credentials())
# generate random token
token = base.get_token()
- self.set_secure_cookie("token", token)
resp = {'status': 'success'}
- self.finish_request(resp)
+ mc = memcache.Client(['127.0.0.1:11211'], debug=0)
+ mc.set("token", token)
+ self.set_header("token", token)
+ self.finish_request(response)
diff --git a/requirements.txt b/requirements.txt
index e924f0b..7c7ee2f 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -26,3 +26,4 @@ python-cas==1.2.0
futures==3.2.0
python-slugify==2.0.1
Pillow==3.1.2
+python-memcached==1.59