summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorRichard van der Hoff <richard@matrix.org>2017-11-01 17:03:20 +0000
committerRichard van der Hoff <richard@matrix.org>2017-11-01 17:03:20 +0000
commit979eed43627e3d13a8a09d4904c80d84b0b6e609 (patch)
tree59052fc61c2c6ea8232782f50a0f70b332a56787 /synapse
parentAllow password_auth_providers to return a callback (diff)
downloadsynapse-979eed43627e3d13a8a09d4904c80d84b0b6e609.tar.xz
Fix user-interactive password auth
this got broken in the previous commit
Diffstat (limited to '')
-rw-r--r--synapse/handlers/auth.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/synapse/handlers/auth.py b/synapse/handlers/auth.py
index 5c89768c14..11d2b804d4 100644
--- a/synapse/handlers/auth.py
+++ b/synapse/handlers/auth.py
@@ -270,6 +270,7 @@ class AuthHandler(BaseHandler):
         sess = self._get_session_info(session_id)
         return sess.setdefault('serverdict', {}).get(key, default)
 
+    @defer.inlineCallbacks
     def _check_password_auth(self, authdict, _):
         if "user" not in authdict or "password" not in authdict:
             raise LoginError(400, "", Codes.MISSING_PARAM)
@@ -277,10 +278,11 @@ class AuthHandler(BaseHandler):
         user_id = authdict["user"]
         password = authdict["password"]
 
-        return self.validate_login(user_id, {
+        (canonical_id, callback) = yield self.validate_login(user_id, {
             "type": LoginType.PASSWORD,
             "password": password,
         })
+        defer.returnValue(canonical_id)
 
     @defer.inlineCallbacks
     def _check_recaptcha(self, authdict, clientip):