greatmengqi
03c3b18565
feat(auth): introduce backend auth module
...
Port RFC-001 authentication core from PR #1728 :
- JWT token handling (create_access_token, decode_token, TokenPayload)
- Password hashing (bcrypt) with verify_password
- SQLite UserRepository with base interface
- Provider Factory pattern (LocalAuthProvider)
- CLI reset_admin tool
- Auth-specific errors (AuthErrorCode, TokenError, AuthErrorResponse)
Deps:
- bcrypt>=4.0.0
- pyjwt>=2.9.0
- email-validator>=2.0.0
- backend/uv.toml pins public PyPI index
Tests: 12 pure unit tests (test_auth_config.py, test_auth_errors.py).
Scope note: authz.py, test_auth.py, and test_auth_type_system.py are
deferred to commit 2 because they depend on middleware and deps wiring
that is not yet in place. Commit 1 stays "pure new files only" as the
spec mandates.
2026-04-08 09:21:36 +08:00
..
2026-03-14 22:55:52 +08:00
2026-03-27 20:03:30 +08:00
2026-04-01 11:42:12 +08:00
2026-03-31 22:19:27 +08:00
2026-04-02 15:39:41 +08:00
2026-03-22 20:34:01 +08:00
2026-03-26 17:44:25 +08:00
2026-04-08 09:21:36 +08:00
2026-04-08 09:21:36 +08:00
2026-04-07 11:53:52 +08:00
2026-04-07 11:53:52 +08:00
2026-04-07 11:53:52 +08:00
2026-03-22 17:29:29 +08:00
2026-03-30 07:41:18 +08:00
2026-03-26 14:20:18 +08:00
2026-03-29 21:03:58 +08:00
2026-03-29 21:03:58 +08:00
2026-04-06 10:09:39 +08:00
2026-03-14 22:55:52 +08:00
2026-04-07 11:53:52 +08:00
2026-03-29 15:31:18 +08:00
2026-04-06 16:47:19 +08:00
2026-03-22 22:39:50 +08:00
2026-04-05 10:49:58 +08:00
2026-03-26 00:20:08 +08:00
2026-03-31 22:19:27 +08:00
2026-04-07 11:53:52 +08:00
2026-04-07 11:53:52 +08:00
2026-04-04 14:25:08 +08:00
2026-04-01 23:21:32 +08:00
2026-03-23 18:07:33 +08:00
2026-03-14 22:55:52 +08:00
2026-03-26 14:20:18 +08:00
2026-04-03 15:28:56 +08:00
2026-04-01 17:02:39 +08:00
2026-04-07 11:53:52 +08:00
2026-03-31 22:22:30 +08:00
2026-04-07 11:53:52 +08:00
2026-04-02 10:12:17 +08:00
2026-03-29 21:03:58 +08:00
2026-03-29 21:31:29 +08:00
2026-04-03 19:46:22 +08:00
2026-04-04 10:38:22 +08:00
2026-03-14 22:55:52 +08:00
2026-03-14 22:55:52 +08:00
2026-03-26 14:20:18 +08:00
2026-04-03 11:21:58 +08:00
2026-04-05 16:23:00 +08:00
2026-04-01 16:45:29 +08:00
2026-03-29 15:34:38 +08:00
2026-04-05 16:23:00 +08:00
2026-04-05 16:23:00 +08:00
2026-03-22 20:39:26 +08:00
2026-04-07 11:53:52 +08:00
2026-03-20 17:18:59 +08:00
2026-03-26 15:07:05 +08:00
2026-04-07 11:53:52 +08:00
2026-03-14 22:55:52 +08:00
2026-02-25 08:39:29 +08:00
2026-03-14 22:55:52 +08:00
2026-03-14 22:55:52 +08:00
2026-04-07 11:53:52 +08:00
2026-04-07 11:53:52 +08:00
2026-03-31 22:22:30 +08:00
2026-04-07 11:53:52 +08:00
2026-04-06 17:21:58 +08:00
2026-04-03 16:03:06 +08:00
2026-04-05 15:52:22 +08:00
2026-04-07 11:53:52 +08:00
2026-03-30 16:02:23 +08:00
2026-03-26 14:20:18 +08:00
2026-04-07 11:53:52 +08:00
2026-03-25 16:28:33 +08:00
2026-04-07 11:53:52 +08:00
2026-03-26 17:39:16 +08:00
2026-04-07 11:53:52 +08:00
2026-04-01 23:08:30 +08:00
2026-03-27 20:20:31 +08:00
2026-03-30 16:02:23 +08:00
2026-04-06 14:51:10 +08:00
2026-03-14 22:55:52 +08:00
2026-03-25 10:20:16 +08:00
2026-03-29 21:03:58 +08:00
2026-04-05 15:41:00 +08:00
2026-04-04 21:19:35 +08:00
2026-03-29 21:03:58 +08:00
2026-03-26 17:39:16 +08:00
2026-04-07 11:53:52 +08:00
2026-03-24 00:36:08 +08:00
2026-03-14 22:55:52 +08:00
2026-04-04 21:19:35 +08:00
2026-03-26 00:20:50 +08:00
2026-03-26 14:20:18 +08:00
2026-03-14 22:55:52 +08:00
2026-04-06 15:09:57 +08:00
2026-03-30 11:23:15 +08:00
2026-04-02 13:06:10 +08:00
2026-04-02 13:06:10 +08:00
2026-03-26 17:39:16 +08:00
2026-04-04 14:25:08 +08:00
2026-03-27 17:37:44 +08:00
2026-04-06 15:18:34 +08:00