secubox-deb/packages/secubox-auth/tests
CyberMind-FR 92e22cd48d feat(auth): branching /auth/login + MFA + TOTP enrol + set-password (ref #120)
- Add PendingStore (JSON+TTL) for in-progress TOTP enrollment secrets
- Inject _users_api package loader (importlib) to side-step api/ name collision
- Register _session_validator, _on_session_event, _revoke_sessions callbacks
- POST /auth/login now branches: setup / mfa-challenge / totp-enroll / access
- POST /auth/login/mfa: verifies TOTP code or backup code, issues full JWT
- POST /auth/totp/enroll: generates secret, stores in PendingStore, returns URI
- POST /auth/totp/confirm: verifies code, calls engine.enroll_totp, returns JWT
- POST /auth/set-password: handles set-password scope and full-JWT change
- Mount _login_router before auth_router so /auth/login override wins
- Fix conftest sys.path order so secubox-auth/api takes priority for auth tests

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-13 09:08:56 +02:00
..
conftest.py feat(auth): branching /auth/login + MFA + TOTP enrol + set-password (ref #120) 2026-05-13 09:08:56 +02:00
test_auth_flows.py feat(auth): branching /auth/login + MFA + TOTP enrol + set-password (ref #120) 2026-05-13 09:08:56 +02:00
test_totp_pending.py feat(auth): branching /auth/login + MFA + TOTP enrol + set-password (ref #120) 2026-05-13 09:08:56 +02:00