2ce7862058
Replace complex JWT + refresh token authentication with simple session-based auth using signed cookies. **Removed:** - JWT token service (jwt_service.py) - Refresh token store (refresh_store.py) - Refresh token model and database table - JWKS fetching and OIDC token verification - python-jose dependency **Added:** - Session service (session.py) with HMAC-SHA256 signed cookies - Auth dependencies module for shared auth logic - Session-based auth endpoints **Updated:** - All API endpoints to use session-based auth - Config: removed JWT settings, added SESSION_SECRET/SESSION_TTL_HOURS - Tests: rewritten for session-based flow - Frontend: no changes needed (already uses cookies) Quality gates: ruff ✓, mypy ✓, typecheck ✓, lint ✓
42 lines
925 B
TOML
42 lines
925 B
TOML
[project]
|
|
name = "headquarter-api"
|
|
version = "0.1.0"
|
|
description = "Headquarter platform API"
|
|
requires-python = ">=3.11"
|
|
dependencies = [
|
|
"fastapi>=0.104.0",
|
|
"uvicorn[standard]>=0.24.0",
|
|
"sqlalchemy>=2.0.0",
|
|
"asyncpg>=0.29.0",
|
|
"alembic>=1.12.0",
|
|
"pydantic>=2.5.0",
|
|
"pydantic-settings>=2.1.0",
|
|
"python-multipart>=0.0.6",
|
|
"httpx>=0.25.0",
|
|
"structlog>=23.2.0",
|
|
"cryptography>=41.0.0",
|
|
]
|
|
|
|
[project.optional-dependencies]
|
|
dev = [
|
|
"pytest>=7.4.0",
|
|
"pytest-asyncio>=0.21.0",
|
|
"mypy>=1.7.0",
|
|
"ruff>=0.1.0",
|
|
"httpx>=0.25.0",
|
|
"aiosqlite>=0.19.0",
|
|
]
|
|
|
|
[tool.mypy]
|
|
ignore_missing_imports = true
|
|
|
|
[tool.pytest.ini_options]
|
|
pythonpath = ["."]
|
|
asyncio_mode = "auto"
|
|
markers = [
|
|
"unit: Fast tests with no external dependencies",
|
|
"integration: Tests with database and external services",
|
|
"system: End-to-end tests of the full stack",
|
|
]
|
|
addopts = "-m 'not system'"
|