diff options
author | Erik Johnston <erik@matrix.org> | 2015-04-29 13:34:38 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2015-04-29 13:34:38 +0100 |
commit | 64991b0c8ba6f8aefe11ce2d7efcd2363c2ddae3 (patch) | |
tree | f2f2f8b40c3949de88ef340cd4f25fa854beca12 /synapse/app | |
parent | Merge pull request #135 from matrix-org/erikj/postgres_charset_check (diff) | |
parent | bump database schema version (diff) | |
download | synapse-64991b0c8ba6f8aefe11ce2d7efcd2363c2ddae3.tar.xz |
Merge pull request #129 from matrix-org/key_distribution
Key distribution v2
Diffstat (limited to 'synapse/app')
-rwxr-xr-x | synapse/app/homeserver.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/synapse/app/homeserver.py b/synapse/app/homeserver.py index 29a1bf1d70..bc67e2a8e1 100755 --- a/synapse/app/homeserver.py +++ b/synapse/app/homeserver.py @@ -36,10 +36,12 @@ from synapse.http.server import JsonResource, RootRedirect from synapse.rest.media.v0.content_repository import ContentRepoResource from synapse.rest.media.v1.media_repository import MediaRepositoryResource from synapse.rest.key.v1.server_key_resource import LocalKey +from synapse.rest.key.v2 import KeyApiV2Resource from synapse.http.matrixfederationclient import MatrixFederationHttpClient from synapse.api.urls import ( CLIENT_PREFIX, FEDERATION_PREFIX, WEB_CLIENT_PREFIX, CONTENT_REPO_PREFIX, - SERVER_KEY_PREFIX, MEDIA_PREFIX, CLIENT_V2_ALPHA_PREFIX, STATIC_PREFIX + SERVER_KEY_PREFIX, MEDIA_PREFIX, CLIENT_V2_ALPHA_PREFIX, STATIC_PREFIX, + SERVER_KEY_V2_PREFIX, ) from synapse.config.homeserver import HomeServerConfig from synapse.crypto import context_factory @@ -97,6 +99,9 @@ class SynapseHomeServer(HomeServer): def build_resource_for_server_key(self): return LocalKey(self) + def build_resource_for_server_key_v2(self): + return KeyApiV2Resource(self) + def build_resource_for_metrics(self): if self.get_config().enable_metrics: return MetricsResource(self) @@ -134,6 +139,7 @@ class SynapseHomeServer(HomeServer): (FEDERATION_PREFIX, self.get_resource_for_federation()), (CONTENT_REPO_PREFIX, self.get_resource_for_content_repo()), (SERVER_KEY_PREFIX, self.get_resource_for_server_key()), + (SERVER_KEY_V2_PREFIX, self.get_resource_for_server_key_v2()), (MEDIA_PREFIX, self.get_resource_for_media_repository()), (STATIC_PREFIX, self.get_resource_for_static_content()), ] |