-
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.
Merge pull request #46 from Kernel360/44-feat-refresh-token-and-excep…
…tion-refactoring feat: exception 로직 구현, JsessionId 삭제
- Loading branch information
Showing
23 changed files
with
280 additions
and
161 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
9 changes: 0 additions & 9 deletions
9
badminton-api/src/main/java/org/badminton/api/common/exception/DuplicationException.java
This file was deleted.
Oops, something went wrong.
9 changes: 0 additions & 9 deletions
9
...inton-api/src/main/java/org/badminton/api/common/exception/ResourceNotFoundException.java
This file was deleted.
Oops, something went wrong.
16 changes: 16 additions & 0 deletions
16
...-api/src/main/java/org/badminton/api/common/exception/member/MemberNotExistException.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 org.badminton.api.common.exception.member; | ||
|
||
import org.badminton.api.common.error.ErrorCode; | ||
import org.badminton.api.common.exception.BadmintonException; | ||
|
||
public class MemberNotExistException extends BadmintonException { | ||
|
||
public MemberNotExistException(ErrorCode errorCode, Long providerId, Exception e) { | ||
super(errorCode, "providerId", String.valueOf(providerId), e); | ||
} | ||
|
||
public MemberNotExistException(ErrorCode errorCode, String providerId) { | ||
super(errorCode, "providerId", String.valueOf(providerId)); | ||
} | ||
|
||
} |
15 changes: 15 additions & 0 deletions
15
...pi/src/main/java/org/badminton/api/common/exception/oauth/JwtCookieNotFoundException.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,15 @@ | ||
package org.badminton.api.common.exception.oauth; | ||
|
||
import org.badminton.api.common.error.ErrorCode; | ||
import org.badminton.api.common.exception.BadmintonException; | ||
|
||
public class JwtCookieNotFoundException extends BadmintonException { | ||
public JwtCookieNotFoundException(ErrorCode errorCode) { | ||
super(errorCode); | ||
} | ||
|
||
public JwtCookieNotFoundException(ErrorCode errorCode, Exception e) { | ||
super(errorCode, e); | ||
} | ||
} | ||
|
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
19 changes: 19 additions & 0 deletions
19
badminton-api/src/main/java/org/badminton/api/member/model/dto/MemberDeleteResponse.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,19 @@ | ||
package org.badminton.api.member.model.dto; | ||
|
||
import org.badminton.domain.member.entity.MemberEntity; | ||
|
||
import io.swagger.v3.oas.annotations.media.Schema; | ||
|
||
@Schema(description = "회원 삭제 responseDto") | ||
public record MemberDeleteResponse( | ||
@Schema(description = "멤버 id", example = "1") | ||
Long memberId, | ||
@Schema(description = "삭제 여부", example = "true") | ||
boolean isDeleted | ||
) { | ||
|
||
public static MemberDeleteResponse memberEntityToDeleteResponse(MemberEntity memberEntity) { | ||
return new MemberDeleteResponse(memberEntity.getMemberId(), memberEntity.isMemberDeleted()); | ||
} | ||
|
||
} |
29 changes: 29 additions & 0 deletions
29
badminton-api/src/main/java/org/badminton/api/member/model/dto/MemberLogoutResponse.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,29 @@ | ||
package org.badminton.api.member.model.dto; | ||
|
||
import org.badminton.domain.member.entity.MemberEntity; | ||
|
||
import io.swagger.v3.oas.annotations.media.Schema; | ||
|
||
@Schema(description = "회원 로그아웃 responseDto") | ||
public record MemberLogoutResponse( | ||
@Schema(description = "회원 역할", example = "AUTHORIZATION_USER") | ||
String authorization, | ||
|
||
@Schema(description = "회원 이름", example = "이선우") | ||
String name, | ||
|
||
@Schema(description = "oAuth 로그인 이메일", example = "qosle@naver.com") | ||
String email, | ||
|
||
@Schema(description = "oAuth 제공 ID", example = "1070449979547641023123") | ||
String providerId, | ||
|
||
@Schema(description = "oAuth 제공 이미지", example = "1070449979547641023123") | ||
String profileImage | ||
) { | ||
public static MemberLogoutResponse memberEntityToLogoutResponse(MemberEntity memberEntity) { | ||
return new MemberLogoutResponse(memberEntity.getAuthorization(), memberEntity.getName(), | ||
memberEntity.getEmail(), | ||
memberEntity.getProviderId(), memberEntity.getProfileImage()); | ||
} | ||
} |
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
8 changes: 3 additions & 5 deletions
8
badminton-api/src/main/java/org/badminton/api/member/model/dto/MemberUpdateRequest.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 |
---|---|---|
@@ -1,13 +1,11 @@ | ||
package org.badminton.api.member.model.dto; | ||
|
||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import lombok.Getter; | ||
|
||
@Schema(description = "회원 수정 DTO") | ||
@Getter | ||
public class MemberUpdateRequest { | ||
|
||
public record MemberUpdateRequest( | ||
@Schema(description = "프로필 사진", example = "http://img1.kakaocdn.net/thumb/R640x640.q70/?fname=http://t1.kakaocdn.net/account_images/default_profile.jpeg") | ||
String profileImage; | ||
String profileImage | ||
) { | ||
|
||
} |
29 changes: 29 additions & 0 deletions
29
badminton-api/src/main/java/org/badminton/api/member/model/dto/MemberUpdateResponse.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,29 @@ | ||
package org.badminton.api.member.model.dto; | ||
|
||
import org.badminton.domain.member.entity.MemberEntity; | ||
|
||
import io.swagger.v3.oas.annotations.media.Schema; | ||
|
||
@Schema(description = "회원 수정 responseDto") | ||
public record MemberUpdateResponse( | ||
@Schema(description = "회원 역할", example = "AUTHORIZATION_USER") | ||
String authorization, | ||
|
||
@Schema(description = "회원 이름", example = "이선우") | ||
String name, | ||
|
||
@Schema(description = "oAuth 로그인 이메일", example = "qosle@naver.com") | ||
String email, | ||
|
||
@Schema(description = "oAuth 제공 ID", example = "1070449979547641023123") | ||
String providerId, | ||
|
||
@Schema(description = "oAuth 제공 이미지", example = "1070449979547641023123") | ||
String profileImage | ||
) { | ||
public static MemberUpdateResponse memberEntityToUpdateResponse(MemberEntity memberEntity) { | ||
return new MemberUpdateResponse(memberEntity.getAuthorization(), memberEntity.getName(), | ||
memberEntity.getEmail(), | ||
memberEntity.getProviderId(), memberEntity.getProfileImage()); | ||
} | ||
} |
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
3 changes: 2 additions & 1 deletion
3
.../member/model/dto/CustomOAuth2Member.java → ...member/oauth2/dto/CustomOAuth2Member.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
2 changes: 1 addition & 1 deletion
2
.../api/member/model/dto/GoogleResponse.java → ...api/member/oauth2/dto/GoogleResponse.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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package org.badminton.api.member.model.dto; | ||
package org.badminton.api.member.oauth2.dto; | ||
|
||
import java.util.Map; | ||
|
||
|
2 changes: 1 addition & 1 deletion
2
...n/api/member/model/dto/KakaoResponse.java → .../api/member/oauth2/dto/KakaoResponse.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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package org.badminton.api.member.model.dto; | ||
package org.badminton.api.member.oauth2.dto; | ||
|
||
import java.util.Map; | ||
|
||
|
2 changes: 1 addition & 1 deletion
2
...n/api/member/model/dto/NaverResponse.java → .../api/member/oauth2/dto/NaverResponse.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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package org.badminton.api.member.model.dto; | ||
package org.badminton.api.member.oauth2.dto; | ||
|
||
import java.util.Map; | ||
|
||
|
2 changes: 1 addition & 1 deletion
2
...n/api/member/model/dto/OAuthResponse.java → .../api/member/oauth2/dto/OAuthResponse.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
Oops, something went wrong.