diff options
author | Lukas Lihotzki <lukas@lihotzki.de> | 2021-06-16 14:16:35 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-16 13:16:35 +0100 |
commit | 2c240213f4c1d9d44d121441c3b9d4f893ed16cc (patch) | |
tree | e1b1cb86129fa6223c825bc93c4e14acd8ed8637 /synapse | |
parent | Fix broken links in documentation (#10180) (diff) | |
download | synapse-2c240213f4c1d9d44d121441c3b9d4f893ed16cc.tar.xz |
Fix requestOpenIdToken response: integer expires_in (#10175)
`expires_in` must be an integer according to the OpenAPI spec: https://github.com/matrix-org/matrix-doc/blob/master/data/api/client-server/definitions/openid_token.yaml#L32 True division (`/`) returns a float instead (`"expires_in": 3600.0`). Floor division (`//`) returns an integer, so the response is spec compliant. Signed-off-by: Lukas Lihotzki <lukas@lihotzki.de>
Diffstat (limited to 'synapse')
-rw-r--r-- | synapse/rest/client/v2_alpha/openid.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/synapse/rest/client/v2_alpha/openid.py b/synapse/rest/client/v2_alpha/openid.py index d3322acc38..e8d2673819 100644 --- a/synapse/rest/client/v2_alpha/openid.py +++ b/synapse/rest/client/v2_alpha/openid.py @@ -85,7 +85,7 @@ class IdTokenServlet(RestServlet): "access_token": token, "token_type": "Bearer", "matrix_server_name": self.server_name, - "expires_in": self.EXPIRES_MS / 1000, + "expires_in": self.EXPIRES_MS // 1000, }, ) |