diff options
author | Kanagaraj Manickam <kanagaraj.manickam@huawei.com> | 2020-09-25 15:51:55 +0530 |
---|---|---|
committer | Kanagaraj Manickam <kanagaraj.manickam@huawei.com> | 2020-10-19 22:19:55 +0530 |
commit | a94ce6ef25704af2431f8a2ff720f4a4e4fb300e (patch) | |
tree | 6f340b94492b8f10ded23c6946c8de449b30b00d /opnfv_testapi | |
parent | fb20d7e9fae54e985800e30adbe80ebad4e8e981 (diff) |
Added Token Generation while login
Issue-ID: DOVETAIL-801
Signed-off-by: Kanagaraj Manickam <kanagaraj.manickam@huawei.com>
Change-Id: I8acbcf4ce21adfb8c82ec1be7577ed9b5acd094c
Diffstat (limited to 'opnfv_testapi')
-rw-r--r-- | opnfv_testapi/ui/auth/sign.py | 3 |
1 files changed, 3 insertions, 0 deletions
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) |