summary refs log tree commit diff
path: root/synapse/handlers
diff options
context:
space:
mode:
authorreivilibre <oliverw@matrix.org>2021-11-23 17:01:34 +0000
committerGitHub <noreply@github.com>2021-11-23 17:01:34 +0000
commitf25c75d376ff8517e3245e06abdacf813606bd1f (patch)
tree8a1b73633f902c750cfa8ec8e07cf2cbefebe133 /synapse/handlers
parentAdd missing type hints to config base classes (#11377) (diff)
downloadsynapse-f25c75d376ff8517e3245e06abdacf813606bd1f.tar.xz
Rename unstable `access_token_lifetime` configuration option to `refreshable_access_token_lifetime` to make it clear it only concerns refreshable access tokens. (#11388)
Diffstat (limited to 'synapse/handlers')
-rw-r--r--synapse/handlers/register.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/synapse/handlers/register.py b/synapse/handlers/register.py
index b5664e9fde..448a36108e 100644
--- a/synapse/handlers/register.py
+++ b/synapse/handlers/register.py
@@ -116,7 +116,9 @@ class RegistrationHandler:
             self.pusher_pool = hs.get_pusherpool()
 
         self.session_lifetime = hs.config.registration.session_lifetime
-        self.access_token_lifetime = hs.config.registration.access_token_lifetime
+        self.refreshable_access_token_lifetime = (
+            hs.config.registration.refreshable_access_token_lifetime
+        )
 
         init_counters_for_auth_provider("")
 
@@ -817,7 +819,9 @@ class RegistrationHandler:
                     user_id,
                     device_id=registered_device_id,
                 )
-                valid_until_ms = self.clock.time_msec() + self.access_token_lifetime
+                valid_until_ms = (
+                    self.clock.time_msec() + self.refreshable_access_token_lifetime
+                )
 
             access_token = await self._auth_handler.create_access_token_for_user_id(
                 user_id,