diff --git a/src/main/java/com/example/api/auth/handler/MyAuthenticationSuccessHandler.java b/src/main/java/com/example/api/auth/handler/MyAuthenticationSuccessHandler.java index 7be7101..1dee839 100644 --- a/src/main/java/com/example/api/auth/handler/MyAuthenticationSuccessHandler.java +++ b/src/main/java/com/example/api/auth/handler/MyAuthenticationSuccessHandler.java @@ -59,8 +59,7 @@ public void onAuthenticationSuccess(HttpServletRequest request, HttpServletRespo .encode(StandardCharsets.UTF_8) .toUriString(); log.info("success redirecting"); -// CookieUtils.addCookie(response, "access_token",token.getAccessToken(), 1000 * 60 * 60); - CookieUtils.addCookie(response, "access_token",token.getAccessToken(), 10000); + CookieUtils.addCookie(response, "access_token",token.getAccessToken(), 1000 * 60 * 60); clearAuthenticationAttributes(request, response); // response.addCookie(CookieUtils.addCookie();); getRedirectStrategy().sendRedirect(request, response, targetUrl); diff --git a/src/main/java/com/example/api/auth/service/JwtUtilService.java b/src/main/java/com/example/api/auth/service/JwtUtilService.java index 264bd28..0e1675a 100644 --- a/src/main/java/com/example/api/auth/service/JwtUtilService.java +++ b/src/main/java/com/example/api/auth/service/JwtUtilService.java @@ -48,8 +48,8 @@ public String genereateRefreshToken(String id, String role, String provider) { } public String generateAccessToken(String id, String role, String provider) { - long tokenPeriod = 1000L * 60L * 60L; // 1시간 유효성 -// long tokenPeriod = 1000L; // 1시간 유효성 +// long tokenPeriod = 1000L * 60L * 60L; // 1시간 유효성 + long tokenPeriod = 1000L; // 1시간 유효성 return getToken(id, role, provider, tokenPeriod); }