diff options
author | Kanagaraj Manickam <kanagaraj.manickam@huawei.com> | 2020-09-25 19:06:37 +0530 |
---|---|---|
committer | Kanagaraj Manickam <kanagaraj.manickam@huawei.com> | 2020-10-19 22:19:56 +0530 |
commit | 85fd9ed8d0ac4f2a85238653dfcacc52a398b6ba (patch) | |
tree | 6d253698e500c8711995c324fbcb37f24cf73b80 | |
parent | c97bb4110588c41211ae8ee960b1ae70a3f1de47 (diff) |
Addd Mem-cache for token validation
Issue-ID: DOVETAIL-801
Signed-off-by: Kanagaraj Manickam <kanagaraj.manickam@huawei.com>
Change-Id: I070d9ad49337741049ab6442df9ff2d8bc98d257
-rw-r--r-- | opnfv_testapi/ui/auth/sign.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/opnfv_testapi/ui/auth/sign.py b/opnfv_testapi/ui/auth/sign.py index 6b70d1a..fe10260 100644 --- a/opnfv_testapi/ui/auth/sign.py +++ b/opnfv_testapi/ui/auth/sign.py @@ -325,7 +325,8 @@ class LoginHandler(base.BaseHandler): class LogoutHandler(base.BaseHandler): def post(self): - token=self.get_secure_cookie('token') + mc = memcache.Client(['127.0.0.1:11211'], debug=0) + token = mc.get("token") input_token = self.request.headers._dict['Token'] if not input_token or not input_token == token : raises.Unauthorized(message.invalid_token()) |