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

Commit 1d59e6a

Browse files
committed
Remove support for unstable MSC3882
1 parent 77a6ee6 commit 1d59e6a

File tree

3 files changed

+0
-41
lines changed

3 files changed

+0
-41
lines changed

synapse/rest/client/login_token_request.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,6 @@ class LoginTokenRequestServlet(RestServlet):
5252
*client_patterns(
5353
"/login/get_token$", releases=["v1"], v1=False, unstable=False
5454
),
55-
# TODO: this is no longer needed once unstable MSC3882 does not need to be supported:
56-
*client_patterns(
57-
"/org.matrix.msc3882/login/token$", releases=[], v1=False, unstable=True
58-
),
5955
]
6056

6157
def __init__(self, hs: "HomeServer"):
@@ -101,8 +97,6 @@ async def on_POST(self, request: SynapseRequest) -> Tuple[int, JsonDict]:
10197
200,
10298
{
10399
"login_token": login_token,
104-
# TODO: this is no longer needed once unstable MSC3882 does not need to be supported:
105-
"expires_in": self.token_timeout // 1000,
106100
"expires_in_ms": self.token_timeout,
107101
},
108102
)

synapse/rest/client/versions.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,6 @@ def on_GET(self, request: Request) -> Tuple[int, JsonDict]:
113113
"fi.mau.msc2815": self.config.experimental.msc2815_enabled,
114114
# Adds a ping endpoint for appservices to check HS->AS connection
115115
"fi.mau.msc2659.stable": True, # TODO: remove when "v1.7" is added above
116-
# TODO: this is no longer needed once unstable MSC3882 does not need to be supported:
117-
"org.matrix.msc3882": self.config.auth.login_via_existing_enabled,
118116
# Adds support for remotely enabling/disabling pushers, as per MSC3881
119117
"org.matrix.msc3881": self.config.experimental.msc3881_enabled,
120118
# Adds support for filtering /messages by event relation.

tests/rest/client/test_login_token_request.py

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -133,36 +133,3 @@ def test_expires_in(self) -> None:
133133
self.assertEqual(channel.code, 200)
134134
self.assertEqual(channel.json_body["expires_in_ms"], 15000)
135135

136-
@override_config(
137-
{
138-
"login_via_existing_session": {
139-
"enabled": True,
140-
"require_ui_auth": False,
141-
"token_timeout": "15s",
142-
}
143-
}
144-
)
145-
def test_unstable_support(self) -> None:
146-
# TODO: remove support for unstable MSC3882 is no longer needed
147-
148-
# check feature is advertised in versions response:
149-
channel = self.make_request(
150-
"GET", "/_matrix/client/versions", {}, access_token=None
151-
)
152-
self.assertEqual(channel.code, 200)
153-
self.assertEqual(
154-
channel.json_body["unstable_features"]["org.matrix.msc3882"], True
155-
)
156-
157-
self.register_user(self.user, self.password)
158-
token = self.login(self.user, self.password)
159-
160-
# check feature is available via the unstable endpoint and returns an expires_in value in seconds
161-
channel = self.make_request(
162-
"POST",
163-
"/_matrix/client/unstable/org.matrix.msc3882/login/token",
164-
{},
165-
access_token=token,
166-
)
167-
self.assertEqual(channel.code, 200)
168-
self.assertEqual(channel.json_body["expires_in"], 15)

0 commit comments

Comments
 (0)