summaryrefslogtreecommitdiff
path: root/service/pixelated/bitmask_libraries
diff options
context:
space:
mode:
authorBruno Wagner <bwagner@riseup.net>2016-08-19 17:13:58 -0300
committerBruno Wagner <bwagner@riseup.net>2016-08-19 17:13:58 -0300
commit9c5811c6b760415372c6cc67a9d34680c990cdd8 (patch)
tree5bc1f3adc2712f936ec70f0bc529ea8eff9bce6a /service/pixelated/bitmask_libraries
parentdb9917a769edacfffc9ae1166f07473a30471ef2 (diff)
Removed auth from leap session #759
Authentication is now consistently done before creating the leap session, so I removed the auth attempt from inside the leap session factory
Diffstat (limited to 'service/pixelated/bitmask_libraries')
-rw-r--r--service/pixelated/bitmask_libraries/session.py9
1 files changed, 2 insertions, 7 deletions
diff --git a/service/pixelated/bitmask_libraries/session.py b/service/pixelated/bitmask_libraries/session.py
index e410119e..72ad8520 100644
--- a/service/pixelated/bitmask_libraries/session.py
+++ b/service/pixelated/bitmask_libraries/session.py
@@ -205,7 +205,7 @@ class LeapSessionFactory(object):
self._provider = provider
self._config = provider.config
- def create(self, username, password, auth=None):
+ def create(self, username, password, auth):
key = SessionCache.session_key(self._provider, username)
session = SessionCache.lookup_session(key)
if not session:
@@ -214,12 +214,7 @@ class LeapSessionFactory(object):
return session
- def _auth_leap(self, username, password):
- srp_auth = SRPAuth(self._provider.api_uri, self._provider.local_ca_crt)
- return srp_auth.authenticate(username, password)
-
- def _create_new_session(self, username, password, auth=None):
- auth = auth or self._auth_leap(username, password)
+ def _create_new_session(self, username, password, auth):
account_email = self._provider.address_for(username)
self._create_database_dir(auth.uuid)