-
Notifications
You must be signed in to change notification settings - Fork 2
[Refactor] 유효하지 않은 리프레쉬 토큰 예외 처리 #147
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
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
79c5d71
refactor(exception): 유효하지 않은 리프레쉬 토큰 예외 처리
sese2204 0a48473
[fix] 글로벌 예외 응답을 유효하게 만들어보자
hyobin-yang 73133b4
[refactor] 토큰 재발급 시 기존 리프레시 토큰 삭제
win9-tech 7f8ade2
[refactor] 토큰 재발급 시 엑세스토큰 헤더 반환 로직 제거
win9-tech 302956f
[refactor] 쿠키 maxAge 연장
win9-tech bb771a5
[refactor] jwtUtil 토큰 검증 메서드(예외처리 x) 추가
win9-tech bf806bf
[chore] SecurityConfig 로그아웃 엔드포인트 공개 처리
win9-tech 6a13778
[chore] 쿠키 유효기간 변경
win9-tech a7b4bb5
[fix] GlobalExceptionHandler null 수정
win9-tech 82f9544
[refactor] CustomAuthenticationEntryPoint 응답값 세부화
win9-tech 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
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
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
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
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
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
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
6 changes: 3 additions & 3 deletions
6
src/main/java/com/pickyfy/pickyfy/exception/DuplicateResourceException.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,9 +1,9 @@ | ||
| package com.pickyfy.pickyfy.exception; | ||
|
|
||
| import com.pickyfy.pickyfy.web.apiResponse.common.BaseErrorCode; | ||
| import com.pickyfy.pickyfy.web.apiResponse.error.ErrorStatus; | ||
|
|
||
| public class DuplicateResourceException extends GeneralException { | ||
| public DuplicateResourceException(BaseErrorCode baseErrorCode) { | ||
| super(baseErrorCode); | ||
| public DuplicateResourceException(ErrorStatus errorStatus) { | ||
| super(errorStatus); | ||
| } | ||
| } | ||
6 changes: 3 additions & 3 deletions
6
src/main/java/com/pickyfy/pickyfy/exception/ExceptionHandler.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,9 +1,9 @@ | ||
| package com.pickyfy.pickyfy.exception; | ||
|
|
||
| import com.pickyfy.pickyfy.web.apiResponse.common.BaseErrorCode; | ||
| import com.pickyfy.pickyfy.web.apiResponse.error.ErrorStatus; | ||
|
|
||
| public class ExceptionHandler extends GeneralException { | ||
| public ExceptionHandler(BaseErrorCode errorCode){ | ||
| super(errorCode); | ||
| public ExceptionHandler(ErrorStatus errorStatus){ | ||
| super(errorStatus); | ||
| } | ||
| } |
10 changes: 2 additions & 8 deletions
10
src/main/java/com/pickyfy/pickyfy/exception/GeneralException.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,17 +1,11 @@ | ||
| package com.pickyfy.pickyfy.exception; | ||
|
|
||
| import com.pickyfy.pickyfy.web.apiResponse.common.BaseErrorCode; | ||
| import com.pickyfy.pickyfy.web.apiResponse.error.ErrorResponse; | ||
| import com.pickyfy.pickyfy.web.apiResponse.error.ErrorStatus; | ||
| import lombok.AllArgsConstructor; | ||
| import lombok.Getter; | ||
|
|
||
| @Getter | ||
| @AllArgsConstructor | ||
| public class GeneralException extends RuntimeException { | ||
|
|
||
| private BaseErrorCode code; | ||
|
|
||
| public ErrorResponse getErrorReason(){ | ||
| return this.code.getReason(); | ||
| } | ||
| private final ErrorStatus errorStatus; | ||
| } |
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
9 changes: 9 additions & 0 deletions
9
src/main/java/com/pickyfy/pickyfy/exception/InvalidRefreshTokenException.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,9 @@ | ||
| package com.pickyfy.pickyfy.exception; | ||
|
|
||
| import com.pickyfy.pickyfy.web.apiResponse.error.ErrorStatus; | ||
|
|
||
| public class InvalidRefreshTokenException extends GeneralException { | ||
| public InvalidRefreshTokenException(ErrorStatus errorStatus) { | ||
| super(errorStatus); | ||
| } | ||
| } |
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.
BaseErrorCode 추상화 로직 다 ErrorStatus로 바꿨던데 이유가 뭔가요?
지금 구현이면 BaseErrorCode 삭제해도 될 것 같습니다.