video-accessibility/backend/app/core
Vadym Samoilenko 4623b89aeb feat(mt-16): JWT org_ids claim + transient user.org_ids in deps
- create_access_token gains optional org_ids: list[str] param; encodes
  {exp, sub, org_ids, v:2} — org_ids is a prefilter hint only, never
  used as authorization source of truth (Redis cache is authoritative)
- Login, MS login, refresh endpoints: fetch memberships and include
  org_ids in issued access tokens via _get_user_org_ids() helper
- routes_invitations.py accept flow: same org_ids population on token
- get_current_user: reads org_ids from payload, attaches as transient
  user.__dict__["org_ids"] — available to OrgScopedQuery for prefilter
- Force logout: rotate JWT_SECRET env var at deployment time (no code
  change needed; all existing tokens immediately invalidated)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-29 20:46:39 +01:00
..
authz.py feat(mt-11): cross-org assignment guard in language_qc 2026-04-29 20:22:46 +01:00
config.py feat(pr4+pr5): hotkeys, unified status labels, upload size constant 2026-04-29 18:42:03 +01:00
database.py feat: per-language QC workflow with linguist assignment 2026-04-29 12:09:40 +01:00
dependencies.py feat(mt-16): JWT org_ids claim + transient user.org_ids in deps 2026-04-29 20:46:39 +01:00
logging.py initial commit 2025-08-24 16:28:33 -05:00
redis.py initial commit 2025-08-24 16:28:33 -05:00
secrets_config.py initial commit 2025-08-24 16:28:33 -05:00
security.py feat(mt-16): JWT org_ids claim + transient user.org_ids in deps 2026-04-29 20:46:39 +01:00
seed.py security: remove default admin password fallback (C-04) 2026-04-29 14:12:24 +01:00