-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor: 일반 로그인 사용자와 소셜 로그인 사용자의 구분을 위한 리팩토링
- MemberType.java - 로그인 사용자의 타입 구분하여 관리하기 위한 Enumerate 클래스 생성 - 열거형 상수 필드: REGULAR("regular"), SOCIAL("social") - 필드 value - Member.java - memberType 필드 추가 - 생성자 및 buildMember() 메서드 수정 - MemberResponse.ProfileDTO.java - memberType 필드 추가 - MemberRepositoryCustomImpl.java - findMemberDTOByUsername() 메서드 쿼리 수정 - MemberService.java - registerMember(), createAdminAccount() 메서드 내에 memberType 필드 추가로 인한 로직 수정 - CustomOAuth2UserService.java - loadUser() 메서드 내에 소셜 로그인 사용자 생성시 파라미터 추가 - CustomAuthenticationSuccessHandler.java - onAuthenticationSuccess() 매서드 내에 로그인에 성공시 클라이언트로 전달하기 위한 사용자의 정보 추가 - AuthService.java - isAuthenticated() 메서드 내에 클라이언트가 사용자의 로그인 상태를 확인시 전달하는 사용자의 정보 추가
- Loading branch information
1 parent
29e65e7
commit 0db649e
Showing
8 changed files
with
66 additions
and
29 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
16 changes: 16 additions & 0 deletions
16
src/main/java/sumcoda/boardbuddy/enumerate/MemberType.java
This file contains 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,16 @@ | ||
package sumcoda.boardbuddy.enumerate; | ||
|
||
import com.fasterxml.jackson.annotation.JsonValue; | ||
import lombok.Getter; | ||
import lombok.RequiredArgsConstructor; | ||
|
||
@Getter | ||
@RequiredArgsConstructor | ||
public enum MemberType { | ||
|
||
REGULAR("regular"), | ||
SOCIAL("social"); | ||
|
||
@JsonValue | ||
private final String value; | ||
} |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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