From ebcf316318c344ab256ec073d841aa04f3d18d46 Mon Sep 17 00:00:00 2001 From: Kali Kaneko Date: Sat, 11 Oct 2014 16:30:33 +0200 Subject: add some notes about changes needed in srpauth --- src/leap/bitmask/crypto/srpauth.py | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/leap') 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) -- cgit v1.2.3