mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-12 12:25:20 +00:00
refac: auth endpoint
This commit is contained in:
parent
2a4dfc02a2
commit
62e57a4cf5
1 changed files with 22 additions and 19 deletions
|
|
@ -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 a new issue