Implement messenger functionality

This commit is contained in:
2026-10-30 16:12:37 +03:00
parent 65003b6119
commit add9fbb9f4
15 changed files with 986 additions and 32 deletions
+13
View File
@@ -0,0 +1,13 @@
import os
import time
from client import Client
base=os.environ.get("BASE_URL","http://localhost:8080")
ttl=int(os.environ.get("SESSION_TTL_SECONDS","3"))
if ttl>10: raise SystemExit("Run with a short SESSION_TTL_SECONDS (10 seconds or less)")
c=Client(base)
actor=c.user("expiry")
time.sleep(ttl+1.2)
response=c.call("GET","/api/v1/users/me",401,actor=actor)
assert response["status"]==401
print("PASS: expired Bearer session rejected after short TTL")