Skip to content

Commit

Permalink
๐Ÿ› ๏ธ Fix: Cookie Key ์ด๋ฆ„ ์ผ์น˜ํ™” (#13)
Browse files Browse the repository at this point in the history
* Feat: ์นด์นด์˜ค ๋กœ๊ทธ์ธ ์™„๋ฃŒ ํ›„ kaboo.site/join ์œผ๋กœ redirect

* Feat: Cookie key ์ด๋ฆ„ ์ผ์น˜ํ™”
  • Loading branch information
Taejin1221 authored Sep 10, 2024
1 parent 587d7da commit dafc565
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}

Expand Down Expand Up @@ -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()));
}
}
}
Expand Down

0 comments on commit dafc565

Please sign in to comment.