Skip to content

Commit

Permalink
Hotfix: JWT 로직 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
KoungQ committed Aug 20, 2024
1 parent f2b8dc4 commit f602112
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,16 @@ public void checkAccessTokenAndRefreshToken(HttpServletRequest request, HttpServ
.filter(jwtService::isTokenValid)
.orElse(null);

if (accessToken == null) {
checkRefreshTokenAndReIssueAccessToken(response, refreshToken);
} else {
if (accessToken != null) {
jwtService.extractEmail(accessToken)
.ifPresent(email -> userRepository.findByEmail(email)
.ifPresent(this::saveAuthentication));

filterChain.doFilter(request, response);
}

checkRefreshTokenAndReIssueAccessToken(response, refreshToken);

}

public void checkRefreshTokenAndReIssueAccessToken(HttpServletResponse response, String refreshToken) {
Expand Down

0 comments on commit f602112

Please sign in to comment.