diff options
author | Daniel Wagner-Hall <daniel@matrix.org> | 2015-08-19 15:20:09 +0100 |
---|---|---|
committer | Daniel Wagner-Hall <daniel@matrix.org> | 2015-08-19 15:20:09 +0100 |
commit | f9e7493ac29f1a7474d9eeb8d1d50e3d57425768 (patch) | |
tree | c56c17762b3f1b6a60b801fed3d7ca05c8e7044e /synapse/handlers/auth.py | |
parent | Merge branch 'master' into auth (diff) | |
parent | Remove an access token log line (diff) | |
download | synapse-f9e7493ac29f1a7474d9eeb8d1d50e3d57425768.tar.xz |
Merge branch 'develop' into auth
Diffstat (limited to 'synapse/handlers/auth.py')
-rw-r--r-- | synapse/handlers/auth.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/synapse/handlers/auth.py b/synapse/handlers/auth.py index 98d99dd0a8..be2baeaece 100644 --- a/synapse/handlers/auth.py +++ b/synapse/handlers/auth.py @@ -283,14 +283,15 @@ class AuthHandler(BaseHandler): StoreError if there was a problem storing the token. LoginError if there was an authentication problem. """ - self._check_password(user_id, password) + yield self._check_password(user_id, password) reg_handler = self.hs.get_handlers().registration_handler access_token = reg_handler.generate_token(user_id) - logger.info("Adding token %s for user %s", access_token, user_id) + logger.info("Logging in user %s", user_id) yield self.store.add_access_token_to_user(user_id, access_token) defer.returnValue(access_token) + @defer.inlineCallbacks def _check_password(self, user_id, password): """Checks that user_id has passed password, raises LoginError if not.""" user_info = yield self.store.get_user_by_id(user_id=user_id) |