summary refs log tree commit diff
path: root/tests/api/test_auth.py
diff options
context:
space:
mode:
authorRichard van der Hoff <1389908+richvdh@users.noreply.github.com>2019-07-12 17:26:02 +0100
committerGitHub <noreply@github.com>2019-07-12 17:26:02 +0100
commit5f158ec039e4753959aad9b8d288b3d8cb4959a1 (patch)
tree5365e3257124ee89e8ef0026ffc6dd5ef4b153fc /tests/api/test_auth.py
parentfix typo: backgroud -> background (diff)
downloadsynapse-5f158ec039e4753959aad9b8d288b3d8cb4959a1.tar.xz
Implement access token expiry (#5660)
Record how long an access token is valid for, and raise a soft-logout once it
expires.
Diffstat (limited to 'tests/api/test_auth.py')
-rw-r--r--tests/api/test_auth.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/api/test_auth.py b/tests/api/test_auth.py
index ee92ceeb60..c0cb8ef296 100644
--- a/tests/api/test_auth.py
+++ b/tests/api/test_auth.py
@@ -262,9 +262,11 @@ class AuthTestCase(unittest.TestCase):
         self.store.add_access_token_to_user = Mock()
 
         token = yield self.hs.handlers.auth_handler.get_access_token_for_user_id(
-            USER_ID, "DEVICE"
+            USER_ID, "DEVICE", valid_until_ms=None
+        )
+        self.store.add_access_token_to_user.assert_called_with(
+            USER_ID, token, "DEVICE", None
         )
-        self.store.add_access_token_to_user.assert_called_with(USER_ID, token, "DEVICE")
 
         def get_user(tok):
             if token != tok: