summaryrefslogtreecommitdiff
path: root/src/leap/bitmask/crypto/srpauth.py
diff options
context:
space:
mode:
authorIvan Alejandro <ivanalejandro0@gmail.com>2013-09-16 19:07:18 -0300
committerIvan Alejandro <ivanalejandro0@gmail.com>2013-09-18 18:30:18 -0300
commit50cddfdc2a9624a84d624be93bcc01b9b81d39d8 (patch)
tree67708a1a98407cfe4e121be50ccfd71de49d20a3 /src/leap/bitmask/crypto/srpauth.py
parent956878cd1c33d2a7325a9f627b99190a544a35b9 (diff)
Use generic username/password message.
Diffstat (limited to 'src/leap/bitmask/crypto/srpauth.py')
-rw-r--r--src/leap/bitmask/crypto/srpauth.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/leap/bitmask/crypto/srpauth.py b/src/leap/bitmask/crypto/srpauth.py
index 776fb2cc..8477ea9e 100644
--- a/src/leap/bitmask/crypto/srpauth.py
+++ b/src/leap/bitmask/crypto/srpauth.py
@@ -171,6 +171,9 @@ class SRPAuth(QtCore.QObject):
self._srp_user = None
self._srp_a = None
+ # Error msg displayed if the username or the password is invalid
+ self._WRONG_USER_PASS = self.tr("Invalid username or password.")
+
# User credentials stored for password changing checks
self._username = None
self._password = None
@@ -265,7 +268,7 @@ class SRPAuth(QtCore.QObject):
"Status code = %r. Content: %r" %
(init_session.status_code, content))
if init_session.status_code == 422:
- raise SRPAuthUnknownUser(self.tr("Unknown user"))
+ raise SRPAuthUnknownUser(self._WRONG_USER_PASS)
raise SRPAuthBadStatusCode(self.tr("There was a problem with"
" authentication"))
@@ -354,7 +357,7 @@ class SRPAuth(QtCore.QObject):
"received: %s", (content,))
logger.error("[%s] Wrong password (HAMK): [%s]" %
(auth_result.status_code, error))
- raise SRPAuthBadPassword(self.tr("Wrong password"))
+ raise SRPAuthBadPassword(self._WRONG_USER_PASS)
if auth_result.status_code not in (200,):
logger.error("No valid response (HAMK): "