Register the login redirect endpoint for v3. (#11451)

As specified for Matrix v1.1.
This commit is contained in:
Patrick Cloke 2021-12-01 07:25:58 -05:00 committed by GitHub
parent b9fef1a7cd
commit a265fbd397
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 3 deletions

1
changelog.d/11451.bugfix Normal file
View File

@ -0,0 +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.

View File

@ -513,7 +513,7 @@ class SsoRedirectServlet(RestServlet):
re.compile( re.compile(
"^" "^"
+ CLIENT_API_PREFIX + CLIENT_API_PREFIX
+ "/r0/login/sso/redirect/(?P<idp_id>[A-Za-z0-9_.~-]+)$" + "/(r0|v3)/login/sso/redirect/(?P<idp_id>[A-Za-z0-9_.~-]+)$"
) )
] ]

View File

@ -1138,12 +1138,12 @@ class RoomSpaceSummaryRestServlet(RestServlet):
class RoomHierarchyRestServlet(RestServlet): class RoomHierarchyRestServlet(RestServlet):
PATTERNS = [ PATTERNS = (
re.compile( re.compile(
"^/_matrix/client/(v1|unstable/org.matrix.msc2946)" "^/_matrix/client/(v1|unstable/org.matrix.msc2946)"
"/rooms/(?P<room_id>[^/]*)/hierarchy$" "/rooms/(?P<room_id>[^/]*)/hierarchy$"
), ),
] )
def __init__(self, hs: "HomeServer"): def __init__(self, hs: "HomeServer"):
super().__init__() super().__init__()