Skip to content

Commit

Permalink
[refac] fix unappropriate error message while validating refreshtoken
Browse files Browse the repository at this point in the history
  • Loading branch information
Parkjyun committed Jul 9, 2024
1 parent ad44cfe commit 245b128
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,6 @@ private String getToken(final String refreshToken) {
if (refreshToken.startsWith(BEARER)) {
return refreshToken.substring(BEARER.length());
}
throw new UnauthorizedException(AuthErrorCode.INVALID_ACCESS_TOKEN);
throw new UnauthorizedException(AuthErrorCode.MISSING_BEARER_PREFIX);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ public enum AuthErrorCode implements ErrorCode {
INVALID_APPLE_IDENTITY_TOKEN(HttpStatus.UNAUTHORIZED, "유효하지 않은 아이덴티티 토큰입니다."),
EXPIRED_IDENTITY_TOKEN(HttpStatus.UNAUTHORIZED, "아이덴티티 토큰이 만료되었습니다."),
INVALID_IDENTITY_TOKEN_VALUE(HttpStatus.UNAUTHORIZED, "애플 아이덴티티 토큰의 값이 올바르지 않습니다."),
MISSING_BEARER_PREFIX(HttpStatus.UNAUTHORIZED, "Bearer가 누락되었습니다."),

/**
* 500 Internal Server Error
Expand Down

0 comments on commit 245b128

Please sign in to comment.