refac
This commit is contained in:
@@ -235,7 +235,7 @@ async def invalidate_token(request, token):
|
|||||||
jti = decoded.get("jti")
|
jti = decoded.get("jti")
|
||||||
exp = decoded.get("exp")
|
exp = decoded.get("exp")
|
||||||
|
|
||||||
if jti:
|
if jti and exp:
|
||||||
ttl = exp - int(
|
ttl = exp - int(
|
||||||
datetime.now(UTC).timestamp()
|
datetime.now(UTC).timestamp()
|
||||||
) # Calculate time-to-live for the token
|
) # Calculate time-to-live for the token
|
||||||
|
|||||||
Reference in New Issue
Block a user