Take auth/ whole from boilerplate 09e144d: the lockout claimed before the scrypt, APP_PASSWORD recovery closing every session, Starlette's cookie parser, the rightmost forwarded hop in the log, revoke_all on a password change, a 421 for a non-loopback Host on an open app, API tokens in auth_tokens behind Authorization: Bearer, and sockets closed with their credential

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
WolfandClaude Fable 5.1 committed 2026-10-27 11:51:21 +01:00
1 parent 83e965dfeb
commit 244e57ac29
19 files changed
+2288 -214

No files matched your search

+5 -2
View File
@@ -68,8 +68,11 @@ def locked(make_client: Callable[..., TestClient]) -> TestClient:
@pytest.fixture
def open_app(make_client: Callable[..., TestClient]) -> TestClient:
"""The same app on loopback under `auto` — no password asked for."""
return make_client(enabled="auto", host="127.0.0.1", password=None)
"""The same app on loopback under `auto` — no password asked for. Reached
as 127.0.0.1, which is the name an unlocked app answers a browser under
(`auth.middleware._rebound`)."""
return make_client(enabled="auto", host="127.0.0.1", password=None,
base_url="http://127.0.0.1")
@pytest.fixture