8주차 미션 [루크]#20
Open
yujining3827 wants to merge 62 commits into
Open
Conversation
yangjiae12
approved these changes
May 26, 2026
|
|
||
| @Bean | ||
| public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception { | ||
| public SecurityFilterChain securityFilterChain(HttpSecurity http, CustomAuthenticationEntryPoint customAuthenticationEntryPoint, CustomAccessDeniedHandler customAccessDeniedHandler) throws Exception { |
Member
There was a problem hiding this comment.
SecurityFilterChain 메서드 파라미터로 customAuthenticationEntryPoint, customAccessDeniedHandler를 받고 있지만, 실제 설정에서는 필드로 주입받은 authenticationEntryPoint, accessDeniedHandler를 사용하고 있는 것 같습니다!
Comment on lines
+34
to
+37
| @Transactional | ||
| public MemberResDTO.SignupDTO signup( | ||
| MemberReqDTO.SignupDTO request | ||
| ) { |
Member
There was a problem hiding this comment.
회원가입 흐름이 깔끔한 것 같습니다. 다만 회원가입 요구사항에 약관 동의와 선호 음식 선택이 포함되지만, 현재는 해당 정보를 요청으로 받거나 저장하는 로직이 보이지 않아 이 부분도 함께 반영되면 좋을 것 같습니다.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🚩 관련 이슈
📌 구현 결과
미션 1. Spring Security 적용 및 회원가입 API 구현
Spring Security 의존성을 추가하고 기본 보안 설정을 적용했습니다.
회원가입 시 사용할 email, password 필드를 Member 엔티티 및 DTO에 추가했습니다.
BCryptPasswordEncoder를 Bean으로 등록하고 비밀번호 암호화를 적용했습니다.
회원가입 API(
/api/v1/members/signup)를 구현했습니다.회원가입 시 이메일 중복 검증 로직을 추가했습니다.
DTO → Entity 변환 책임을 MemberConverter로 분리했습니다.
회원가입 성공 시 공통 응답 형식(ApiResponse)을 반환하도록 구현했습니다.
미션 2. Public API / Private API 분리 및 예외 처리 구현
Spring Security의
permitAll()과authenticated()를 사용하여 Public API와 Private API를 분리했습니다.회원가입 API 및 Swagger 관련 경로는 Public API로 설정했습니다.
그 외 API는 인증이 필요한 Private API로 설정했습니다.
AuthenticationEntryPoint를 구현하여 인증 실패(401) 시 JSON 형태의 공통 응답을 반환하도록 처리했습니다.AccessDeniedHandler를 구현하여 인가 실패(403) 시 JSON 형태의 공통 응답을 반환하도록 처리했습니다.기존 Spring Security 기본 로그인 HTML 응답 대신 공통 JSON 응답이 반환되도록 수정했습니다.
❓ 리뷰 요청
🤔 질문
💬 기타 공유 사항