-
Notifications
You must be signed in to change notification settings - Fork 1
[π merge] Spring Security μ κ±° λ° μ»€μ€ν μΈμ¦ μ²΄κ³ μ΄μ μλ² μ μ© #290
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Feat : 컀μ€ν JWT Provider ꡬν
Feat : Interceptor λ° ArgumentResolver κΈ°λ° μΈμ¦ 맀컀λμ¦ κ΅¬ν
Refactor : AuthService λ‘μ§ ν΅ν© λ° λ¦¬ν©ν λ§
Feat : μ€νλ§ μνλ¦¬ν° μμ‘΄μ± μ κ±° λ° μ»€μ€ν μΈμ¦ μ λ©΄ μ μ©
Refactor: JWT ν€ μμ± λ° κ²μ¦ λ‘μ§μ μ΄μ λ°©μμΌλ‘ λ‘€λ°±
[π merge] Spring Security μ κ±° λ° μ»€μ€ν μΈμ¦ μ²΄κ³ λμ
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR removes Spring Security and introduces a custom authentication system, refactors the authentication service, and updates related controllers and Swagger definitions to use a new @Login annotation and JWT-based interceptor.
- Replaces Spring Security filters with
LoginCheckInterceptorandLoginUserArgumentResolver, and consolidates CORS and argument resolver intoWebConfig - Refactors
AuthServiceto handle sign-in, sign-up, token reissue, and user sync operations in one service usingJwtProvider - Updates controllers and Swagger interfaces to use
@Loginfor injecting the authenticated user ID, replaces old DTOs, and removes deprecated JWT provider classes
Reviewed Changes
Copilot reviewed 76 out of 78 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/test/java/org/terning/terningserver/service/ScrapServiceTest.java | Entire test file commented out instead of removal |
| src/main/java/org/terning/terningserver/common/config/WebConfig.java | Adds custom MVC config, argument resolver, and interceptor setup |
| src/main/java/org/terning/terningserver/auth/application/AuthService.java | Consolidates authentication operations and removes filter chains |
| src/main/java/org/terning/terningserver/scrap/api/ScrapController.java | Endpoints updated to use @Login; removes Spring Security imports |
| src/main/java/org/terning/terningserver/user/domain/User.java | Enhances User entity with refresh token validation and builder |
Comments suppressed due to low confidence (3)
src/main/java/org/terning/terningserver/scrap/api/ScrapSwagger.java:31
- The
updateScrapColorSwagger interface uses@PathVariable long scrapId, but the controller mapping uses{internshipAnnouncementId}. Synchronize parameter names or path templates to avoid binding errors.
@Login long userId,
src/main/java/org/terning/terningserver/search/api/SearchSwagger.java:31
- In the Swagger interface,
sortByis required by default, but the controller parameter isrequired=false. Consider addingrequired=falseor a default value in the Swagger annotation to match controller behavior.
@RequestParam("sortBy") String sortBy, Pageable pageable
src/main/java/org/terning/terningserver/auth/common/exception/AuthErrorCode.java:11
- [nitpick] Unlike
JwtErrorCode,AuthErrorCodedoes not prepend thePREFIXto the message. Consider adding agetMessage()method that prependsPREFIXfor consistency in error responses.
USER_ALREADY_EXIST(HttpStatus.BAD_REQUEST, "μ μ κ° μ΄λ―Έ μ‘΄μ¬ν©λλ€."),
| } | ||
| } | ||
| } | ||
| //package org.terning.terningserver.service; |
Copilot
AI
Jul 15, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The entire test class has been commented out rather than deleted. If these tests are no longer needed, consider removing the file or migrating tests instead of leaving large commented blocks.
π Work Description