Allow using OpenID userinfo endpoint with federation disabled, fixes #240

Even though it's in SS API this is not really related to federation, so
it makes sense to allow using this endpoint with allow_federation=false
This commit is contained in:
dasha_uwu
2025-12-15 20:05:02 +05:00
committed by Jason Volk
parent c9a26a0280
commit b5f50c3fda

View File

@@ -195,6 +195,9 @@ pub fn build(router: Router<State>, server: &Server) -> Router<State> {
.ruma_route(&client::room_initial_sync_route)
.route("/client/server.json", get(client::syncv3_client_server_json));
// SS endpoint not related to federation
router = router.ruma_route(&server::get_openid_userinfo_route);
if config.allow_federation {
router = router
.ruma_route(&server::get_server_version_route)
@@ -226,7 +229,6 @@ pub fn build(router: Router<State>, server: &Server) -> Router<State> {
.ruma_route(&server::get_profile_information_route)
.ruma_route(&server::get_keys_route)
.ruma_route(&server::claim_keys_route)
.ruma_route(&server::get_openid_userinfo_route)
.ruma_route(&server::get_hierarchy_route)
.ruma_route(&server::well_known_server)
.ruma_route(&server::get_content_route)