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

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
hughns committed Apr 4, 2023
1 parent 04667c3 commit c12cdec
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion synapse/rest/client/login.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ def on_GET(self, request: SynapseRequest) -> Tuple[int, JsonDict]:
# don't know how to implement, since they (currently) will always
# fall back to the fallback API if they don't understand one of the
# login flow types returned.
tokenTypeFlow = {"type": LoginRestServlet.TOKEN_TYPE}
tokenTypeFlow: Dict[str, any] = {"type": LoginRestServlet.TOKEN_TYPE}
# If MSC3882 is enabled we advertise the get_login_token flag.
if self._get_login_token_enabled:
tokenTypeFlow["org.matrix.msc3882.get_login_token"] = True
Expand Down
4 changes: 2 additions & 2 deletions tests/rest/client/test_login_token_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def test_uia_on(self) -> None:

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

login_token = channel.json_body["login_token"]

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

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

login_token = channel.json_body["login_token"]

Expand Down

0 comments on commit c12cdec

Please sign in to comment.