Add type annotations to some of the configuration surrounding refresh tokens. (#11428)

This commit is contained in:
reivilibre 2021-11-29 13:34:14 +00:00 committed by GitHub
parent 9cd13c5f63
commit a82b90ab32
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 2 deletions

View file

@ -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