diff options
-rw-r--r-- | service/pixelated/authentication.py | 10 | ||||
-rw-r--r-- | service/pixelated/resources/backup_account_resource.py | 2 | ||||
-rw-r--r-- | service/test/unit/resources/test_backup_account_resource.py | 2 | ||||
-rw-r--r-- | service/test/unit/test_authentication.py | 2 |
4 files changed, 8 insertions, 8 deletions
diff --git a/service/pixelated/authentication.py b/service/pixelated/authentication.py index 27d6035a..b5edbec0 100644 --- a/service/pixelated/authentication.py +++ b/service/pixelated/authentication.py @@ -30,7 +30,7 @@ class Authenticator(object): def __init__(self, leap_provider): self._leap_provider = leap_provider self.domain = leap_provider.server_name - self.bonafide_sesssion = None + self.bonafide_session = None @inlineCallbacks def authenticate(self, username, password): @@ -50,11 +50,11 @@ class Authenticator(object): def _bonafide_auth(self, user, password): srp_provider = Api(self._leap_provider.api_uri) credentials = Credentials(user, password) - self.bonafide_sesssion = Session(credentials, srp_provider, self._leap_provider.local_ca_crt) - yield self.bonafide_sesssion.authenticate() + self.bonafide_session = Session(credentials, srp_provider, self._leap_provider.local_ca_crt) + yield self.bonafide_session.authenticate() returnValue(Authentication(user, - self.bonafide_sesssion.token, - self.bonafide_sesssion.uuid, + self.bonafide_session.token, + self.bonafide_session.uuid, 'session_id', {'is_admin': False})) diff --git a/service/pixelated/resources/backup_account_resource.py b/service/pixelated/resources/backup_account_resource.py index d7e081d6..3d95879c 100644 --- a/service/pixelated/resources/backup_account_resource.py +++ b/service/pixelated/resources/backup_account_resource.py @@ -49,7 +49,7 @@ class BackupAccountResource(BaseResource): return renderElement(request, site) def render_POST(self, request): - account_recovery = AccountRecovery(self._authenticator.bonafide_sesssion) + account_recovery = AccountRecovery(self._authenticator.bonafide_session) def update_response(response): request.setResponseCode(NO_CONTENT) diff --git a/service/test/unit/resources/test_backup_account_resource.py b/service/test/unit/resources/test_backup_account_resource.py index e169062e..2e676d9b 100644 --- a/service/test/unit/resources/test_backup_account_resource.py +++ b/service/test/unit/resources/test_backup_account_resource.py @@ -53,7 +53,7 @@ class TestBackupAccountResource(unittest.TestCase): d = self.web.get(request) def assert_update_recovery_code_called(_): - mock_account_recovery_init.assert_called_with(self.resource._authenticator.bonafide_sesssion) + mock_account_recovery_init.assert_called_with(self.resource._authenticator.bonafide_session) mock_account_recovery.update_recovery_code.assert_called() d.addCallback(assert_update_recovery_code_called) diff --git a/service/test/unit/test_authentication.py b/service/test/unit/test_authentication.py index 7b260905..0d261685 100644 --- a/service/test/unit/test_authentication.py +++ b/service/test/unit/test_authentication.py @@ -77,7 +77,7 @@ class AuthenticatorTest(unittest.TestCase): self.assertEquals('username', resulting_auth.username) self.assertEquals('some_token', resulting_auth.token) self.assertEquals('some_uuid', resulting_auth.uuid) - self.assertEquals(mock_srp_auth, auth.bonafide_sesssion) + self.assertEquals(mock_srp_auth, auth.bonafide_session) def test_username_without_domain_is_not_changed(self): username_without_domain = 'username' |