Use session_secret for signed auth session tokens

This commit is contained in:
2026-04-09 21:30:08 +02:00
parent 6eab47f7ba
commit 208f98dc97
8 changed files with 136 additions and 12 deletions

View File

@@ -54,6 +54,7 @@ class TestLogin:
body = response.json()
assert "token" in body
assert len(body["token"]) > 0
assert "." in body["token"]
assert "expires_at" in body
async def test_login_sets_cookie(self, client: AsyncClient) -> None:
@@ -64,6 +65,7 @@ class TestLogin:
)
assert response.status_code == 200
assert "bangui_session" in response.cookies
assert "." in response.cookies["bangui_session"]
async def test_login_fails_with_wrong_password(
self, client: AsyncClient