[๐ merge] Spring Security ์ ๊ฑฐ ๋ฐ ์ปค์คํ ์ธ์ฆ ์ฒด๊ณ ์ด์ ์๋ฒ ์ ์ฉ#290
[๐ merge] Spring Security ์ ๊ฑฐ ๋ฐ ์ปค์คํ
์ธ์ฆ ์ฒด๊ณ ์ด์ ์๋ฒ ์ ์ฉ#290jsoonworld merged 30 commits intomainfrom
Conversation
Feat : ์ปค์คํ JWT Provider ๊ตฌํ
Feat : Interceptor ๋ฐ ArgumentResolver ๊ธฐ๋ฐ ์ธ์ฆ ๋งค์ปค๋์ฆ ๊ตฌํ
Refactor : AuthService ๋ก์ง ํตํฉ ๋ฐ ๋ฆฌํฉํ ๋ง
Feat : ์คํ๋ง ์ํ๋ฆฌํฐ ์์กด์ฑ ์ ๊ฑฐ ๋ฐ ์ปค์คํ ์ธ์ฆ ์ ๋ฉด ์ ์ฉ
Refactor: JWT ํค ์์ฑ ๋ฐ ๊ฒ์ฆ ๋ก์ง์ ์ด์ ๋ฐฉ์์ผ๋ก ๋กค๋ฐฑ
[๐ merge] Spring Security ์ ๊ฑฐ ๋ฐ ์ปค์คํ ์ธ์ฆ ์ฒด๊ณ ๋์
There was a problem hiding this comment.
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, "์ ์ ๊ฐ ์ด๋ฏธ ์กด์ฌํฉ๋๋ค."),
| } | ||
| } | ||
| } No newline at end of file | ||
| //package org.terning.terningserver.service; |
There was a problem hiding this comment.
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