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

Commit c12cdec

Browse files
committed
fix
1 parent 04667c3 commit c12cdec

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

synapse/rest/client/login.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ def on_GET(self, request: SynapseRequest) -> Tuple[int, JsonDict]:
171171
# don't know how to implement, since they (currently) will always
172172
# fall back to the fallback API if they don't understand one of the
173173
# login flow types returned.
174-
tokenTypeFlow = {"type": LoginRestServlet.TOKEN_TYPE}
174+
tokenTypeFlow: Dict[str, any] = {"type": LoginRestServlet.TOKEN_TYPE}
175175
# If MSC3882 is enabled we advertise the get_login_token flag.
176176
if self._get_login_token_enabled:
177177
tokenTypeFlow["org.matrix.msc3882.get_login_token"] = True

tests/rest/client/test_login_token_request.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ def test_uia_on(self) -> None:
8282

8383
channel = self.make_request("POST", endpoint, uia, access_token=token)
8484
self.assertEqual(channel.code, 200)
85-
self.assertEqual(channel.json_body["expires_in"], 300)
85+
self.assertEqual(channel.json_body["expires_in_ms"], 300000)
8686

8787
login_token = channel.json_body["login_token"]
8888

@@ -103,7 +103,7 @@ def test_uia_off(self) -> None:
103103

104104
channel = self.make_request("POST", endpoint, {}, access_token=token)
105105
self.assertEqual(channel.code, 200)
106-
self.assertEqual(channel.json_body["expires_in"], 300)
106+
self.assertEqual(channel.json_body["expires_in_ms"], 300000)
107107

108108
login_token = channel.json_body["login_token"]
109109

0 commit comments

Comments
 (0)