diff options
Diffstat (limited to 'gn2/wqflask/oauth2/session.py')
-rw-r--r-- | gn2/wqflask/oauth2/session.py | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/gn2/wqflask/oauth2/session.py b/gn2/wqflask/oauth2/session.py index 92181ccf..b91534b0 100644 --- a/gn2/wqflask/oauth2/session.py +++ b/gn2/wqflask/oauth2/session.py @@ -23,6 +23,7 @@ class SessionInfo(TypedDict): ip_addr: str masquerade: Optional[UserDetails] refreshing_token: bool + auth_server_jwks: Optional[dict[str, Any]] __SESSION_KEY__ = "GN::2::session_info" # Do not use this outside this module!! @@ -114,13 +115,6 @@ def toggle_token_refreshing(): "token_refreshing": not _session.get("token_refreshing", False)}) -def is_token_expired(): - """Check whether the token is expired.""" - return user_token().either( - lambda _no_token: False, - lambda token: datetime.now().timestamp() > token["expires_at"]) - - def is_token_refreshing(): """Returns whether the token is being refreshed or not.""" return session_info().get("token_refreshing", False) |