summary refs log tree commit diff
path: root/synapse/handlers/auth.py
diff options
context:
space:
mode:
authorDavid Baker <dave@matrix.org>2015-04-15 17:14:25 +0100
committerDavid Baker <dave@matrix.org>2015-04-15 17:14:25 +0100
commit766bd8e88077cbeabffc353d9735a3af190abe61 (patch)
tree0a45dbf99c1ae64d736ac640e45d3aad9ffde83d /synapse/handlers/auth.py
parentRegstration with email in v2 (diff)
downloadsynapse-766bd8e88077cbeabffc353d9735a3af190abe61.tar.xz
Dummy login so we can do the first POST request to get login flows without it just succeeding
Diffstat (limited to 'synapse/handlers/auth.py')
-rw-r--r--synapse/handlers/auth.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/synapse/handlers/auth.py b/synapse/handlers/auth.py
index 2cc54707a2..87866f298d 100644
--- a/synapse/handlers/auth.py
+++ b/synapse/handlers/auth.py
@@ -42,6 +42,7 @@ class AuthHandler(BaseHandler):
             LoginType.PASSWORD: self._check_password_auth,
             LoginType.RECAPTCHA: self._check_recaptcha,
             LoginType.EMAIL_IDENTITY: self._check_email_identity,
+            LoginType.DUMMY: self._check_dummy_auth,
         }
         self.sessions = {}
 
@@ -202,6 +203,11 @@ class AuthHandler(BaseHandler):
 
         defer.returnValue(threepid)
 
+    @defer.inlineCallbacks
+    def _check_dummy_auth(self, authdict, _):
+        yield run_on_reactor()
+        defer.returnValue(True)
+
     def _get_params_recaptcha(self):
         return {"public_key": self.hs.config.recaptcha_public_key}