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

Commit a265fbd

Browse files
authored
Register the login redirect endpoint for v3. (#11451)
As specified for Matrix v1.1.
1 parent b9fef1a commit a265fbd

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

changelog.d/11451.bugfix

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add support for the `/_matrix/client/v3/login/sso/redirect/{idpId}` API from Matrix v1.1. This endpoint was overlooked when support for v3 endpoints was added in v1.48.0rc1.

synapse/rest/client/login.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,7 @@ class SsoRedirectServlet(RestServlet):
513513
re.compile(
514514
"^"
515515
+ CLIENT_API_PREFIX
516-
+ "/r0/login/sso/redirect/(?P<idp_id>[A-Za-z0-9_.~-]+)$"
516+
+ "/(r0|v3)/login/sso/redirect/(?P<idp_id>[A-Za-z0-9_.~-]+)$"
517517
)
518518
]
519519

synapse/rest/client/room.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1138,12 +1138,12 @@ async def on_POST(
11381138

11391139

11401140
class RoomHierarchyRestServlet(RestServlet):
1141-
PATTERNS = [
1141+
PATTERNS = (
11421142
re.compile(
11431143
"^/_matrix/client/(v1|unstable/org.matrix.msc2946)"
11441144
"/rooms/(?P<room_id>[^/]*)/hierarchy$"
11451145
),
1146-
]
1146+
)
11471147

11481148
def __init__(self, hs: "HomeServer"):
11491149
super().__init__()

0 commit comments

Comments
 (0)