summary refs log tree commit diff
path: root/synapse/federation/transport/server.py
diff options
context:
space:
mode:
authorMark Haines <mark.haines@matrix.org>2015-07-23 16:03:38 +0100
committerMark Haines <mark.haines@matrix.org>2015-07-23 16:03:38 +0100
commit62c010283d543db0956066b42eb735b57c000a82 (patch)
tree0ad9dc05ec50ad5995535fe341ccd3b591d8591f /synapse/federation/transport/server.py
parentDisable receipts for now (diff)
downloadsynapse-62c010283d543db0956066b42eb735b57c000a82.tar.xz
Add federation support for end-to-end key requests
Diffstat (limited to 'synapse/federation/transport/server.py')
-rw-r--r--synapse/federation/transport/server.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/synapse/federation/transport/server.py b/synapse/federation/transport/server.py
index bad93c6b2f..fb59383ecd 100644
--- a/synapse/federation/transport/server.py
+++ b/synapse/federation/transport/server.py
@@ -325,6 +325,24 @@ class FederationInviteServlet(BaseFederationServlet):
         defer.returnValue((200, content))
 
 
+class FederationClientKeysQueryServlet(BaseFederationServlet):
+    PATH = "/client_keys/query"
+
+    @defer.inlineCallbacks
+    def on_POST(self, origin, content):
+        response = yield self.handler.on_client_key_query(origin, content)
+        defer.returnValue((200, response))
+
+
+class FederationClientKeysClaimServlet(BaseFederationServlet):
+    PATH = "/client_keys/claim"
+
+    @defer.inlineCallbacks
+    def on_POST(self, origin, content):
+        response = yield self.handler.on_client_key_claim(origin, content)
+        defer.returnValue((200, response))
+
+
 class FederationQueryAuthServlet(BaseFederationServlet):
     PATH = "/query_auth/([^/]*)/([^/]*)"
 
@@ -373,4 +391,6 @@ SERVLET_CLASSES = (
     FederationQueryAuthServlet,
     FederationGetMissingEventsServlet,
     FederationEventAuthServlet,
+    FederationClientKeysQueryServlet,
+    FederationClientKeysClaimServlet,
 )