-
Notifications
You must be signed in to change notification settings - Fork 1
[#24] Fix: 여행 계획 API 인증 구조(JWT) 원복 #25
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -80,14 +80,10 @@ public ApiResponse<TripPlanResponse.TripPlanDTO> createTripPlanFromFastAPI( | |
| ) { | ||
|
|
||
| // 인증이 없어도 동작하도록 변경 | ||
| Long userId = null; | ||
| try { | ||
| userId = authUtil.getUserIdFromRequest(httpRequest); | ||
| } catch (Exception e) { | ||
| // 인증 없음 → 익명 사용자로 처리하거나 무시 | ||
| } | ||
| Long userId = authUtil.getUserIdFromRequest(httpRequest); | ||
| TripPlanResponse.TripPlanDTO response = | ||
| tripPlanService.createTripPlanFromFastAPI(userId, request); | ||
|
Comment on lines
+83
to
+85
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
# Find SecurityConfig file
echo "=== Finding SecurityConfig file ==="
find . -name "*SecurityConfig*" -type f
echo ""
echo "=== Checking for /api/trip-plan/from-fastapi in SecurityConfig ==="
rg -n "from-fastapi" --type=java
echo ""
echo "=== Checking for AuthUtil file ==="
find . -name "*AuthUtil*" -type fRepository: TripTalk/BE_SpringBoot Length of output: 466 🏁 Script executed: #!/bin/bash
echo "=== Reading SecurityConfig.java ==="
cat -n ./src/main/java/com/example/triptalk/global/config/SecurityConfig.java
echo ""
echo "=== Reading AuthUtil.java ==="
cat -n ./src/main/java/com/example/triptalk/global/security/AuthUtil.java
echo ""
echo "=== Reading TripPlanController around lines 60-90 ==="
sed -n '55,95p' -n ./src/main/java/com/example/triptalk/domain/tripPlan/controller/TripPlanController.javaRepository: TripTalk/BE_SpringBoot Length of output: 7617 코드 주석과 실제 구현이 불일치합니다. 코드의 81번 줄 주석("인증이 없어도 동작하도록 변경")은 실제 구현과 맞지 않습니다. SecurityConfig에서 🤖 Prompt for AI Agents |
||
|
|
||
| TripPlanResponse.TripPlanDTO response = tripPlanService.createTripPlanFromFastAPI(userId, request); | ||
| return ApiResponse.onSuccess(response); | ||
| } | ||
| } | ||
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.
주석이 실제 변경 내용과 모순됩니다.
Line 82의 주석은 "인증이 없어도 동작하도록 변경"이라고 되어 있지만, 실제로는 JWT 인증을 필수로 요구하도록 원복하는 것이 이번 PR의 목적입니다. 이 주석은 완전히 잘못되었으며 향후 개발자에게 혼란을 줄 수 있습니다.
다음 diff를 적용하여 주석을 제거하세요:
- // 인증이 없어도 동작하도록 변경 Long userId = authUtil.getUserIdFromRequest(httpRequest);📝 Committable suggestion
🤖 Prompt for AI Agents