From a94ce6ef25704af2431f8a2ff720f4a4e4fb300e Mon Sep 17 00:00:00 2001 From: Kanagaraj Manickam Date: Fri, 25 Sep 2020 15:51:55 +0530 Subject: Added Token Generation while login Issue-ID: DOVETAIL-801 Signed-off-by: Kanagaraj Manickam Change-Id: I8acbcf4ce21adfb8c82ec1be7577ed9b5acd094c --- opnfv_testapi/ui/auth/sign.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'opnfv_testapi/ui/auth/sign.py') 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) -- cgit 1.2.3-korg