patristic-be / src /api /auth /__init__.py
Mario33333's picture
deploy: reader-access security hardening (feature/audiobook@06a5ed8)
7c2d250 verified
Raw
History Blame Contribute Delete
606 Bytes
"""Auth subsystem for the FastAPI app.
Split into two modules so the wire layer (router.py) is thin and the
storage primitives (sessions.py) can be unit-tested without spinning up a
TestClient:
- ``sessions.py`` owns the ``sessions`` SQLite table: token lifecycle,
last-seen bumping, expiry, invalidation.
- ``router.py`` mounts ``/auth/login``, ``/auth/logout``, ``/auth/me``.
The actual credentials live in ``credentials.toml`` (or
``st.secrets["auth"]`` on Streamlit Cloud) — see ``src/lib/auth/repo.py``.
This subsystem is the HTTP-friendly façade.
"""
__all__: list[str] = []