From 5e418935bdc5c64bc1cef8d5f440dc79cc6e2892 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Touceda?= Date: Thu, 3 Oct 2013 13:45:11 -0300 Subject: Update provider_config in SRPAuth initialization --- changes/better_support_login_multiple_providers | 2 ++ src/leap/bitmask/crypto/srpauth.py | 7 +++++++ 2 files changed, 9 insertions(+) create mode 100644 changes/better_support_login_multiple_providers diff --git a/changes/better_support_login_multiple_providers b/changes/better_support_login_multiple_providers new file mode 100644 index 00000000..c31d5931 --- /dev/null +++ b/changes/better_support_login_multiple_providers @@ -0,0 +1,2 @@ + o Fixes a bug where you cannot login to a different provider once + you logged in to another one. \ No newline at end of file diff --git a/src/leap/bitmask/crypto/srpauth.py b/src/leap/bitmask/crypto/srpauth.py index 90d9ea0a..42262610 100644 --- a/src/leap/bitmask/crypto/srpauth.py +++ b/src/leap/bitmask/crypto/srpauth.py @@ -603,6 +603,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 -- cgit v1.2.3