summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKali Kaneko <kali@leap.se>2014-10-11 16:30:33 +0200
committerIvan Alejandro <ivanalejandro0@gmail.com>2014-12-19 17:29:57 -0300
commitebcf316318c344ab256ec073d841aa04f3d18d46 (patch)
tree9dc5d5177c184142726207d93f9575fe5ae10048
parent78f0eedf5cd4451540807b2d656ede1d96c9e31c (diff)
add some notes about changes needed in srpauth
-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)