Skip to content

Commit

Permalink
#2 Merge: jwt token 만료 시간 임의 조정
Browse files Browse the repository at this point in the history
  • Loading branch information
woogieon8on authored Aug 11, 2024
1 parent 0225ed6 commit 3c9b387
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/main/java/com/drinkeg/drinkeg/jwt/LoginFilter.java
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ protected void successfulAuthentication(HttpServletRequest request, HttpServletR

String role = auth.getAuthority();

String accessToken = jwtUtil.createJwt("access",username, role, 600000L);
String refreshToken = jwtUtil.createJwt("refresh",username,role,86400000L);
String accessToken = jwtUtil.createJwt("access",username, role, 60000000000L); // 임의로 10000배로 해놓았음. 나중에 수정 필요.
String refreshToken = jwtUtil.createJwt("refresh",username,role,864000000L);

System.out.println("---------------LoginFilter------------------");

Expand All @@ -83,7 +83,7 @@ protected void successfulAuthentication(HttpServletRequest request, HttpServletR
response.setStatus(HttpStatus.OK.value());

// refresh 토큰 저장
tokenService.addRefreshToken(username, refreshToken, 86400000L);
tokenService.addRefreshToken(username, refreshToken, 864000000L);


response.sendRedirect("http://localhost:8080/maindy");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public void onAuthenticationSuccess(HttpServletRequest request, HttpServletRespo
response.setStatus(HttpStatus.OK.value());

// refresh 토큰 저장
tokenService.addRefreshToken(username, refreshToken, 86400000L);
tokenService.addRefreshToken(username, refreshToken, 864000000L);


response.sendRedirect("http://localhost:8080/maindy");
Expand Down

0 comments on commit 3c9b387

Please sign in to comment.