-
Notifications
You must be signed in to change notification settings - Fork 3
Refactor, Feat: 회원 관련 추가 기능 구현 및 OAuth2 소셜로그인 리팩토링 #1
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
Open
ldhapple
wants to merge
19
commits into
code-zero-to-one:main
Choose a base branch
from
ldhapple:refactor-dohyun
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
9c092ba
chore: OAuth2 starter 의존성 추가.
ldhapple fcc2eb3
chore: JWT 의존성 추가
ldhapple 82813ab
refactor: OAuth2 구조 변경 기존 코드 주석처리
ldhapple edeb392
refactor: SecuritConfig 수정
ldhapple e008a01
refactor: Google, Kakao 로그인 응답 객체 구현
ldhapple 4478a42
refactor: OAuth2UserService 구현
ldhapple 273a57b
feat: JwtUtil 클래스 구현
ldhapple b56fff7
feat: CookieUtil 클래스 구현
ldhapple 966fce1
feat: 소셜로그인 성공 시 동작 구현
ldhapple a954d7a
feat: 인증 실패 시 동작 구현
ldhapple 0e104f0
feat: 권한 필요 요청 시 JWT 토큰 검증 로직 구현
ldhapple c7eac23
feat: 로그인 페이지 간단 구현
ldhapple b9b81f8
chore: Security OAuth2 관련 로그 설정 및 qa.test 프로필 활성화
ldhapple 0368ea7
fix: 카카오, 구글 로그인 에러 수정
ldhapple bbbf75f
fix: 카카오, 구글 로그인 에러 수정
ldhapple 40c7e40
chore: 타임리프 의존성 추가
ldhapple 0ff4e9d
feat: 회원 탈퇴 구현
ldhapple 96fbf52
feat: 회원 정지 (회원 상태 변경) 구현
ldhapple d5a8a11
feat: 회원목록조회 구현
ldhapple File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
672 changes: 336 additions & 336 deletions
672
src/main/java/com/codezerotoone/mvp/domain/member/auth/controller/AuthController.java
Large diffs are not rendered by default.
Oops, something went wrong.
12 changes: 12 additions & 0 deletions
12
...in/java/com/codezerotoone/mvp/domain/member/auth/controller/OAuth2PageTestController.java
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| package com.codezerotoone.mvp.domain.member.auth.controller; | ||
|
|
||
| import org.springframework.stereotype.Controller; | ||
| import org.springframework.web.bind.annotation.GetMapping; | ||
|
|
||
| @Controller | ||
| public class OAuth2PageTestController { | ||
| @GetMapping("/custom/login") | ||
| public String oAuth2LoginPage() { | ||
| return "login"; | ||
| } | ||
| } |
118 changes: 59 additions & 59 deletions
118
...one/mvp/domain/member/auth/controller/errorhandler/AuthErrorHandlingControllerAdvice.java
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,59 +1,59 @@ | ||
| package com.codezerotoone.mvp.domain.member.auth.controller.errorhandler; | ||
|
|
||
| import com.codezerotoone.mvp.domain.member.auth.controller.AuthController; | ||
| import com.codezerotoone.mvp.global.api.format.ErrorResponse; | ||
| import com.codezerotoone.mvp.global.security.exception.errorcode.SecurityErrorCode; | ||
| import com.codezerotoone.mvp.global.security.token.exception.InvalidRefreshTokenException; | ||
| import com.codezerotoone.mvp.global.security.token.exception.UnsupportedCodeException; | ||
| import lombok.extern.slf4j.Slf4j; | ||
| import org.springframework.beans.factory.annotation.Value; | ||
| import org.springframework.http.HttpHeaders; | ||
| import org.springframework.http.HttpStatus; | ||
| import org.springframework.http.ResponseEntity; | ||
| import org.springframework.web.bind.annotation.ExceptionHandler; | ||
| import org.springframework.web.bind.annotation.RestControllerAdvice; | ||
| import org.springframework.web.util.UriComponentsBuilder; | ||
|
|
||
| @RestControllerAdvice(assignableTypes = AuthController.class) | ||
| @Slf4j | ||
| public class AuthErrorHandlingControllerAdvice { | ||
| private final String clientDomain; | ||
| private final String clientOrigin; | ||
|
|
||
| public AuthErrorHandlingControllerAdvice(@Value("${client.domain}") String clientDomain, | ||
| @Value("${client.origin}") String clientOrigin) { | ||
| this.clientDomain = clientDomain; | ||
| this.clientOrigin = clientOrigin; | ||
| } | ||
|
|
||
| @ExceptionHandler(UnsupportedCodeException.class) | ||
| public ResponseEntity<ErrorResponse> unsupportedCodeException(UnsupportedCodeException ex) { | ||
| log.info("{}", ex.getMessage()); | ||
| // return new ResponseEntity<>(ErrorResponse.of(SecurityErrorCode.UNSUPPORTED_CODE), HttpStatus.UNAUTHORIZED); | ||
|
|
||
| HttpHeaders headers = new HttpHeaders(); | ||
|
|
||
| String redirectionTo = UriComponentsBuilder.fromUriString(this.clientOrigin) | ||
| .path("/redirection") | ||
| .queryParam("type", "oauth2") | ||
| .queryParam("is-success", false) | ||
| .build() | ||
| .encode() | ||
| .toUriString(); | ||
|
|
||
| headers.add(HttpHeaders.LOCATION, redirectionTo); | ||
| return new ResponseEntity<>(headers, HttpStatus.PERMANENT_REDIRECT); | ||
| } | ||
|
|
||
| @ExceptionHandler(InvalidRefreshTokenException.class) | ||
| public ResponseEntity<ErrorResponse> invalidRefreshTokenException(InvalidRefreshTokenException ex) { | ||
| log.info("{}", ex.getMessage()); | ||
| return ResponseEntity.badRequest() | ||
| .body( | ||
| ErrorResponse.of( | ||
| SecurityErrorCode.INVALID_REFRESH_TOKEN, | ||
| ex.getMessage() | ||
| ) | ||
| ); | ||
| } | ||
| } | ||
| //package com.codezerotoone.mvp.domain.member.auth.controller.errorhandler; | ||
| // | ||
| //import com.codezerotoone.mvp.domain.member.auth.controller.AuthController; | ||
| //import com.codezerotoone.mvp.global.api.format.ErrorResponse; | ||
| //import com.codezerotoone.mvp.global.security.exception.errorcode.SecurityErrorCode; | ||
| //import com.codezerotoone.mvp.global.security.token.exception.InvalidRefreshTokenException; | ||
| //import com.codezerotoone.mvp.global.security.token.exception.UnsupportedCodeException; | ||
| //import lombok.extern.slf4j.Slf4j; | ||
| //import org.springframework.beans.factory.annotation.Value; | ||
| //import org.springframework.http.HttpHeaders; | ||
| //import org.springframework.http.HttpStatus; | ||
| //import org.springframework.http.ResponseEntity; | ||
| //import org.springframework.web.bind.annotation.ExceptionHandler; | ||
| //import org.springframework.web.bind.annotation.RestControllerAdvice; | ||
| //import org.springframework.web.util.UriComponentsBuilder; | ||
| // | ||
| //@RestControllerAdvice(assignableTypes = AuthController.class) | ||
| //@Slf4j | ||
| //public class AuthErrorHandlingControllerAdvice { | ||
| // private final String clientDomain; | ||
| // private final String clientOrigin; | ||
| // | ||
| // public AuthErrorHandlingControllerAdvice(@Value("${client.domain}") String clientDomain, | ||
| // @Value("${client.origin}") String clientOrigin) { | ||
| // this.clientDomain = clientDomain; | ||
| // this.clientOrigin = clientOrigin; | ||
| // } | ||
| // | ||
| // @ExceptionHandler(UnsupportedCodeException.class) | ||
| // public ResponseEntity<ErrorResponse> unsupportedCodeException(UnsupportedCodeException ex) { | ||
| // log.info("{}", ex.getMessage()); | ||
| //// return new ResponseEntity<>(ErrorResponse.of(SecurityErrorCode.UNSUPPORTED_CODE), HttpStatus.UNAUTHORIZED); | ||
| // | ||
| // HttpHeaders headers = new HttpHeaders(); | ||
| // | ||
| // String redirectionTo = UriComponentsBuilder.fromUriString(this.clientOrigin) | ||
| // .path("/redirection") | ||
| // .queryParam("type", "oauth2") | ||
| // .queryParam("is-success", false) | ||
| // .build() | ||
| // .encode() | ||
| // .toUriString(); | ||
| // | ||
| // headers.add(HttpHeaders.LOCATION, redirectionTo); | ||
| // return new ResponseEntity<>(headers, HttpStatus.PERMANENT_REDIRECT); | ||
| // } | ||
| // | ||
| // @ExceptionHandler(InvalidRefreshTokenException.class) | ||
| // public ResponseEntity<ErrorResponse> invalidRefreshTokenException(InvalidRefreshTokenException ex) { | ||
| // log.info("{}", ex.getMessage()); | ||
| // return ResponseEntity.badRequest() | ||
| // .body( | ||
| // ErrorResponse.of( | ||
| // SecurityErrorCode.INVALID_REFRESH_TOKEN, | ||
| // ex.getMessage() | ||
| // ) | ||
| // ); | ||
| // } | ||
| //} |
52 changes: 52 additions & 0 deletions
52
src/main/java/com/codezerotoone/mvp/domain/member/auth/dto/CustomOAuth2User.java
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| package com.codezerotoone.mvp.domain.member.auth.dto; | ||
|
|
||
| import com.codezerotoone.mvp.domain.member.member.dto.MemberDto; | ||
| import java.util.ArrayList; | ||
| import java.util.Collection; | ||
| import java.util.Map; | ||
| import lombok.RequiredArgsConstructor; | ||
| import org.springframework.security.core.GrantedAuthority; | ||
| import org.springframework.security.oauth2.core.user.OAuth2User; | ||
|
|
||
| @RequiredArgsConstructor | ||
| public class CustomOAuth2User implements OAuth2User { | ||
|
|
||
| private final MemberDto memberDto; | ||
|
|
||
| @Override | ||
| public <A> A getAttribute(String name) { | ||
| return OAuth2User.super.getAttribute(name); | ||
| } | ||
|
|
||
| @Override | ||
| public String getName() { | ||
| return memberDto.getOidcId(); | ||
| } | ||
|
|
||
| @Override | ||
| public Map<String, Object> getAttributes() { | ||
| return null; | ||
| } | ||
|
|
||
| @Override | ||
| public Collection<? extends GrantedAuthority> getAuthorities() { | ||
| Collection<GrantedAuthority> collection = new ArrayList<>(); | ||
|
|
||
| collection.add(new GrantedAuthority() { | ||
| @Override | ||
| public String getAuthority() { | ||
| return memberDto.getRole(); | ||
| } | ||
| }); | ||
|
|
||
| return collection; | ||
| } | ||
|
|
||
| public Long getMemberId() { | ||
| return memberDto.getMemberId(); | ||
| } | ||
|
|
||
| public String getRole() { | ||
| return memberDto.getRole(); | ||
| } | ||
| } |
96 changes: 48 additions & 48 deletions
96
src/main/java/com/codezerotoone/mvp/domain/member/auth/service/AuthService.java
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,48 +1,48 @@ | ||
| package com.codezerotoone.mvp.domain.member.auth.service; | ||
|
|
||
| import com.codezerotoone.mvp.domain.member.auth.dto.response.LoginResult; | ||
| import com.codezerotoone.mvp.domain.member.member.entity.Member; | ||
| import com.codezerotoone.mvp.domain.member.member.repository.MemberRepository; | ||
| import com.codezerotoone.mvp.global.security.token.dto.GrantedTokenInfo; | ||
| import com.codezerotoone.mvp.global.security.token.dto.OAuth2UserInfo; | ||
| import com.codezerotoone.mvp.global.security.token.exception.UnsupportedCodeException; | ||
| import com.codezerotoone.mvp.global.security.token.support.TokenSupport; | ||
| import com.codezerotoone.mvp.global.security.token.vendor.AuthVendor; | ||
| import lombok.RequiredArgsConstructor; | ||
| import lombok.extern.slf4j.Slf4j; | ||
| import org.springframework.stereotype.Service; | ||
| import org.springframework.transaction.annotation.Transactional; | ||
|
|
||
| import java.util.Optional; | ||
|
|
||
| @Service | ||
| @RequiredArgsConstructor | ||
| @Slf4j | ||
| public class AuthService { | ||
| private final TokenSupport tokenSupport; | ||
| private final MemberRepository memberRepository; | ||
|
|
||
| @Transactional | ||
| public LoginResult loginByOAuth2(String code, String redirectUri, AuthVendor authVendor) | ||
| throws UnsupportedCodeException { | ||
| GrantedTokenInfo grantedTokenInfo = this.tokenSupport.grantToken(code, redirectUri, authVendor); | ||
| Optional<Member> memberOp = this.memberRepository.findByOdicId(grantedTokenInfo.id()); | ||
| if (memberOp.isPresent()) { | ||
| Member member = memberOp.get(); | ||
| return LoginResult.builder() | ||
| .newMember(false) | ||
| .accessToken(grantedTokenInfo.accessToken()) | ||
| .refreshToken(grantedTokenInfo.refreshToken()) | ||
| .memberId(member.getMemberId()) | ||
| .build(); | ||
| } | ||
| OAuth2UserInfo userInfo = this.tokenSupport.retrieveUserInfo(grantedTokenInfo.accessToken()); | ||
| return LoginResult.builder() | ||
| .newMember(true) | ||
| .accessToken(grantedTokenInfo.accessToken()) | ||
| .refreshToken(grantedTokenInfo.refreshToken()) | ||
| .profileImageUrl(userInfo.profileImageUrl()) | ||
| .userName(userInfo.name()) | ||
| .build(); | ||
| } | ||
| } | ||
| //package com.codezerotoone.mvp.domain.member.auth.service; | ||
| // | ||
| //import com.codezerotoone.mvp.domain.member.auth.dto.response.LoginResult; | ||
| //import com.codezerotoone.mvp.domain.member.member.entity.Member; | ||
| //import com.codezerotoone.mvp.domain.member.member.repository.MemberRepository; | ||
| //import com.codezerotoone.mvp.global.security.token.dto.GrantedTokenInfo; | ||
| //import com.codezerotoone.mvp.global.security.token.dto.OAuth2UserInfo; | ||
| //import com.codezerotoone.mvp.global.security.token.exception.UnsupportedCodeException; | ||
| //import com.codezerotoone.mvp.global.security.token.support.TokenSupport; | ||
| //import com.codezerotoone.mvp.global.security.token.vendor.AuthVendor; | ||
| //import lombok.RequiredArgsConstructor; | ||
| //import lombok.extern.slf4j.Slf4j; | ||
| //import org.springframework.stereotype.Service; | ||
| //import org.springframework.transaction.annotation.Transactional; | ||
| // | ||
| //import java.util.Optional; | ||
| // | ||
| //@Service | ||
| //@RequiredArgsConstructor | ||
| //@Slf4j | ||
| //public class AuthService { | ||
| // private final TokenSupport tokenSupport; | ||
| // private final MemberRepository memberRepository; | ||
| // | ||
| // @Transactional | ||
| // public LoginResult loginByOAuth2(String code, String redirectUri, AuthVendor authVendor) | ||
| // throws UnsupportedCodeException { | ||
| // GrantedTokenInfo grantedTokenInfo = this.tokenSupport.grantToken(code, redirectUri, authVendor); | ||
| // Optional<Member> memberOp = this.memberRepository.findByOdicId(grantedTokenInfo.id()); | ||
| // if (memberOp.isPresent()) { | ||
| // Member member = memberOp.get(); | ||
| // return LoginResult.builder() | ||
| // .newMember(false) | ||
| // .accessToken(grantedTokenInfo.accessToken()) | ||
| // .refreshToken(grantedTokenInfo.refreshToken()) | ||
| // .memberId(member.getMemberId()) | ||
| // .build(); | ||
| // } | ||
| // OAuth2UserInfo userInfo = this.tokenSupport.retrieveUserInfo(grantedTokenInfo.accessToken()); | ||
| // return LoginResult.builder() | ||
| // .newMember(true) | ||
| // .accessToken(grantedTokenInfo.accessToken()) | ||
| // .refreshToken(grantedTokenInfo.refreshToken()) | ||
| // .profileImageUrl(userInfo.profileImageUrl()) | ||
| // .userName(userInfo.name()) | ||
| // .build(); | ||
| // } | ||
| //} |
19 changes: 19 additions & 0 deletions
19
...main/java/com/codezerotoone/mvp/domain/member/auth/service/CustomAccessDeniedHandler.java
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| package com.codezerotoone.mvp.domain.member.auth.service; | ||
|
|
||
| import jakarta.servlet.ServletException; | ||
| import jakarta.servlet.http.HttpServletRequest; | ||
| import jakarta.servlet.http.HttpServletResponse; | ||
| import java.io.IOException; | ||
| import org.springframework.security.access.AccessDeniedException; | ||
| import org.springframework.security.web.access.AccessDeniedHandler; | ||
| import org.springframework.stereotype.Component; | ||
|
|
||
| @Component | ||
| public class CustomAccessDeniedHandler implements AccessDeniedHandler { | ||
|
|
||
| @Override | ||
| public void handle(HttpServletRequest request, HttpServletResponse response, | ||
| AccessDeniedException accessDeniedException) throws IOException, ServletException { | ||
| response.setStatus(HttpServletResponse.SC_FORBIDDEN); | ||
| } | ||
| } | ||
25 changes: 25 additions & 0 deletions
25
...java/com/codezerotoone/mvp/domain/member/auth/service/CustomAuthenticationEntryPoint.java
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| package com.codezerotoone.mvp.domain.member.auth.service; | ||
|
|
||
| import jakarta.servlet.ServletException; | ||
| import jakarta.servlet.http.HttpServletRequest; | ||
| import jakarta.servlet.http.HttpServletResponse; | ||
| import java.io.IOException; | ||
| import org.springframework.security.core.AuthenticationException; | ||
| import org.springframework.security.web.AuthenticationEntryPoint; | ||
| import org.springframework.stereotype.Component; | ||
|
|
||
| @Component | ||
| public class CustomAuthenticationEntryPoint implements AuthenticationEntryPoint { | ||
|
|
||
|
|
||
| @Override | ||
| public void commence(HttpServletRequest request, HttpServletResponse response, | ||
| AuthenticationException authException) throws IOException, ServletException { | ||
| if (request.getRequestURI().equals("/login")) { | ||
| response.sendRedirect("/login"); | ||
| return; | ||
| } | ||
|
|
||
| response.setStatus(HttpServletResponse.SC_UNAUTHORIZED); | ||
|
Collaborator
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. 공통 에러 응답을 여기서 반환하면 401 에러가 왜 발생했는지 클라이언트에서 구체적으로 알 수 있을 거라고 생각합니다. 그에 따라 클라이언트에서도 상황에 맞게 대처할 수 있을 거고요 |
||
| } | ||
| } | ||
52 changes: 52 additions & 0 deletions
52
src/main/java/com/codezerotoone/mvp/domain/member/auth/service/CustomOAuth2UserService.java
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| package com.codezerotoone.mvp.domain.member.auth.service; | ||
|
|
||
| import com.codezerotoone.mvp.domain.member.auth.dto.CustomOAuth2User; | ||
| import com.codezerotoone.mvp.domain.member.auth.entity.Role; | ||
| import com.codezerotoone.mvp.domain.member.member.dto.MemberDto; | ||
| import com.codezerotoone.mvp.domain.member.member.entity.Member; | ||
| import com.codezerotoone.mvp.domain.member.member.repository.MemberRepository; | ||
| import com.codezerotoone.mvp.global.security.token.exception.UnsupportedCodeException; | ||
| import com.codezerotoone.mvp.global.security.token.support.OAuth2Response; | ||
| import com.codezerotoone.mvp.global.security.token.vendor.AuthSocial; | ||
| import jakarta.transaction.Transactional; | ||
| import lombok.RequiredArgsConstructor; | ||
| import lombok.extern.slf4j.Slf4j; | ||
| import org.springframework.security.oauth2.client.userinfo.DefaultOAuth2UserService; | ||
| import org.springframework.security.oauth2.client.userinfo.OAuth2UserRequest; | ||
| import org.springframework.security.oauth2.core.OAuth2AuthenticationException; | ||
| import org.springframework.security.oauth2.core.user.OAuth2User; | ||
| import org.springframework.stereotype.Service; | ||
|
|
||
| @Service | ||
| @Slf4j | ||
| @RequiredArgsConstructor | ||
| public class CustomOAuth2UserService extends DefaultOAuth2UserService { | ||
| private final MemberRepository memberRepository; | ||
|
|
||
| @Override | ||
| @Transactional | ||
| public OAuth2User loadUser(OAuth2UserRequest userRequest) throws OAuth2AuthenticationException { | ||
| OAuth2User oAuth2User = super.loadUser(userRequest); | ||
| log.info("oAuth2User: " + oAuth2User); | ||
|
|
||
| String registrationId = userRequest.getClientRegistration().getRegistrationId(); | ||
|
|
||
| AuthSocial social = AuthSocial.fromName(registrationId); | ||
| OAuth2Response oAuth2Response = social.createResponse(oAuth2User.getAttributes()); | ||
| String oidcId = oAuth2Response.getProviderId(); | ||
|
|
||
| Member existData = memberRepository.findByOdicId(oidcId).orElse(null); | ||
|
|
||
| if (existData != null) { | ||
| MemberDto userDto = MemberDto.fromEntity(existData); | ||
|
|
||
| return new CustomOAuth2User(userDto); | ||
| } else { | ||
| Member member = Member.createGeneralMemberBySocialLogin("프로필이름", oidcId); | ||
| memberRepository.save(member); | ||
|
|
||
| MemberDto memberDto = MemberDto.fromEntity(member); | ||
| return new CustomOAuth2User(memberDto); | ||
| } | ||
| } | ||
| } |
Oops, something went wrong.
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.
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.
공통 에러 응답을 여기서 반환하면 403 에러가 왜 발생했는지 클라이언트에서 구체적으로 알 수 있을 거라고 생각합니다