Only load the SSO redirect servlet if SSO is enabled. (#15421)

This commit is contained in:
Dirk Klimpel 2023-04-13 15:08:00 +02:00 committed by GitHub
parent be36600327
commit c9723a1c1f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

1
changelog.d/15421.misc Normal file
View File

@ -0,0 +1 @@
Only load the SSO redirect servlet if SSO is enabled.

View File

@ -675,7 +675,12 @@ def register_servlets(hs: "HomeServer", http_server: HttpServer) -> None:
and hs.config.registration.refreshable_access_token_lifetime is not None
):
RefreshTokenServlet(hs).register(http_server)
SsoRedirectServlet(hs).register(http_server)
if (
hs.config.cas.cas_enabled
or hs.config.saml2.saml2_enabled
or hs.config.oidc.oidc_enabled
):
SsoRedirectServlet(hs).register(http_server)
if hs.config.cas.cas_enabled:
CasTicketServlet(hs).register(http_server)