diff options
author | reivilibre <oliverw@matrix.org> | 2021-11-29 13:34:14 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-29 13:34:14 +0000 |
commit | a82b90ab32629108fc69439a8cd38d025a406019 (patch) | |
tree | 6aaa1a283580083a786115f7dbd15fdf91a50300 /synapse/handlers | |
parent | Fix perspectives requests for multiple keys for the same server (#11440) (diff) | |
download | synapse-a82b90ab32629108fc69439a8cd38d025a406019.tar.xz |
Add type annotations to some of the configuration surrounding refresh tokens. (#11428)
Diffstat (limited to 'synapse/handlers')
-rw-r--r-- | synapse/handlers/register.py | 5 |
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 |