diff options
author | Kanagaraj Manickam <kanagaraj.manickam@huawei.com> | 2020-09-25 20:45:14 +0530 |
---|---|---|
committer | Kanagaraj Manickam <kanagaraj.manickam@huawei.com> | 2020-10-19 22:19:56 +0530 |
commit | 104b5565fca364c687e98ff8433f04c161398217 (patch) | |
tree | b5b18a07fc0123857ed923b3a7188bc30d58f4f9 | |
parent | fe4df15d566cd246f159cba826df9909aa83ead3 (diff) |
updated logout api validations
Issue-ID: DOVETAIL-801
Signed-off-by: Kanagaraj Manickam <kanagaraj.manickam@huawei.com>
Change-Id: I60bdd02743fb56b439b539869406484bbed8d445
-rw-r--r-- | opnfv_testapi/ui/auth/sign.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/opnfv_testapi/ui/auth/sign.py b/opnfv_testapi/ui/auth/sign.py index 11a95c4..23e711b 100644 --- a/opnfv_testapi/ui/auth/sign.py +++ b/opnfv_testapi/ui/auth/sign.py @@ -325,10 +325,10 @@ class LoginHandler(base.BaseHandler): class LogoutHandler(base.BaseHandler): def post(self): + input_token = self.request.headers._dict['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 : + if not token or not input_token == token : raises.Unauthorized(message.invalid_token()) mc.set("token", '') resp = {'Message': 'You have been logged out successfully.'} |