summary refs log tree commit diff
path: root/synapse/handlers
diff options
context:
space:
mode:
authorreivilibre <oliverw@matrix.org>2021-11-29 13:34:14 +0000
committerGitHub <noreply@github.com>2021-11-29 13:34:14 +0000
commita82b90ab32629108fc69439a8cd38d025a406019 (patch)
tree6aaa1a283580083a786115f7dbd15fdf91a50300 /synapse/handlers
parentFix perspectives requests for multiple keys for the same server (#11440) (diff)
downloadsynapse-a82b90ab32629108fc69439a8cd38d025a406019.tar.xz
Add type annotations to some of the configuration surrounding refresh tokens. (#11428)
Diffstat (limited to '')
-rw-r--r--synapse/handlers/register.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/synapse/handlers/register.py b/synapse/handlers/register.py
index 8136ae264d..24ca11b924 100644
--- a/synapse/handlers/register.py
+++ b/synapse/handlers/register.py
@@ -813,6 +813,11 @@ class RegistrationHandler:
             access_token = self.macaroon_gen.generate_guest_access_token(user_id)
         else:
             if should_issue_refresh_token:
+                # A refreshable access token lifetime must be configured
+                # since we're told to issue a refresh token (the caller checks
+                # that this value is set before setting this flag).
+                assert self.refreshable_access_token_lifetime is not None
+
                 now_ms = self.clock.time_msec()
 
                 # Set the expiry time of the refreshable access token