refac: auth endpoint
This commit is contained in:
1 parent
2a4dfc02a2
commit
62e57a4cf5
1 file changed
+3
@@ -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:
|
||||||
|
|||||||
Reference in new issue
Block a user