Skip to content

Commit

Permalink
Merge pull request #231 from OutDecision/issue/216
Browse files Browse the repository at this point in the history
[BUGFIX]: 동시접속 에러
  • Loading branch information
baeksom authored May 27, 2024
2 parents e9b49c6 + 612271b commit f07ec93
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import org.springframework.security.core.Authentication;
import org.springframework.security.core.authority.SimpleGrantedAuthority;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.security.oauth2.jwt.JwtException;
import org.springframework.stereotype.Component;
import org.springframework.util.StringUtils;
import org.springframework.web.filter.OncePerRequestFilter;
Expand All @@ -26,6 +27,7 @@
import java.util.List;

import static KGUcapstone.OutDecision.global.common.util.CookieUtil.addCookie;
import static KGUcapstone.OutDecision.global.common.util.CookieUtil.deleteCookie;

@RequiredArgsConstructor
@Slf4j
Expand Down Expand Up @@ -79,7 +81,7 @@ public Cookie[] getCookies() {
} else {
log.error("새로운 토큰 발급 실패");
response.sendError(HttpServletResponse.SC_UNAUTHORIZED, "토큰 재발급 실패");
return;
deleteCookie(response, "Authorization");
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ protected void doFilterInternal(HttpServletRequest request, HttpServletResponse
response.setContentType(MediaType.APPLICATION_JSON_VALUE);
response.setCharacterEncoding("UTF-8");
objectMapper.writeValue(response.getWriter(), ApiResponse.onFailure("401",e.getMessage(),null));
deleteCookie(response, "Authorization");
// deleteCookie(response, "Authorization");
}
}
}

0 comments on commit f07ec93

Please sign in to comment.