diff --git a/src/main/java/kaboo/kaboo_auth/domain/jwt/filter/JwtFilter.java b/src/main/java/kaboo/kaboo_auth/domain/jwt/filter/JwtFilter.java index c62d302..3c1eaa0 100644 --- a/src/main/java/kaboo/kaboo_auth/domain/jwt/filter/JwtFilter.java +++ b/src/main/java/kaboo/kaboo_auth/domain/jwt/filter/JwtFilter.java @@ -49,9 +49,9 @@ protected void doFilterInternal(HttpServletRequest request, HttpServletResponse String username = null, cookieAccessToken = null, cookieRefreshToken = null; for (Cookie cookie : cookies) { switch (cookie.getName()) { - case "Username" -> username = cookie.getValue(); - case "Authorization" -> cookieAccessToken = cookie.getValue(); - case "RefreshToken" -> cookieRefreshToken = cookie.getValue(); + case "username" -> username = cookie.getValue(); + case "accessToken" -> cookieAccessToken = cookie.getValue(); + case "refreshToken" -> cookieRefreshToken = cookie.getValue(); } } @@ -100,7 +100,7 @@ protected void doFilterInternal(HttpServletRequest request, HttpServletResponse jwtTokenProvider.createAccessToken(username)); jwtAccessTokenRepository.save(newAccessToken); - response.addCookie(createCookie("Authorization", newAccessToken.getAccessToken())); + response.addCookie(createCookie("accessToken", newAccessToken.getAccessToken())); } } }