Files
mtusi2026lab4/evidence/expiry.txt
T

11 lines
597 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-11-12T18:31:48Z; host: Windows 10, Docker Desktop 27.2.0, VM 12 CPU / 1.9 GiB; LB 127.0.0.1:8090
пересоздаю 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