최건위 sprint10 - #226
Open
geoni-98 wants to merge 2 commits into
Hidden character warning
The head ref may contain hidden characters: "\ucd5c\uac74\uc704-sprint10"
Open
최건위 sprint10#226geoni-98 wants to merge 2 commits into
geoni-98 wants to merge 2 commits into
Conversation
Collaborator
|
@geoni-98 건위님 pr conflicts 해결해주세요 ~ |
yerin-mentor
reviewed
Jun 3, 2026
yerin-mentor
left a comment
Collaborator
There was a problem hiding this comment.
안녕하세요 건위님, 과제 잘 진행해 주셨네요 👍
아래 리뷰 드린것들만 확인 해보시면 좋을것 같아요.
과제하시느라 수고하셨습니다 :)
|
|
||
| response.setStatus(HttpServletResponse.SC_UNAUTHORIZED); | ||
| ErrorResponse errorResponse = new ErrorResponse( | ||
| new RuntimeException("Authentication failed: Invalid user details"), |
Collaborator
There was a problem hiding this comment.
RuntimeException 보단 customException을 사용하는걸 권장드립니다.
Comment on lines
+112
to
+117
| private Cookie createRefreshTokenCookie(String refreshToken) { | ||
| Cookie cookie = new Cookie(JwtTokenProvider.REFRESH_TOKEN_COOKIE_NAME, refreshToken); | ||
| cookie.setHttpOnly(true); | ||
| cookie.setPath("/"); | ||
| cookie.setMaxAge(REFRESH_TOKEN_COOKIE_MAX_AGE); | ||
| return cookie; |
Collaborator
There was a problem hiding this comment.
CSFP 방어 정책에 따라 SameSite 설정도 고려해보면 좋을것 같습니다.
| .flatMap(Queue::stream) | ||
| .anyMatch(jwtInformation -> isActive(jwtInformation) | ||
| && jwtInformation.accessToken().equals(accessToken)); | ||
| } |
Collaborator
There was a problem hiding this comment.
모든 사용자의 모든 토큰을 순회하는것 같습니다.
유저 수가 많아질 경우 조회 비용이 커질 수 있겠네요 🤔
Comment on lines
+94
to
102
| @PutMapping("role") | ||
| public ResponseEntity<UserDto> updateRole(@RequestBody RoleUpdateRequest request) { | ||
| log.info("권한 수정 요청"); | ||
| UserDto userDto = authService.updateRole(request); | ||
|
|
||
| return ResponseEntity | ||
| .status(HttpStatus.OK) | ||
| .body(userDto); | ||
| } |
Collaborator
There was a problem hiding this comment.
권한 변경시 강제 로그아웃 구현 요구사항이 있지 않았나요? 확인 후 추가 부탁드립니다~
Comment on lines
+31
to
+33
| private static final String TOKEN_TYPE_CLAIM = "tokenType"; | ||
| private static final String ACCESS_TOKEN_TYPE = "ACCESS"; | ||
| private static final String REFRESH_TOKEN_TYPE = "REFRESH"; |
Collaborator
There was a problem hiding this comment.
토큰 타입을 상수로 정의하고 관리 해주셨네요 👍
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.
요구사항
기본
심화
주요 변경사항
스크린샷
멘토에게