-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
[Fix] 토큰 만료 예외 분리
- Loading branch information
Showing
6 changed files
with
55 additions
and
30 deletions.
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
src/main/java/com/dnd/jjakkak/domain/jwt/exception/AccessTokenExpiredException.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,17 @@ | ||
package com.dnd.jjakkak.domain.jwt.exception; | ||
|
||
import com.dnd.jjakkak.global.exception.GeneralException; | ||
|
||
public class AccessTokenExpiredException extends GeneralException { | ||
|
||
private static final String MESSAGE = "Access Token이 만료되었습니다."; | ||
|
||
public AccessTokenExpiredException() { | ||
super(MESSAGE); | ||
} | ||
|
||
@Override | ||
public int getStatusCode() { | ||
return 401; | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
src/main/java/com/dnd/jjakkak/domain/jwt/exception/RefreshTokenExpiredException.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,23 @@ | ||
package com.dnd.jjakkak.domain.jwt.exception; | ||
|
||
import com.dnd.jjakkak.global.exception.GeneralException; | ||
|
||
/** | ||
* Refresh Token이 만료되었을 때 발생하는 예외입니다. | ||
* | ||
* @author 정승조 | ||
* @version 2024. 11. 06. | ||
*/ | ||
public class RefreshTokenExpiredException extends GeneralException { | ||
|
||
private static final String MESSAGE = "Refresh Token이 만료되었습니다. 다시 로그인 해주세요."; | ||
|
||
public RefreshTokenExpiredException() { | ||
super(MESSAGE); | ||
} | ||
|
||
@Override | ||
public int getStatusCode() { | ||
return 418; | ||
} | ||
} |
21 changes: 0 additions & 21 deletions
21
src/main/java/com/dnd/jjakkak/domain/jwt/exception/TokenExpiredException.java
This file was deleted.
Oops, something went wrong.
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