mirror of
https://github.com/open-webui/open-webui
synced 2025-06-26 18:26:48 +00:00
refac: auth endpoint
This commit is contained in:
parent
2a4dfc02a2
commit
62e57a4cf5
@ -82,6 +82,9 @@ async def get_session_user(
|
|||||||
token = auth_token.credentials
|
token = auth_token.credentials
|
||||||
data = decode_token(token)
|
data = decode_token(token)
|
||||||
|
|
||||||
|
expires_at = None
|
||||||
|
|
||||||
|
if data:
|
||||||
expires_at = data.get("exp")
|
expires_at = data.get("exp")
|
||||||
|
|
||||||
if (expires_at is not None) and int(time.time()) > expires_at:
|
if (expires_at is not None) and int(time.time()) > expires_at:
|
||||||
|
Loading…
Reference in New Issue
Block a user