Skip to content

Commit

Permalink
feat: 액세스 토큰이 null인 경우 처리
Browse files Browse the repository at this point in the history
  • Loading branch information
mingulmangul committed Nov 25, 2023
1 parent 51fb316 commit 5af5aee
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ public void logout(HttpServletRequest request) {
@PostMapping("/refresh-token")
public AuthResponseDto refreshToken(HttpServletRequest request) {
String accessToken = resolveToken(request);
if (accessToken == null) {
throw new ResponseStatusException(HttpStatus.UNAUTHORIZED, "Empty Access Token.");
}
JwtToken jwtToken = jwtService.refreshToken(accessToken);
return new AuthResponseDto(BEARER, jwtToken.getAccessToken());
}
Expand Down

0 comments on commit 5af5aee

Please sign in to comment.