serve: add JWT consumer shim for bincio-auth integration
When --jwt-secret / BINCIO_AUTH_JWT_SECRET is set, auth is validated locally by decoding the bincio-auth-issued JWT — no DB session lookup. Falls back to existing DB-based session lookup when the flag is absent, so standalone deployments keep working without any config change. Changes: - deps.py: add jwt_secret global, _decode_jwt helper, wire into _current_user and _require_auth - cli.py: add --jwt-secret option; log active auth mode on startup - pyproject.toml: add PyJWT>=2.8 to serve and dev extras
This commit is contained in:
@@ -42,6 +42,7 @@ serve = [
|
||||
"uvicorn[standard]>=0.29",
|
||||
"python-multipart>=0.0.9",
|
||||
"bcrypt>=4.1",
|
||||
"PyJWT>=2.8",
|
||||
]
|
||||
strava = [
|
||||
"requests>=2.32",
|
||||
@@ -79,6 +80,7 @@ dev = [
|
||||
"uvicorn[standard]>=0.29",
|
||||
"python-multipart>=0.0.9",
|
||||
"bcrypt>=4.1",
|
||||
"PyJWT>=2.8",
|
||||
"httpx>=0.28.1",
|
||||
]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user