diff options
author | Tulir Asokan <tulir@maunium.net> | 2021-11-15 12:31:22 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-15 10:31:22 +0000 |
commit | 6f862c5c28f03d712502635799dfd1b01bf79712 (patch) | |
tree | dab658400ea89b318c119af0fe945b605bb37a08 /synapse/rest/client | |
parent | Remove unused tables `room_stats_historical` and `user_stats_historical` (#11... (diff) | |
download | synapse-6f862c5c28f03d712502635799dfd1b01bf79712.tar.xz |
Add support for the stable version of MSC2778 (#11335)
* Add support for the stable version of MSC2778 Signed-off-by: Tulir Asokan <tulir@maunium.net> * Expect m.login.application_service in login and password provider tests Signed-off-by: Tulir Asokan <tulir@maunium.net>
Diffstat (limited to 'synapse/rest/client')
-rw-r--r-- | synapse/rest/client/login.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/synapse/rest/client/login.py b/synapse/rest/client/login.py index d49a647b03..467444a041 100644 --- a/synapse/rest/client/login.py +++ b/synapse/rest/client/login.py @@ -61,7 +61,8 @@ class LoginRestServlet(RestServlet): TOKEN_TYPE = "m.login.token" JWT_TYPE = "org.matrix.login.jwt" JWT_TYPE_DEPRECATED = "m.login.jwt" - APPSERVICE_TYPE = "uk.half-shot.msc2778.login.application_service" + APPSERVICE_TYPE = "m.login.application_service" + APPSERVICE_TYPE_UNSTABLE = "uk.half-shot.msc2778.login.application_service" REFRESH_TOKEN_PARAM = "org.matrix.msc2918.refresh_token" def __init__(self, hs: "HomeServer"): @@ -143,6 +144,7 @@ class LoginRestServlet(RestServlet): flows.extend({"type": t} for t in self.auth_handler.get_supported_login_types()) flows.append({"type": LoginRestServlet.APPSERVICE_TYPE}) + flows.append({"type": LoginRestServlet.APPSERVICE_TYPE_UNSTABLE}) return 200, {"flows": flows} @@ -159,7 +161,10 @@ class LoginRestServlet(RestServlet): should_issue_refresh_token = False try: - if login_submission["type"] == LoginRestServlet.APPSERVICE_TYPE: + if login_submission["type"] in ( + LoginRestServlet.APPSERVICE_TYPE, + LoginRestServlet.APPSERVICE_TYPE_UNSTABLE, + ): appservice = self.auth.get_appservice_by_req(request) if appservice.is_rate_limited(): |