Skip to content
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

사진 관련 세션 인증/인가 처리 및 공통 응답 구현 #84

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

ahyeonkong
Copy link
Member

@ahyeonkong ahyeonkong commented Feb 24, 2025

#️⃣ Issue Number

#75

📝 작업 설명

사진 관련 세션 인증/인가 처리 및 공통 응답 리팩토링을 했습니다.

  • HttpSession session -> HttpServletRequest request 변경
  • ApiResponse 응답 통일
  • 세션 인증 로직을 AuthService로 분리하여 코드 중복 제거

📸스크린샷 (선택)

💬 리뷰 요구사항

사진 관련 코드는 다음과 같이 동작합니다!

  1. 로그인 후 세션 획득
  2. /api/photos/upload로 사진 업로드
  3. 받은 URL을 ProductRequest의 photo 리스트에 담아서 상품 생성 API 호출(직접 request 값 넣어주는 방식)
  4. 조회 시 /api/photos?keys=이미지키로 presigned URL 획득

✅ PR Checklist

PR이 다음 요구 사항을 충족하는지 확인하세요.

  • 커밋 메시지 컨벤션에 맞게 작성했습니다.
  • 변경 사항에 대한 테스트를 했습니다.(버그 수정/기능에 대한 테스트).

- ResponseEntity -> ApiResponse로 직접 반환하도록 변경
- @ResponseStatus 어노테이션으로 HTTP 상태 코드 지정 방식 개선

Resolves: #75
- 반복되는 HttpSession 검증 로직을 AuthService로 분리하여 재사용성 향상
- 세션 인증 실패 시 HttpSessionRequiredException 처리 방식 통일
- 컨트롤러 매개변수 HttpSession -> HttpServletRequest로 변경

Resolves: #75
- HttpServletRequest 추가하여 세션 접근
- HttpSessionRequiredException 처리를 통한 미인증 사용자 접근 제한

Resolves: #75
@ahyeonkong ahyeonkong self-assigned this Feb 24, 2025
@ahyeonkong ahyeonkong linked an issue Feb 24, 2025 that may be closed by this pull request
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

사진 관련 세션 인증/인가 처리 및 공통 응답 구현
1 participant