Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Load SSO rest API for redirect only if SSO is enabled #15421

Merged
merged 3 commits into from
Apr 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/15421.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Only load the SSO redirect servlet if SSO is enabled.
7 changes: 6 additions & 1 deletion synapse/rest/client/login.py
Original file line number Diff line number Diff line change
Expand Up @@ -672,7 +672,12 @@ def register_servlets(hs: "HomeServer", http_server: HttpServer) -> None:
LoginRestServlet(hs).register(http_server)
if 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)

Expand Down