summary refs log tree commit diff
path: root/synapse/rest/register.py
diff options
context:
space:
mode:
authorDavid Baker <dbkr@matrix.org>2014-09-03 18:22:27 +0100
committerDavid Baker <dbkr@matrix.org>2014-09-03 18:22:27 +0100
commitd6ecbbdf0ad4fb49d189044ebf73f333fdd323dc (patch)
tree00757748fadc3da07cc74a24b8b1ad38f162ea69 /synapse/rest/register.py
parentMerge branch 'master' into develop (diff)
downloadsynapse-d6ecbbdf0ad4fb49d189044ebf73f333fdd323dc.tar.xz
Add support for registering with a threepid to the HS (get credentials from the client and check them against an ID server).
Diffstat (limited to '')
-rw-r--r--synapse/rest/register.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/synapse/rest/register.py b/synapse/rest/register.py
index f17ec11cf4..27ab7f182b 100644
--- a/synapse/rest/register.py
+++ b/synapse/rest/register.py
@@ -47,10 +47,15 @@ class RegisterRestServlet(RestServlet):
         except KeyError:
             pass  # user_id is optional
 
+        threepidCreds = None
+        if 'threepidCreds' in register_json:
+            threepidCreds = register_json['threepidCreds']
+
         handler = self.handlers.registration_handler
         (user_id, token) = yield handler.register(
             localpart=desired_user_id,
-            password=password)
+            password=password,
+            threepidCreds=threepidCreds)
 
         result = {
             "user_id": user_id,