Conversation
|
깔끔히 잘 구현하신 것 같아요! 수고하셨습니다!! |
DOHOON0127
approved these changes
Jun 1, 2026
DOHOON0127
left a comment
There was a problem hiding this comment.
고민 많이 하시면서 깔끔하게 코드 잘 짜주신 것 같습니다! 고생하셧습니다~
Comment on lines
+71
to
+81
| // 토큰은 있는데 유효하지 않음 → 예외를 토스 (8주차 통일 응답 흐름 재사용) | ||
| throw new BadCredentialsException("유효하지 않은 토큰입니다."); | ||
| } | ||
| filterChain.doFilter(request, response); | ||
| } catch (Exception e) { | ||
| // BadCredentialsException 등은 AuthenticationException의 하위라 | ||
| // GeneralExceptionAdvice의 handleAuthenticationException(401)이 잡는다. | ||
| SecurityContextHolder.clearContext(); | ||
| resolver.resolveException(request, response, null, | ||
| new BadCredentialsException("토큰 인증에 실패했습니다.", e)); | ||
| } |
There was a problem hiding this comment.
401 응답 경로 한 곳으로 통일하고, "토큰 없음"과 "유효하지 않은 토큰"을 구분해서 처리하신 거 너무 좋은 것 같습니다!!!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
✏️ 작업 내용
#️⃣ 연관된 이슈
closes #134
💡 함께 공유하고 싶은 부분
🤔 질문
✅ 워크북 체크리스트
✅ 컨벤션 체크리스트
📌 주안점