summaryrefslogtreecommitdiff
path: root/src/leap/crypto/srpauth.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/leap/crypto/srpauth.py')
-rw-r--r--src/leap/crypto/srpauth.py13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/leap/crypto/srpauth.py b/src/leap/crypto/srpauth.py
index 8e228e79..6474bdbb 100644
--- a/src/leap/crypto/srpauth.py
+++ b/src/leap/crypto/srpauth.py
@@ -51,18 +51,21 @@ class SRPAuthConnectionError(SRPAuthenticationError):
"""
pass
+
class SRPAuthUnknownUser(SRPAuthenticationError):
"""
Exception raised when trying to authenticate an unknown user
"""
pass
+
class SRPAuthBadStatusCode(SRPAuthenticationError):
"""
Exception raised when we received an unknown bad status code
"""
pass
+
class SRPAuthNoSalt(SRPAuthenticationError):
"""
Exception raised when we don't receive the salt param at a
@@ -70,6 +73,7 @@ class SRPAuthNoSalt(SRPAuthenticationError):
"""
pass
+
class SRPAuthNoB(SRPAuthenticationError):
"""
Exception raised when we don't receive the B param at a specific
@@ -77,12 +81,14 @@ class SRPAuthNoB(SRPAuthenticationError):
"""
pass
+
class SRPAuthBadDataFromServer(SRPAuthenticationError):
"""
Generic exception when we receive bad data from the server.
"""
pass
+
class SRPAuthJSONDecodeError(SRPAuthenticationError):
"""
Exception raised when there's a problem decoding the JSON content
@@ -90,12 +96,14 @@ class SRPAuthJSONDecodeError(SRPAuthenticationError):
"""
pass
+
class SRPAuthBadPassword(SRPAuthenticationError):
"""
Exception raised when the user provided a bad password to auth.
"""
pass
+
class SRPAuthVerificationFailed(SRPAuthenticationError):
"""
Exception raised when we can't verify the SRP data received from
@@ -103,6 +111,7 @@ class SRPAuthVerificationFailed(SRPAuthenticationError):
"""
pass
+
class SRPAuthNoSessionId(SRPAuthenticationError):
"""
Exception raised when we don't receive a session id from the
@@ -110,6 +119,7 @@ class SRPAuthNoSessionId(SRPAuthenticationError):
"""
pass
+
class SRPAuth(QtCore.QObject):
"""
SRPAuth singleton
@@ -451,8 +461,7 @@ class SRPAuth(QtCore.QObject):
username=username)
d.addCallback(
partial(self._threader,
- self._extract_data),
- username=username)
+ self._extract_data))
d.addCallback(partial(self._threader,
self._verify_session))