Remove support for unstable MSC3882
This commit is contained in:
parent
77a6ee6bd8
commit
7ed89832f0
|
@ -0,0 +1 @@
|
|||
Remove support for unstable revisions of [MSC3882](https://github.com/matrix-org/matrix-spec-proposals/pull/3882).
|
|
@ -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,
|
||||
},
|
||||
)
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue