From 5af5aee662e0f25409f0fbd7110040eba05966e2 Mon Sep 17 00:00:00 2001 From: Kwon Min A Date: Sat, 25 Nov 2023 21:22:32 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=EC=95=A1=EC=84=B8=EC=8A=A4=20=ED=86=A0?= =?UTF-8?q?=ED=81=B0=EC=9D=B4=20null=EC=9D=B8=20=EA=B2=BD=EC=9A=B0=20?= =?UTF-8?q?=EC=B2=98=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/efub/dhs/domain/member/controller/AuthController.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/com/efub/dhs/domain/member/controller/AuthController.java b/src/main/java/com/efub/dhs/domain/member/controller/AuthController.java index 33e9e7b..aef2838 100644 --- a/src/main/java/com/efub/dhs/domain/member/controller/AuthController.java +++ b/src/main/java/com/efub/dhs/domain/member/controller/AuthController.java @@ -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()); }