Commit Graph

4 Commits

Author SHA1 Message Date
msksbr 44b8326e96 feat(auth): implement JWT authentication
- Add JwtUtils for token generation and validation using jjwt
- Refactor AuthService.login to return User instead of Boolean
- Add jjwt dependencies and integrate JWT into login flow
- Externalize JWT secret, expiration, and log level as configurable env vars with defaults
2026-05-21 14:04:00 +08:00
msksbr 3937224341 fix(auth): harden password verification against timing attacks
- Run dummy hash when user is not found to prevent timing-based enumeration
- Extract and log real client IP on login requests
- Remove unused test files
- Reorder application config for clarity
2026-05-21 02:39:06 +08:00
msksbr 402e9e04cd refactor(api): restructure auth endpoints with DTO validation and unified response
- Add Result<T> generic response template for standardized API output
- Introduce UserLoginDTO with validation annotations for login requests
- Migrate AuthController to use DTO binding and return Result responses
- Update AuthService interface to accept UserLoginDTO and return Boolean
- Add Jackson configuration (snake_case, non-null, date format)
- Include jackson-module-kotlin and spring-boot-starter-validation deps
2026-05-20 17:29:04 +08:00
msksbr 3a86d29e5c 实现了数据层的功能 2026-05-13 03:11:56 +08:00