Skip to content

Commit

Permalink
setting: log 테스트 - #145
Browse files Browse the repository at this point in the history
  • Loading branch information
sjk4618 committed Jan 23, 2025
1 parent 39ef15a commit f3338ad
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,15 @@

import lombok.NonNull;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.http.MediaType;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.stereotype.Component;
import org.springframework.web.filter.OncePerRequestFilter;

@Component
@RequiredArgsConstructor
@Slf4j
public class RequiredAuthenticationFilter extends OncePerRequestFilter {
private final JwtProvider jwtProvider; //로그인 필수
private final ObjectMapper objectMapper;
Expand Down Expand Up @@ -78,6 +80,7 @@ protected void doFilterInternal(
response.setCharacterEncoding(Constants.CHARACTER_TYPE);
response.setStatus(errorCode.getHttpStatus().value()); // HTTP 상태 코드 401 설정

log.error("--------------------쿠키 없음------------------------"); //todo: 추후 삭제(테스트용)
// `ApiResponseUtil.failure`를 이용해 응답 작성
final PrintWriter writer = response.getWriter();
writer.write(objectMapper.writeValueAsString(
Expand Down

0 comments on commit f3338ad

Please sign in to comment.