Files
mtusi2026lab2/evidence/expiry.txt
T
Pavel Grigorev 0c6b95cc53
Skeleton contracts / contracts (pull_request) Failing after 26s
Application / stack (pull_request) Failing after 32s
Не оживлять отозванный токен после недоступности Valkey
2026-10-31 10:31:35 +03:00

11 lines
589 B
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# python student-tests/expiry_check.py --ttl 2
# date: 2026-10-31T07:29:34Z; host: Windows 10, Docker Desktop 27.2.0, 12 CPU / 1.9 GiB for Docker VM
пересоздаю api с SESSION_TTL_SECONDS=2
сразу после входа: /users/me -> 200
TTL ключа этой сессии в Valkey: 1 с (-2 = ключа нет)
через 3.5 с: /users/me -> 401, WWW-Authenticate: Bearer realm="messenger"
logout истёкшим токеном -> 401
PASS: сессия истекла по SESSION_TTL_SECONDS=2, кэш не продлил её
возвращаю api с TTL из .env