api: add info about how long a user session is guaranteed to be available

This commit is contained in:
lilly 2026-05-07 19:59:14 +02:00
commit 51349c297b
Signed by: lilly
SSH key fingerprint: SHA256:y9T5GFw2A20WVklhetIxG1+kcg/Ce0shnQmbu1LQ37g
2 changed files with 3 additions and 0 deletions

View file

@ -46,6 +46,7 @@ async def get_user_info(req: Request, current_user: deps.CurrentUser) -> UserSta
else:
return UserStatus(
is_logged_in=True,
guaranteed_session_until=datetime.fromtimestamp(current_user.id_token.exp, UTC),
user_info=UserInfo(
username=current_user.id_token.preferred_username,
)