aboutsummaryrefslogtreecommitdiffstats
path: root/opnfv_testapi/ui
diff options
context:
space:
mode:
Diffstat (limited to 'opnfv_testapi/ui')
-rw-r--r--opnfv_testapi/ui/auth/sign.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/opnfv_testapi/ui/auth/sign.py b/opnfv_testapi/ui/auth/sign.py
index 29be209..6a9092a 100644
--- a/opnfv_testapi/ui/auth/sign.py
+++ b/opnfv_testapi/ui/auth/sign.py
@@ -311,5 +311,8 @@ class LoginHandler(base.BaseHandler):
headers = {'Content-Type': 'application/x-www-form-urlencoded'}
response = requests.post('https://identity.linuxfoundation.org',
data=params, headers=headers)
+ response_text = response.content
+ if "unrecognized username or password" in response_text:
+ raises.Unauthorized(message.invalid_credentials())
resp = {'status': 'success'}
self.finish_request(resp)