From 92103cb2c8b8bff6b522a7bfa8a3a776b4821b11 Mon Sep 17 00:00:00 2001 From: Quentin Gliech Date: Tue, 14 Jun 2022 10:51:15 +0200 Subject: Decouple `synapse.api.auth_blocking.AuthBlocking` from `synapse.api.auth.Auth`. (#13021) --- synapse/server.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'synapse/server.py') diff --git a/synapse/server.py b/synapse/server.py index a66ec228db..a6a415aeab 100644 --- a/synapse/server.py +++ b/synapse/server.py @@ -29,6 +29,7 @@ from twisted.web.iweb import IPolicyForHTTPS from twisted.web.resource import Resource from synapse.api.auth import Auth +from synapse.api.auth_blocking import AuthBlocking from synapse.api.filtering import Filtering from synapse.api.ratelimiting import Ratelimiter, RequestRatelimiter from synapse.appservice.api import ApplicationServiceApi @@ -379,6 +380,10 @@ class HomeServer(metaclass=abc.ABCMeta): def get_auth(self) -> Auth: return Auth(self) + @cache_in_self + def get_auth_blocking(self) -> AuthBlocking: + return AuthBlocking(self) + @cache_in_self def get_http_client_context_factory(self) -> IPolicyForHTTPS: if self.config.tls.use_insecure_ssl_client_just_for_testing_do_not_use: -- cgit 1.4.1