diff options
author | Mark Haines <mjark@negativecurvature.net> | 2015-08-18 09:12:54 +0100 |
---|---|---|
committer | Mark Haines <mjark@negativecurvature.net> | 2015-08-18 09:12:54 +0100 |
commit | 8899df13bf80a5a3dda2a2df2bc28da0808faa4e (patch) | |
tree | 8251dfa08e9983e23a612fc8ff43475d453ed87b /synapse/federation/transport/server.py | |
parent | Fix bug where we were leaking None into state event lists (diff) | |
parent | Merge remote-tracking branch 'origin/develop' into markjh/end-to-end-key-fede... (diff) | |
download | synapse-8899df13bf80a5a3dda2a2df2bc28da0808faa4e.tar.xz |
Merge pull request #208 from matrix-org/markjh/end-to-end-key-federation
Federation for end-to-end key requests.
Diffstat (limited to 'synapse/federation/transport/server.py')
-rw-r--r-- | synapse/federation/transport/server.py | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/synapse/federation/transport/server.py b/synapse/federation/transport/server.py index bad93c6b2f..36f250e1a3 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 = "/user/keys/query" + + @defer.inlineCallbacks + def on_POST(self, origin, content, query): + response = yield self.handler.on_query_client_keys(origin, content) + defer.returnValue((200, response)) + + +class FederationClientKeysClaimServlet(BaseFederationServlet): + PATH = "/user/keys/claim" + + @defer.inlineCallbacks + def on_POST(self, origin, content, query): + response = yield self.handler.on_claim_client_keys(origin, content) + defer.returnValue((200, response)) + + class FederationQueryAuthServlet(BaseFederationServlet): PATH = "/query_auth/([^/]*)/([^/]*)" @@ -373,4 +391,6 @@ SERVLET_CLASSES = ( FederationQueryAuthServlet, FederationGetMissingEventsServlet, FederationEventAuthServlet, + FederationClientKeysQueryServlet, + FederationClientKeysClaimServlet, ) |