Commit Graph

10 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 2cf3806298 feat(auth): implement login logic with database and password verification
- Replace stub with MyBatis-Plus user query and password matching
- Integrate kotlin-logging for structured logging across services
- Add custom Log utility replacing direct SLF4J usage
- Add kotlin-logging dependency to build configuration
2026-05-20 22:30:58 +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 1be634aeb1 feat(runner): add user02 initialization and rename init methods
- Add initialization flow for the user02 common account
- Rename insertAdminUser to insertAdmin for consistency
- Rename insertCommonUser to insertUser01 to align with naming
2026-05-20 16:37:21 +08:00
msksbr 47ce7596ea feat(runner): add user02 initialization and rename init methods
- Add initialization flow for the user02 common account
- Rename insertAdminUser to insertAdmin for consistency
- Rename insertCommonUser to insertUser01 to align with naming
2026-05-20 16:36:47 +08:00
msksbr 9511b8daad refactor(auth): make admin user initialization idempotent
- Check if admin user already exists before inserting
- Improve log messages with descriptive output
- Move @Transactional annotation to run method
- Fix minor formatting inconsistency
2026-05-20 13:25:04 +08:00
msksbr 52298e7fff feat(auth): add password encoding and default user initialization
- Register Argon2PasswordEncoder as a Spring bean
- Implement InitUserRunner to seed default users on startup
- Add spring-security-crypto and bouncycastle dependencies
- Include database schema initialization script
2026-05-20 12:43:05 +08:00
msksbr a041103a92 feat(api): add controller layer and auth service stubs
- Add AdminBookController, AdminBorrowController, BookController,
  BorrowController, and DashBoardController stubs
- Implement AuthController with login endpoint
- Add AuthService interface and AuthServiceImpl stub
2026-05-13 17:22:51 +08:00
msksbr 3a86d29e5c 实现了数据层的功能 2026-05-13 03:11:56 +08:00