api: add info about how long a user session is guaranteed to be available
This commit is contained in:
parent
e59bdcadb0
commit
51349c297b
2 changed files with 3 additions and 0 deletions
|
|
@ -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,
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue