diff options
Diffstat (limited to 'uploader/session.py')
-rw-r--r-- | uploader/session.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/uploader/session.py b/uploader/session.py index 019d959..399f28c 100644 --- a/uploader/session.py +++ b/uploader/session.py @@ -103,3 +103,16 @@ def set_auth_server_jwks(keyset: KeySet) -> KeySet: } }) return keyset + + +def toggle_token_refreshing(): + """Toggle the state of the token_refreshing variable.""" + _session = session_info() + return save_session_info({ + **_session, + "token_refreshing": not _session.get("token_refreshing", False)}) + + +def is_token_refreshing(): + """Returns whether the token is being refreshed or not.""" + return session_info().get("token_refreshing", False) |