summary refs log tree commit diff
diff options
context:
space:
mode:
authorHugh Nimmo-Smith <hughns@element.io>2023-05-25 13:43:22 +0100
committerHugh Nimmo-Smith <hughns@element.io>2023-05-25 15:48:41 +0100
commit7ed89832f0b4461f83ef8db03c98baf20a75abb6 (patch)
treeaae2fc41754d9576fc234ca806ba6e95dcaa3a4a
parentLint (diff)
downloadsynapse-github/hughns/remove-unstable-msc3882.tar.xz
-rw-r--r--changelog.d/15670.removal1
-rw-r--r--synapse/rest/client/login_token_request.py6
-rw-r--r--synapse/rest/client/versions.py2
-rw-r--r--tests/rest/client/test_login_token_request.py34
4 files changed, 1 insertions, 42 deletions
diff --git a/changelog.d/15670.removal b/changelog.d/15670.removal
new file mode 100644
index 0000000000..7a1a840def
--- /dev/null
+++ b/changelog.d/15670.removal
@@ -0,0 +1 @@
+Remove support for unstable revisions of [MSC3882](https://github.com/matrix-org/matrix-spec-proposals/pull/3882).
\ No newline at end of file
diff --git a/synapse/rest/client/login_token_request.py b/synapse/rest/client/login_token_request.py
index 282d2d308f..518e1bb9fc 100644
--- a/synapse/rest/client/login_token_request.py
+++ b/synapse/rest/client/login_token_request.py
@@ -52,10 +52,6 @@ class LoginTokenRequestServlet(RestServlet):
         *client_patterns(
             "/login/get_token$", releases=["v1"], v1=False, unstable=False
         ),
-        # TODO: this is no longer needed once unstable MSC3882 does not need to be supported:
-        *client_patterns(
-            "/org.matrix.msc3882/login/token$", releases=[], v1=False, unstable=True
-        ),
     ]
 
     def __init__(self, hs: "HomeServer"):
@@ -101,8 +97,6 @@ class LoginTokenRequestServlet(RestServlet):
             200,
             {
                 "login_token": login_token,
-                # TODO: this is no longer needed once unstable MSC3882 does not need to be supported:
-                "expires_in": self.token_timeout // 1000,
                 "expires_in_ms": self.token_timeout,
             },
         )
diff --git a/synapse/rest/client/versions.py b/synapse/rest/client/versions.py
index 547bf34df1..1eb11081a0 100644
--- a/synapse/rest/client/versions.py
+++ b/synapse/rest/client/versions.py
@@ -113,8 +113,6 @@ class VersionsRestServlet(RestServlet):
                     "fi.mau.msc2815": self.config.experimental.msc2815_enabled,
                     # Adds a ping endpoint for appservices to check HS->AS connection
                     "fi.mau.msc2659.stable": True,  # TODO: remove when "v1.7" is added above
-                    # TODO: this is no longer needed once unstable MSC3882 does not need to be supported:
-                    "org.matrix.msc3882": self.config.auth.login_via_existing_enabled,
                     # Adds support for remotely enabling/disabling pushers, as per MSC3881
                     "org.matrix.msc3881": self.config.experimental.msc3881_enabled,
                     # Adds support for filtering /messages by event relation.
diff --git a/tests/rest/client/test_login_token_request.py b/tests/rest/client/test_login_token_request.py
index f05e619aa8..3ee8e98c6e 100644
--- a/tests/rest/client/test_login_token_request.py
+++ b/tests/rest/client/test_login_token_request.py
@@ -132,37 +132,3 @@ class LoginTokenRequestServletTestCase(unittest.HomeserverTestCase):
         channel = self.make_request("POST", GET_TOKEN_ENDPOINT, {}, access_token=token)
         self.assertEqual(channel.code, 200)
         self.assertEqual(channel.json_body["expires_in_ms"], 15000)
-
-    @override_config(
-        {
-            "login_via_existing_session": {
-                "enabled": True,
-                "require_ui_auth": False,
-                "token_timeout": "15s",
-            }
-        }
-    )
-    def test_unstable_support(self) -> None:
-        # TODO: remove support for unstable MSC3882 is no longer needed
-
-        # check feature is advertised in versions response:
-        channel = self.make_request(
-            "GET", "/_matrix/client/versions", {}, access_token=None
-        )
-        self.assertEqual(channel.code, 200)
-        self.assertEqual(
-            channel.json_body["unstable_features"]["org.matrix.msc3882"], True
-        )
-
-        self.register_user(self.user, self.password)
-        token = self.login(self.user, self.password)
-
-        # check feature is available via the unstable endpoint and returns an expires_in value in seconds
-        channel = self.make_request(
-            "POST",
-            "/_matrix/client/unstable/org.matrix.msc3882/login/token",
-            {},
-            access_token=token,
-        )
-        self.assertEqual(channel.code, 200)
-        self.assertEqual(channel.json_body["expires_in"], 15)