summary refs log tree commit diff
path: root/synapse/rest
diff options
context:
space:
mode:
Diffstat (limited to 'synapse/rest')
-rw-r--r--synapse/rest/client/v2_alpha/__init__.py4
-rw-r--r--synapse/rest/client/v2_alpha/account.py (renamed from synapse/rest/client/v2_alpha/password.py)15
2 files changed, 17 insertions, 2 deletions
diff --git a/synapse/rest/client/v2_alpha/__init__.py b/synapse/rest/client/v2_alpha/__init__.py
index 86e4bc729e..28d95b2729 100644
--- a/synapse/rest/client/v2_alpha/__init__.py
+++ b/synapse/rest/client/v2_alpha/__init__.py
@@ -16,7 +16,7 @@
 from . import (
     sync,
     filter,
-    password,
+    account,
     register,
     auth
 )
@@ -35,6 +35,6 @@ class ClientV2AlphaRestResource(JsonResource):
     def register_servlets(client_resource, hs):
         sync.register_servlets(hs, client_resource)
         filter.register_servlets(hs, client_resource)
-        password.register_servlets(hs, client_resource)
+        account.register_servlets(hs, client_resource)
         register.register_servlets(hs, client_resource)
         auth.register_servlets(hs, client_resource)
diff --git a/synapse/rest/client/v2_alpha/password.py b/synapse/rest/client/v2_alpha/account.py
index cb0c8cfb55..0f3b12880c 100644
--- a/synapse/rest/client/v2_alpha/password.py
+++ b/synapse/rest/client/v2_alpha/account.py
@@ -75,5 +75,20 @@ class PasswordRestServlet(RestServlet):
         return 200, {}
 
 
+class AddThreepidRestServlet(RestServlet):
+    PATTERN = client_v2_pattern("/account/3pid")
+
+    @defer.inlineCallbacks
+    def on_POST(self, request):
+        body = parse_json_dict_from_request(request)
+
+        if 'threePidCreds' not in body:
+            raise SynapseError(400, "Missing param", Codes.MISSING_PARAM)
+
+        auth_user, client = yield self.auth.get_user_by_req(request)
+
+
+
+
 def register_servlets(hs, http_server):
     PasswordRestServlet(hs).register(http_server)