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

Commit

Permalink
Serve CAS login over r0 (#5286)
Browse files Browse the repository at this point in the history
  • Loading branch information
hawkowl authored May 29, 2019
1 parent 30858ff commit 532b825
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions changelog.d/5286.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CAS login will now hit the r0 API, not the deprecated v1 one.
4 changes: 2 additions & 2 deletions synapse/rest/client/v1/login.py
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ def on_GET(self, request):
b"redirectUrl": args[b"redirectUrl"][0]
}).encode('ascii')
hs_redirect_url = (self.cas_service_url +
b"/_matrix/client/api/v1/login/cas/ticket")
b"/_matrix/client/r0/login/cas/ticket")
service_param = urllib.parse.urlencode({
b"service": b"%s?%s" % (hs_redirect_url, client_redirect_url_param)
}).encode('ascii')
Expand All @@ -395,7 +395,7 @@ def on_GET(self, request):


class CasTicketServlet(ClientV1RestServlet):
PATTERNS = client_path_patterns("/login/cas/ticket", releases=())
PATTERNS = client_path_patterns("/login/cas/ticket")

def __init__(self, hs):
super(CasTicketServlet, self).__init__(hs)
Expand Down

0 comments on commit 532b825

Please sign in to comment.