summaryrefslogtreecommitdiff
path: root/src/leap/bitmask/crypto/srpauth.py
diff options
context:
space:
mode:
authorKali Kaneko <kali@leap.se>2015-01-08 14:34:13 -0400
committerKali Kaneko <kali@leap.se>2015-01-08 14:34:13 -0400
commitfdbfe431c52b2bc5a88a2328fe79de3035201099 (patch)
tree60d6af48f468f0dcd1922998e663f2273a55c41e /src/leap/bitmask/crypto/srpauth.py
parent77b576b58f7f533ff4f6a31594bb53d4ffad9d49 (diff)
parent54521d35d239c2e62d42e9c77690b9d1bc94f7db (diff)
Merge branch 'release/0.8.x' into debian/experimental
Diffstat (limited to 'src/leap/bitmask/crypto/srpauth.py')
-rw-r--r--src/leap/bitmask/crypto/srpauth.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/leap/bitmask/crypto/srpauth.py b/src/leap/bitmask/crypto/srpauth.py
index d59b3c31..c2a5f158 100644
--- a/src/leap/bitmask/crypto/srpauth.py
+++ b/src/leap/bitmask/crypto/srpauth.py
@@ -561,6 +561,14 @@ class SRPAuth(object):
self._reset_session()
+ # FIXME ---------------------------------------------------------
+ # 1. it makes no sense to defer each callback to a thread
+ # 2. the decision to use threads should be at another level.
+ # (although it's not really needed, that was a hack around
+ # the gui blocks)
+ # it makes very hard to test this. The __impl could be
+ # separated and decoupled from the provider_config abstraction.
+
d = threads.deferToThread(self._authentication_preprocessing,
username=username,
password=password)
@@ -736,6 +744,8 @@ class SRPAuth(object):
:type username: str
:param password: password for this user
:type password: str
+ :returns: a Deferred that will fire when the authentication is done
+ :rtype: Deferred
"""
username = username.lower()
d = self.__instance.authenticate(username, password)