Conversation
Refactor codes related to JWT and Refresh Token
* 🚚 Change the name of DTO for Handshake to Nonce * ♻️ Delegate a responsibility related to member * 🗃️ Add Transactional to write actions * ♻️ Refactor parsing expired token method * 🔧 Set branch coverage to 0.50 * 🎨 Change the locations of parentheses * ♻️ Delegate a responsibility related to profile * 🎨 Isolate possible exceptions in each environment
* 💡 Update comment by renaming method * ✅ Refactor test codes with consistent form * ♻️ Throws exception if Principal is not Long * ✨ Add logout API * ➕ Add dependency spring security test * ♻️ Delegate verifiying Authentication Principal * 🧑💻 Notify when a new comment is added
* 🚚 Relocate files by domain * ✅ Add test cases * 🎨 Add private to Autowired RefreshTokenRepository * ✏️ Fix a space typo * ♻️ Clear SonarQubeCloud issues
* 🔥 Remove unused RefreshToken method * 🚚 Rename findById to findMemberById * 🔥 Remove unnecessary provider verification * 🦺 Change NotNull to NotBlank * 🚚 Rename nonceValue to value * 🦺 Validate whether subject is null * ✏️ Fix typos * 🚚 Rename setUp to init * 🚚 Relocate to common directory * ✅ Change the order of tests * ✨ Add deleting member API * ♻️ Clear Gemini issues * ♻️ Clear SonarQubeCloud issues
* 🎨 Remove JsonProperty * 🦺 Validate whether parameters are null * ✨ Add change nickname API * 🦺 Validate whether provider is null
* ♻️ Separate exceptions by domain * 🔧 Set branch coverage to 0.70 * 🎨 Add name to Checkout step * ♻️ Clear the review by Gemini * 📝 Add ApiResponse to delete method
* 🧑💻 Add buttons to link of Github * 🚚 Rename deployment to deploy * 🚧 Add Apple Provider and Client * 🔒️ Activate TestController only on prod or stg * ✨ Verify ID Token from Apple * 🚚 Rename validate to verify * 🗃️ Add Apple ID column to member table * 🗃️ Add constraints to columns * 🗃️ Change the time zone of DB server to UTC * ✏️ Fix a typo * ♻️ Clear the review by Gemini
* ✨ Create Notification entity * ✨ Create TimeNotif entity * ✨ Create NotifType Enum constatnt * ✨ Create TimeNotifResponse DTO * ✨ Create Scenario entity * ✨ Create Mission entity * ✨ Create BaseTimeEntity entity * ⚡️ Create NotificationResponse Interface * 🎨 Implements Notification to TimeNotifResponse * ✨ Create ScenarioDetailResponse DTO * ✨ Create ScenarioResponse DTO * ✨ Create MissionResponse DTO * ✨ Create MissionType Enum constatnt * 🎨 Add ScenarioResponse DTO conversion static method * ✨ Add return scenario list feat * ✅ Test return scenario list by member * 🚧 Commit ScenarioUdateReq, MissionRepository * 🎨 Modify Member entity import * ✨ Create notification resolver * 🎨 Refactor NotificationResponse * 🚚 Move NotifType Package * 🚚 Move BaseTimeEntity to common package * 🎨 Add Scenario notification filed FetchType * 🎨 Change NotifType import * 🚧 Commit Return Scenario Detail feat * 🎨 Rearrang import * ✨ Add notification error * ✨ Add scenario error * ✨ Apply ServerException to mission ans scenario domain layer * 🎨 Add Index to TimeNotif * ✨ Add LocationNotif entity * ✨ Add NotificationInfoDto * ✨ Add LocationNotifResponse dto * ✨ Add NotifDayIfWeekResponse dto * 🎨 Modify TimeNotifResponse field * 🎨 Add Notification error to NotificationErrorResult * 🎨 Refcator Notification Resolver * 🎨 Refactor Scenario detail api feat * 🔥 Remove list return method from TimeNotifResponse * 🎨 Modify field name * ✅ Add NotificationResolverSelector test * ✅ Add NotificationService test * ✅ Add TimeNotifResolver test * ✅ Add MissionController test * ✅ Add ScenarioController test * ✅ Add MissionService test * ✅ Add ScenarioService test * ✨ Add notification type * 🎨 Modify mission list return dto * ✨ Add Scenario error type * ✨ Create MissionTypeGrouper * 🎨 Modify mission list type at Returning Scenario detail * ✅ Add MissionTypeGrouper Mock * ✅ Add MissionTypeGrouper test * 🎨 Add createdAt and updateAt filed to entity * 🎨 Modify Today mission sorting * ✨ Add insert new today type mission feat * ✨ Create request dto required for add new scenario * 🚚 Rename Notification abbreviated representation * 🎨 Apply renamed Notification to dto * ✨Create OrderCalculator component * ✨ Add new scenario error type * ✨ Create custom exception ReorderRequeiredExceoption * 🎨 Add chacking accessableMmember to Scenario entity * 🚚 Rename Selector * 🔥 NotificationInfoDto * 🐛 Add NotificationType when get mission list * ✨ Add new Scenario feat * 🐛 Fix calculate order code when add new scenario * 🚚 Modify NotificationConditionSelector paramter * 🎨 Fix Indentation * ✅ Add NotificationConditionSelector test * 🚚 Modify NotificationService parameter * 🎨 Move Everyday constant * ✅ Update NotificationService test * 🔥 Remove TimeNotifResolverTest * 🔥 Remove NotificationResolverSelectorTest * ✅ Add TimeNotificationService test * ✅ Update MissionService test * 🐛 Fix Scenario member validation * 🎨 Modify validate member access modifiers * 🎨 Update validate when mission list empty * ✅ Update ScenarioService test * ✅ Update MissionTypeGrouper test * 📝 Delete memo in OrderCalculator * ✅ Add OrderCalculator test * ✅ Update MissionService test * ✅ Update ScenarioService test * ✏️ Modify request package name * ✏️ Modify table indexing name * ✨ Add return home api * 🔥 Remove NotificationResponse * 🎨 Add setter to entity for update feat * ✨ Add Scenario detail update feat * 🔥 Remove NotificationDayOfWeekRequest * ✨ Change Notification every day feat * ✨ Change Notification everyday feat * 🎨 Add memberId condition * 🎨 Add LocalDate to handle Mission entity useDate * ✅ Update NotificationConditionSelector test * ✅ Update NotificationService test * ✅ Update TimeNotiicationService test * ✅ Add MissionSearchType test * ✅ Add HomeController test * ✅ Update MissionController test * ✅ Update SceanrioController test * ✅ Update MissionService test * ✅ Update ScenarioService test * ✅ Update ScenarioService test * ✨ Add Mission delete feat * ✅ Add Mission delete feat test * ✨ Add Mission check status update feat * ✅ Add Mission check status update test * ✨ Add Scenario delete with all missions feat * ✨ Add Notification delete when delete scenario * 🎨 Update Scenario entity cascade * 🎨 Modify repository method name * ✨ Add Scenario order update feat * 🎨 Add Scenario max count validation when add new Scenario * 🎨 Add Colum name from Mission and Scenario entity * 🎨 Add Column name * 🎨 Adjust line * 🎨 Modify Scenario find query * 🎨 Modify Scenario member filed constaint * 🎨 Add NotificationRequest validate constraint * 🎨 Modify Notification delete * 🔥 Remove comment * ✨ Add EnableJpaAuditing annotaion to ServerApplication * 🎨 Add Default Builder annotation * ✅ Update Notification domain test * ✅ Update TimeNotification test * ✅ Update Scenario domain test * 🐛 Replace Spring Data auditing with Hibernate timestamps * 🐛 Modify to jakarta NotBlank valid annotation * 🎨 Refactor NotificationConditionSelector * 🎨 Modify MissionSearchType rangeDays * 🔥Remove line * 🔥 Remove annotation blank link * ✅ Update MissionSearchType test * 🔥 Remove parenthesis line * 🎨 Modify entity constraint * 🎨 Modify entity filed name * 🎨 Remove entity setter * ✅ Update Scenario domain test * 🚚 Rename Notification constant name * 🎨 Rename Notif to Notification * ✅ Rename Notif to Notification * 🎨 Refactor response dto * 🎨 Update where use changed response dto * 🎨 Refactor HomeController * 🎨 Add JsonCreator to Enum * 📝 Add Schema to request dto * ✨ Add Scenario without notification Create Update feat * 🎨 Update Notification entity * 🎨 Refactor request dto from POJO to record * 🎨 Refactor find missions by mission type * 🔥 Delete Scenario entity upadte Notification method * 🎨 Refactor ScenarioService validation * 🎨 Refactor MissionService validation * ✅ Update notification domain test * ✅ Update scenario domain test * 🎨 Modify annotation order * 📝 Modify Dto schema * 📝 Add controller ApiResponse schema * ✅ Update Notification service test * 🎨 Modify parameter name * 🎨 Modify annotation order * 📝 Add Controller Exception schema * 🎨 Modify NotificationConditionSelector find Service method * 🎨 Add Valid annotation to ScenarioDetailRequest * 🎨 Modify entity annotation order * 🎨 Modify list parameter * 🐛 Modify created Today Mission to be returned * 🎨 Refactor reorder scenario order * ✅ Update Scenario ordering test * 🎨 Modify find missions date RequestParam * 🎨 Modify Update Scenario Order controller schema * 🔥 Delete HomeController * 🔥Delete HomeController test * 🎨 Modify ResponseBody when create Scenario * 🎨 Modify MissionController HttpStatus * ✅ Update controller ResponseBody and HttpStatus * 🎨 Refactor notification domain add parameter final * 🎨 Refactor scenario domain add parameter final * 🎨 Refactor Enum constants add parameter final * ✅ Update MissionService test
* 🔥 Delete ScenarioNoNotificationRequest * 🎨 Refactor Scenario api integration * ✅ Update Scenario api integrate test * 🎨 Modify Scenario Start Order constatnt * ✅ Modify ScenarioService test calculateOrder * 🎨 Refactor Notification active status process * ✅ Update NotificationService test * ✅ Update ScenarioService test * 🎨 Modify notification and notification condition entity * 🎨 Modify notification days of week * ✅ Update Notification days of week test * 🎨 Modify Returing mission list in response body on create and update * 🔥 Remove MissionGroupResponse JsonInclude annotation * ✅ Update Returning mission list int body * 🎨 Add Entity table name * ✨ Add migration DDL for entity
* ✨ Add Scenario notification cache update eventlistener * 🔧 Add AsyncConfig * ✨ Add Scenario notification cache feat * 🎨 Refactor NotificationCacheService * 📝 Add new api memo * 🔧 Add Redis Object value map config * 🎨 Modify Scenario update cache update event processor * 🎨 Add error log to event listener * 🚚 Move NotificationEventPublisher * 📝 Update java docs * 🎨 Refactor NotificationCacheService * 🎨 Refactor SceanrioNotificationService * ✨ Add Single Scenario notification api feat * 🎨 Refactor Notification Cache process exception * 🎨 Modify NotificationConditionResponse Schema * 🎨 Modify ScenarioResponse days of week filed name * 📝 Add swagger schema to ScenarioNotificationResponse * 📝 Add swagger schema to NotificationController * 🎨 Add final to parameter * 🐛 Resolve ETag synchronization issue in single notification retrieval * 🎨 Add Transactional annotation * 📝 Add example Schema to ScenarioNotificationListResponse etag filed * 🎨 Modify parameters name * ✅ Update ScenarioService test * ✅ Add NotificationController test * ✅ Add Notification Cache util test * ✅ Add Notification Cache event listener test * 🔥 Delete NotificationCacheException exception method * ✅ Add ScenarioNotificationService test * ✅ Add SceanrioReponsitorycustomImpl test * ✅ Add NotificationCachesService test * 🎨 Modify line * 🎨 Modify ScenarioUpdateEventListener cache process with notification * ✅ Update ScenarioUpdateEventListener test * 🎨 Modify NotificationCacheService EventListener exception * ✅ Update NotificationController test * ✅ Update NotificationCacheService test
- 🐛 Fix column annotation for isOver14
* 🔧 Add WeatherProperties * ✨ Add weather feat * 🎨 Add Schema to dto * 🎨 Modify Enum getWorst method parameter type * 🎨 Refactor Extractors * 🎨 Refactor Weather Enums * 🐛 Fix future weather basetime * 🎨 Refactor reducing api accesses * 📝 Add api result log * 🎨 Refactor WeatherController * 🚧 Process Weather Cache * 🎨 Refactor Redis Cache Data * 🎨 Refactor api response dto * 🎨 Modify Weather Enum * 🔥 Delete HourlyWeatherInfo * 🚧 Process Weather Cache * 🎨 Modify FutureWeatherDecisionSelector * 🎨 Refactor future wether * 🎨 Refactor WeatherService * 🎨 Modify Get Date from RequestParam * 🎨 Refactor GridConvertor * 🎨 Refactor WeatherTtlCalculator * 🎨 Refactor Cache grip calculate method * 🎨 Refactor WetherCacheService * 🎨 Refactor Weather api processor * 🎨 Refactor exrtractor * 🔧 Update application.yml to use environment variables for API keys * 🎨 Modify Redis Cache key value dto * 🚚 Move package WeatherKeyGenerator to util * 📝 Update api interface java docs * 🔧 Update WeatherProperties to unchangeable * 🎨 Modify Used WeatherProperties * 🎨 Modify for editorconfigFormat * 🎨 Refactor WeatherCacheData return method * 🎨 Refactor Weather service layer * 🎨 Refactor cache serialize * 🎨 Add retuning default weather response * 🎨 Add Cache data dto returning defult * 🎨 Modify KmaWeatherResponse POJO to record * 🎨 Modify OpenMeteoResponse POJO to record * 🎨 Modify Cache data dto POJO to record * 🎨 Refactor WeatherDecisionService exception * 🎨 Modify WeatherResponse type to Enum * 🎨 Modify WeatherType Default type * 🎨 Modify WeatherErrorResult * 🎨 Refactor Enum constants * 🎨 Add final to parameter * 🎨 Modify TimeSlot range * 🎨 Modify Today weather cache type * 🔥 Delete TimeSlotWeatherCacheData * 🔧 Add WeatherConfig Executor * 🎨 Modify WeatherApiProcessor exception * 🎨 Refactor Extractor * ✨ Add weather fallback process * 🔧 Add open-meteo-kma base url to application * 🎨 Modify fallback process exception * 🎨 Modify open-meteo request variable * 🔊 Modify WeatherCacheService log * 🔊 Modify CacheSerializer log * 📝 Modify annotation order * 📝 Modify parameter * 🔥 Remove WeatherService try-catch * 🎨 Modify WeatherCacheService try-catch * 🎨 Modify CacheData and Response dto from method * 🎨 Modify WeatherService Default returning * 🎨 Modify WeatherService exception * 🐛 Add JsonIgnore to WeatherCacheData * 🎨 Refactor Api service * 🚚 Rename Api service * 🚚 Move to infrastructure package api connection class * 🎨 Modify WeatherTtlCalculator parameter * ✅ Add Weather constants * ✅ Add Weather util * ✅ Add Weather service * ✅ Add UvIndexExtractor test * ✅ Add WeatherCacheService test * ✅ Add Unchecked annotation to WeatherCacheServiceTest * ✅ Add Weather Facade test * ✅ Add WeatherController test * ✅ Add WeatherResponse test * ✅ Update Weather Facade * ✅ Add KmaApiException test * ✅ Add WeatherProperties test * ✅ Add Weather api response test * ✅ Update WeatherApiService * 🎨 Refactor KmaWeatherExtractor * 🔥 Delete calculate AverageValue from UVType * ✅ Update used UvType Average test * 🔥 Delete calculate Average value from FindDustType * ✅ Update used FineDust Average test * 🎨 Refactor FineDustExtractor * 🎨 Refactor UvIndexExtractor * ✏️ Fix FineDust typos * ✅ Modify FindDust typos * ✅ Update FineDustType test * ✅ Update TimeSlot test * ✅ Modify UvType test * ✅ Modify WeatherType test * ✅ Update WeatherController test * ✅ Modify FineDustExtractor test * ✅ Modify KmaWeatherExtractor test * ✅ Modify OpenMeteoWeatherExtractor test * ✅ Modify UvIndexExtractor test * ✅ Modify WeatherApiService test * ✅ Modify WeatherCacheService test * ✅ Modify WeatherDecisionService test * ✅ Modify CacheSerializer test * 👽️ Modify Scenario Notification api --------- Co-authored-by: Chori <105255517+choridev@users.noreply.github.com>
* ✨ Add EnableScheduling annotation to ServerApplication * ✨ Add Mission backup feat * 🐛 Fix find Scenario detail and Scenario update query * 🐛 Fix Add Today Mission find Scenario fetch query * ⚡️Modify delete Scenario update query * ⚡️ Modify Scenario find query * ⚡️Modify delete expired mission query * 🎨 Modify indentation tab * 🎨 Refactor SenarioMissionDailyJob * 📝 Add Java docs to ScenarioMissionDailyJob Scheduler * ✅ Modify ScenarioService test * ✅ Add ScenarioMissionDailyJob test * 🎨 Modify line ScenarioService * 🔥 Delete Query from ScenarioRepository * 📝 Modify ScnarioMissionDaliyJob delete expired mission log * 🔧 Add Timeconfig * 🎨 Modify calculate today LocalDate method * ✅ Modify ScenarioDaliyJob test * 🎨 Modify Future Mission find query * ✅ Modify MissionService test * 🔧 Modify TimeConfig TimeZone from KST to UTC * 🐛 Modify today TimeZone * 🐛 Modify timeZone to Asia * 🐛 Add TimeZone to Weather * ✅ Update WearherController test * ✅ Update Scenario util test * ✅ Modify MossionsearchType test * ✅ Modify clock TimeZone
* ✨ Add parentMissionId column to Mission entity * 🔧 Add Mission parent_mission_id Alert DDL * ✨ Add Future Basic mission check feat * 🎨 Refactor mission check update * 🔧 Modify common AsyncConfig * 🐛 Fix Returning empty mission list * ⚡️ Modify returning future mission list check update * ⚡️Modify future missions change method * ⚡️Modify future mission check * 🐛 Fix LocalDate TimeZone * 🎨 Modify MissionRepository indentation tab * ✅ Modify ScenarioMissionDailyJob test * ✅ Modify MissionController test * ✅ Update MissionService test * ✅ Update MissionService test * 🔥 Remove missionId parameter from MissionService * ✅ Update MissionService test
* ⚡️ Modify getWeather TimeZone Parameter to ZoneId * ✅ Modify Weather TimeZone to ZoneId * ⚡️ Add Weather Api Fail common Exception * 📝 Add NotificationApiDocs * 📝 Add WeatherApiDocs * 📝 Add MissionApiDocs * 📝 Add ScenarioApiDocs * ⚡️ Modify Mission find query * 🎨 Refactor Scenario notification active status update * 🎨 Add Mission entity parameter final * 🔥 Delete unused find mission code * 🔥 Delete unused import from MissionValidator * 🔧 Add ApiDocd to BeforeExecutionExclusionFileFilter * ✅ Modify ScenarioService test * ✅ Modify MissionService test * ✅ Modify NotificationService test * ✅ Modify MissionValidator test
* 🐛 Fix Scenario order when creating scenario * 🐛 Fix calculate reorder * 🐛 Fix Response body when creating and updating Scenario * ✨ Add Notification Active update feat * ✨ Add Notification active update eventListener * ✅ Modify ScenarioController test * ✅ Modify SceenarioService test * ✅ Modify OrderCalculator test * ✅ Add Notification status update test * ✅ Add Notification Active status update eventListener test * ✅ Modify Notification and Scenario service assertThat
|
There was a problem hiding this comment.
Summary of Changes
Hello @choridev, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!
이 Pull Request는 애플리케이션의 핵심 기능을 대폭 확장하고 아키텍처를 개선하는 광범위한 변경 사항을 포함합니다. 사용자 인증 및 관리를 강화하고, 시나리오 기반의 미션 및 알림 시스템을 도입하며, 외부 날씨 정보 연동 기능을 추가하여 사용자 경험을 풍부하게 합니다. 또한, 코드베이스를 모듈화하고 캐싱 및 비동기 처리를 도입하여 시스템의 성능과 유지보수성을 향상시키는 데 중점을 두었습니다.
Highlights
- 인증 및 권한 부여 시스템 전면 개편: 기존 인증 관련 코드를
auth패키지 아래로 재구성하고, JWT 처리, OAuth (카카오, 애플) 연동, 토큰 재발급, 사용자 인증 필터 등 전반적인 인증 로직을 개선했습니다. - 새로운 기능 추가: 애플 OAuth 연동, 사용자 관리 (닉네임 업데이트, 회원 탈퇴), 약관 동의 관리, 날씨 정보 조회 (기상청, Open-Meteo API), 시나리오 및 미션 관리, 알림 설정 관리 등 다양한 신규 기능이 추가되었습니다.
- 코드 구조 및 유지보수성 향상: 도메인별 패키지 분리,
common모듈 도입을 통한 공통 유틸리티 및 예외 처리 로직 분리, Redis 캐싱 적용, 비동기 이벤트 처리를 통해 코드 응집도, 성능 및 유지보수성을 크게 개선했습니다. - 데이터베이스 스키마 변경:
member테이블에apple_id컬럼 및UNIQUE제약 조건이 추가되었고,notification,time_notification,location_notification,scenario,mission,terms등 다수의 신규 테이블이 추가되었습니다.mission테이블에는parent_mission_id가 추가되었습니다. - 빌드 및 코드 품질 개선: Spring Security 테스트 의존성 추가, Checkstyle 및 JaCoCo 설정 업데이트,
application.yml에 Apple OAuth 및 날씨 API 설정이 추가되었습니다.
Using Gemini Code Assist
The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.
Invoking Gemini
You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.
| Feature | Command | Description |
|---|---|---|
| Code Review | /gemini review |
Performs a code review for the current pull request in its current state. |
| Pull Request Summary | /gemini summary |
Provides a summary of the current pull request in its current state. |
| Comment | @gemini-code-assist | Responds in comments when explicitly tagged, both in issue comments and review comments. |
| Help | /gemini help |
Displays a list of available commands. |
Customization
To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.
Limitations & Feedback
Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.
You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.
Footnotes
-
Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩
There was a problem hiding this comment.
Code Review
안녕하세요. 대규모 리팩토링과 신규 기능 추가를 포함한 중요한 변경사항을 리뷰했습니다. 전체적으로 코드 구조가 크게 개선되었고, 특히 인증/인가 로직의 모듈화, 프로필 기반 설정 분리, 테스트 코드 강화 등 많은 부분이 인상적입니다. 새로운 기능들 또한 체계적으로 잘 구현된 것으로 보입니다.
다만, 한 가지 중요한 우려 사항이 있습니다. 다수의 DTO 파일에서 @JsonProperty 어노테이션이 제거되었습니다. 이 변경으로 인해 외부 서비스(Kakao, Apple)의 응답을 처리하지 못하거나, 기존 클라이언트와의 API 호환성이 깨질 수 있습니다. 예를 들어, 외부 OIDC 공급자는 snake_case 형식의 JSON을 반환하는데, @JsonProperty가 없으면 Jackson이 이를 camelCase 필드에 매핑하지 못해 오류가 발생할 것입니다. 또한, API 응답의 JSON 필드명도 snake_case에서 camelCase로 변경되어 기존 클라이언트 앱의 오작동을 유발할 수 있습니다.
이 부분은 애플리케이션의 핵심 기능인 인증에 직접적인 영향을 미치므로, 배포 전에 반드시 수정이 필요해 보입니다. 각 파일에 구체적인 수정 제안을 남겼으니 확인 부탁드립니다.
그 외의 변경 사항들은 전반적으로 훌륭하며, 프로젝트의 안정성과 유지보수성을 크게 향상시킬 것으로 기대됩니다. 수고 많으셨습니다!
| public record OidcPublicKey( | ||
| @Schema(description = "Key ID", example = "a1b2c3d4e5") | ||
| @JsonProperty("kid") String kid, | ||
| String kid, | ||
|
|
||
| @Schema(description = "Key Type", example = "RSA") | ||
| @JsonProperty("kty") String kty, | ||
| String kty, | ||
|
|
||
| @Schema(description = "Algorithm", example = "RS256") | ||
| @JsonProperty("alg") String alg, | ||
| String alg, | ||
|
|
||
| @Schema(description = "Usage", example = "sig") | ||
| @JsonProperty("use") String use, | ||
| String use, | ||
|
|
||
| @Schema(description = "Modulus", example = "q8zZ0b_MNaLd6Ny8wd4...") | ||
| @JsonProperty("n") String n, | ||
| String n, | ||
|
|
||
| @Schema(description = "Exponent", example = "AQAB") | ||
| @JsonProperty("e") String e | ||
| String e | ||
| ) { } |
There was a problem hiding this comment.
OIDC 공개 키 정보를 처리하는 이 DTO에서 @JsonProperty 어노테이션이 제거되었습니다. Kakao, Apple과 같은 외부 OIDC 공급자의 JWKS 엔드포인트는 snake_case (kid, kty 등) 형식의 JSON을 반환합니다. @JsonProperty가 없으면 Jackson 라이브러리가 JSON 필드를 이 레코드의 camelCase 필드(kid, kty)에 올바르게 매핑하지 못하여 인증 과정에서 심각한 오류를 발생시킬 수 있습니다.
이전 버전처럼 @JsonProperty를 다시 추가하여 외부 서비스와의 호환성을 유지하는 것을 강력히 권장합니다.
| public record OidcPublicKey( | |
| @Schema(description = "Key ID", example = "a1b2c3d4e5") | |
| @JsonProperty("kid") String kid, | |
| String kid, | |
| @Schema(description = "Key Type", example = "RSA") | |
| @JsonProperty("kty") String kty, | |
| String kty, | |
| @Schema(description = "Algorithm", example = "RS256") | |
| @JsonProperty("alg") String alg, | |
| String alg, | |
| @Schema(description = "Usage", example = "sig") | |
| @JsonProperty("use") String use, | |
| String use, | |
| @Schema(description = "Modulus", example = "q8zZ0b_MNaLd6Ny8wd4...") | |
| @JsonProperty("n") String n, | |
| String n, | |
| @Schema(description = "Exponent", example = "AQAB") | |
| @JsonProperty("e") String e | |
| String e | |
| ) { } | |
| public record OidcPublicKey( | |
| @Schema(description = "Key ID", example = "a1b2c3d4e5") | |
| @com.fasterxml.jackson.annotation.JsonProperty("kid") String kid, | |
| @Schema(description = "Key Type", example = "RSA") | |
| @com.fasterxml.jackson.annotation.JsonProperty("kty") String kty, | |
| @Schema(description = "Algorithm", example = "RS256") | |
| @com.fasterxml.jackson.annotation.JsonProperty("alg") String alg, | |
| @Schema(description = "Usage", example = "sig") | |
| @com.fasterxml.jackson.annotation.JsonProperty("use") String use, | |
| @Schema(description = "Modulus", example = "q8zZ0b_MNaLd6Ny8wd4...") | |
| @com.fasterxml.jackson.annotation.JsonProperty("n") String n, | |
| @Schema(description = "Exponent", example = "AQAB") | |
| @com.fasterxml.jackson.annotation.JsonProperty("e") String e | |
| ) { } |
| public record OidcPublicKeys( | ||
| @Schema(description = "List of public keys", example = "[...]") | ||
| @JsonProperty("keys") List<OidcPublicKey> keys | ||
| List<OidcPublicKey> keys | ||
| ) { |
There was a problem hiding this comment.
OidcPublicKey와 마찬가지로, 이 DTO에서도 @JsonProperty("keys") 어노테이션이 제거되었습니다. 외부 OIDC 공급자는 keys라는 필드명으로 공개 키 목록을 반환하므로, 이 어노테이션이 없으면 공개 키 목록을 정상적으로 파싱할 수 없습니다.
이전과 같이 @JsonProperty를 추가하여 문제를 해결해야 합니다.
| public record OidcPublicKeys( | |
| @Schema(description = "List of public keys", example = "[...]") | |
| @JsonProperty("keys") List<OidcPublicKey> keys | |
| List<OidcPublicKey> keys | |
| ) { | |
| public record OidcPublicKeys( | |
| @Schema(description = "List of public keys", example = "[...]") | |
| @com.fasterxml.jackson.annotation.JsonProperty("keys") List<OidcPublicKey> keys | |
| ) { |
| public record AuthRequest( | ||
| @Schema(description = "OAuth provider name", example = "kakao") | ||
| @NotNull(message = "Provider must not be null") @JsonProperty("provider") String provider, | ||
| @NotBlank(message = "Provider name must not be blank") String provider, | ||
|
|
||
| @Schema(description = "ID Token from the OAuth provider", example = "eyJhbGciOiJIUzI1Ni...") | ||
| @NotNull(message = "ID Token must not be null") @JsonProperty("id_token") String idToken | ||
| @NotBlank(message = "ID Token must not be blank") String idToken | ||
| ) { } |
There was a problem hiding this comment.
@JsonProperty("id_token") 어노테이션이 제거되어 클라이언트가 보내는 JSON의 필드명이 id_token에서 idToken으로 변경되었습니다. 이는 기존 클라이언트와의 API 호환성을 깨뜨릴 수 있는 변경입니다.
기존 클라이언트가 id_token 필드를 사용하고 있다면, 이전과 같이 @JsonProperty를 유지하여 하위 호환성을 보장하는 것이 좋습니다. 만약 모든 클라이언트를 동시에 업데이트할 수 있다면 현재 코드도 괜찮지만, 일반적으로는 API 계약을 유지하는 것이 안전합니다.
| public record AuthRequest( | |
| @Schema(description = "OAuth provider name", example = "kakao") | |
| @NotNull(message = "Provider must not be null") @JsonProperty("provider") String provider, | |
| @NotBlank(message = "Provider name must not be blank") String provider, | |
| @Schema(description = "ID Token from the OAuth provider", example = "eyJhbGciOiJIUzI1Ni...") | |
| @NotNull(message = "ID Token must not be null") @JsonProperty("id_token") String idToken | |
| @NotBlank(message = "ID Token must not be blank") String idToken | |
| ) { } | |
| public record AuthRequest( | |
| @Schema(description = "OAuth provider name", example = "kakao") | |
| @NotBlank(message = "Provider name must not be blank") String provider, | |
| @Schema(description = "ID Token from the OAuth provider", example = "eyJhbGciOiJIUzI1Ni...") | |
| @com.fasterxml.jackson.annotation.JsonProperty("id_token") @NotBlank(message = "ID Token must not be blank") String idToken | |
| ) { } |
| public record AuthResponse( | ||
| @Schema(description = "Token type", example = "Bearer") | ||
| @JsonProperty("token_type") String tokenType, | ||
| String tokenType, | ||
|
|
||
| @Schema(description = "Access Token for API authentication", example = "eyJhbGciOiJIUzI1Ni...") | ||
| @JsonProperty("access_token") String accessToken, | ||
| String accessToken, | ||
|
|
||
| @Schema(description = "Access Token expiration time in seconds", example = "3600") | ||
| @JsonProperty("access_token_expires_in") Integer accessTokenExpiresIn, | ||
| Integer accessTokenExpiresIn, | ||
|
|
||
| @Schema(description = "Refresh Token for renewing the Access Token", example = "a1b2c3d4-e5f6-78...") | ||
| @JsonProperty("refresh_token") String refreshToken, | ||
| String refreshToken, | ||
|
|
||
| @Schema(description = "Refresh Token expiration time in seconds", example = "604800") | ||
| @JsonProperty("refresh_token_expires_in") Integer refreshTokenExpiresIn | ||
| Integer refreshTokenExpiresIn | ||
| ) { } |
There was a problem hiding this comment.
로그인 및 토큰 재발급 API의 응답 DTO에서 @JsonProperty 어노테이션이 모두 제거되었습니다. 이로 인해 JSON 응답의 필드명이 access_token과 같은 snake_case에서 accessToken과 같은 camelCase로 변경됩니다. 이는 기존 클라이언트의 파싱 로직에 오류를 발생시킬 수 있는 중대한 변경입니다.
API의 하위 호환성을 유지하기 위해 이전과 같이 @JsonProperty를 사용하여 필드명을 명시적으로 지정하는 것을 권장합니다.
| public record AuthResponse( | |
| @Schema(description = "Token type", example = "Bearer") | |
| @JsonProperty("token_type") String tokenType, | |
| String tokenType, | |
| @Schema(description = "Access Token for API authentication", example = "eyJhbGciOiJIUzI1Ni...") | |
| @JsonProperty("access_token") String accessToken, | |
| String accessToken, | |
| @Schema(description = "Access Token expiration time in seconds", example = "3600") | |
| @JsonProperty("access_token_expires_in") Integer accessTokenExpiresIn, | |
| Integer accessTokenExpiresIn, | |
| @Schema(description = "Refresh Token for renewing the Access Token", example = "a1b2c3d4-e5f6-78...") | |
| @JsonProperty("refresh_token") String refreshToken, | |
| String refreshToken, | |
| @Schema(description = "Refresh Token expiration time in seconds", example = "604800") | |
| @JsonProperty("refresh_token_expires_in") Integer refreshTokenExpiresIn | |
| Integer refreshTokenExpiresIn | |
| ) { } | |
| public record AuthResponse( | |
| @Schema(description = "Token type", example = "Bearer") | |
| @com.fasterxml.jackson.annotation.JsonProperty("token_type") String tokenType, | |
| @Schema(description = "Access Token for API authentication", example = "eyJhbGciOiJIUzI1Ni...") | |
| @com.fasterxml.jackson.annotation.JsonProperty("access_token") String accessToken, | |
| @Schema(description = "Access Token expiration time in seconds", example = "3600") | |
| @com.fasterxml.jackson.annotation.JsonProperty("access_token_expires_in") Integer accessTokenExpiresIn, | |
| @Schema(description = "Refresh Token for renewing the Access Token", example = "a1b2c3d4-e5f6-78...") | |
| @com.fasterxml.jackson.annotation.JsonProperty("refresh_token") String refreshToken, | |
| @Schema(description = "Refresh Token expiration time in seconds", example = "604800") | |
| @com.fasterxml.jackson.annotation.JsonProperty("refresh_token_expires_in") Integer refreshTokenExpiresIn | |
| ) { } |

✅ PR 타입
반영 브랜치
dev -> main
✨ 변경 사항
개발 서버에 배포된 애플리케이션이 운영 서버에도 문제 없이 배포되는지 확인하기 위한 테스트입니다.
💯 테스트 결과
📂 관련 이슈
👀 리뷰어에게
개발 서버에 배포된 애플리케이션이 운영 서버에도 문제 없이 배포되는지 확인하기 위한 테스트입니다.