From: Kanagaraj Manickam Date: Fri, 25 Sep 2020 10:21:55 +0000 (+0530) Subject: Added Token Generation while login X-Git-Tag: opnfv-10.0.0~21 X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=a94ce6ef25704af2431f8a2ff720f4a4e4fb300e;p=dovetail-webportal.git Added Token Generation while login Issue-ID: DOVETAIL-801 Signed-off-by: Kanagaraj Manickam Change-Id: I8acbcf4ce21adfb8c82ec1be7577ed9b5acd094c --- diff --git a/opnfv_testapi/ui/auth/sign.py b/opnfv_testapi/ui/auth/sign.py index 6a9092a..9652364 100644 --- a/opnfv_testapi/ui/auth/sign.py +++ b/opnfv_testapi/ui/auth/sign.py @@ -314,5 +314,8 @@ class LoginHandler(base.BaseHandler): response_text = response.content if "unrecognized username or password" in response_text: 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)