Skip to content

8주차 미션 [루크]#20

Open
yujining3827 wants to merge 62 commits into
mainfrom
luke/week8
Open

8주차 미션 [루크]#20
yujining3827 wants to merge 62 commits into
mainfrom
luke/week8

Conversation

@yujining3827
Copy link
Copy Markdown
Collaborator

@yujining3827 yujining3827 commented May 21, 2026

🚩 관련 이슈


📌 구현 결과

미션 1. Spring Security 적용 및 회원가입 API 구현

  • Spring Security 의존성을 추가하고 기본 보안 설정을 적용했습니다.

  • 회원가입 시 사용할 email, password 필드를 Member 엔티티 및 DTO에 추가했습니다.

  • BCryptPasswordEncoder를 Bean으로 등록하고 비밀번호 암호화를 적용했습니다.

    image
  • 회원가입 API(/api/v1/members/signup)를 구현했습니다.

    image
  • 회원가입 시 이메일 중복 검증 로직을 추가했습니다.

  • DTO → Entity 변환 책임을 MemberConverter로 분리했습니다.

  • 회원가입 성공 시 공통 응답 형식(ApiResponse)을 반환하도록 구현했습니다.


미션 2. Public API / Private API 분리 및 예외 처리 구현

  • Spring Security의 permitAll()authenticated()를 사용하여 Public API와 Private API를 분리했습니다.

  • 회원가입 API 및 Swagger 관련 경로는 Public API로 설정했습니다.

    image
  • 그 외 API는 인증이 필요한 Private API로 설정했습니다.

  • AuthenticationEntryPoint를 구현하여 인증 실패(401) 시 JSON 형태의 공통 응답을 반환하도록 처리했습니다.

    image
  • AccessDeniedHandler를 구현하여 인가 실패(403) 시 JSON 형태의 공통 응답을 반환하도록 처리했습니다.

    image
  • 기존 Spring Security 기본 로그인 HTML 응답 대신 공통 JSON 응답이 반환되도록 수정했습니다.


❓ 리뷰 요청


🤔 질문

  • Security 관련 handler를 global/handler 패키지에 위치시켰는데, security 전용 패키지로 분리하는 것이 더 적절한 구조인지 궁금합니다.

💬 기타 공유 사항

  • 로그인 미구현 상태에서 Private API 접근 시 JSON 형태의 인증 실패 응답이 반환되는 것을 확인했습니다.
  • 회원가입 API는 Swagger를 통해 테스트했습니다.


@yujining3827 yujining3827 changed the title Luke/week8 8주차 미션 [루크] May 21, 2026
Copy link
Copy Markdown
Collaborator

@ywkim1m ywkim1m left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

미션 수고하셨습니다!!

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.

2 participants