summaryrefslogtreecommitdiff
path: root/src/leap/bitmask/crypto
diff options
context:
space:
mode:
authorIvan Alejandro <ivanalejandro0@gmail.com>2013-10-03 15:18:03 -0300
committerIvan Alejandro <ivanalejandro0@gmail.com>2013-10-03 15:18:03 -0300
commit0690de8d28a8bbb99e08a4c93837c843f8cda2f4 (patch)
tree95611e5f89f81495ca3f69b2323a2b650ada98e3 /src/leap/bitmask/crypto
parentd0371ad6b83c8c4e1fdbf2cf99bff317832f0062 (diff)
parentb6d7ffdb354ad4727f6a4dd158d439a2e768d68c (diff)
Merge remote-tracking branch 'chiiph/bug/login_multiple_providers' into develop
Diffstat (limited to 'src/leap/bitmask/crypto')
-rw-r--r--src/leap/bitmask/crypto/srpauth.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/leap/bitmask/crypto/srpauth.py b/src/leap/bitmask/crypto/srpauth.py
index 90d9ea0a..cbff4b49 100644
--- a/src/leap/bitmask/crypto/srpauth.py
+++ b/src/leap/bitmask/crypto/srpauth.py
@@ -508,6 +508,8 @@ class SRPAuth(QtCore.QObject):
self._username = username
self._password = password
+ self._session = self._fetcher.session()
+
d = threads.deferToThread(self._authentication_preprocessing,
username=username,
password=password)
@@ -603,6 +605,13 @@ class SRPAuth(QtCore.QObject):
# Store instance reference as the only member in the handle
self.__dict__['_SRPAuth__instance'] = SRPAuth.__instance
+ # Generally, we initialize this with a provider_config once,
+ # and after that initialize it without one and use the one
+ # that was assigned before. But we need to update it if we
+ # want to be able to logout and login into another provider.
+ if provider_config is not None:
+ SRPAuth.__instance._provider_config = provider_config
+
def authenticate(self, username, password):
"""
Executes the whole authentication process for a user