-
Notifications
You must be signed in to change notification settings - Fork 1
[YP-688] feat : 로그아웃 API 개발 #159
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Jira: YP-688
Jira: YP-688
| /** | ||
| * 쿠키에서 Refresh Token 추출 | ||
| */ | ||
| private String extractRefreshTokenFromCookies(HttpServletRequest request) { | ||
| if (request.getCookies() == null) return ""; | ||
|
|
||
| return Arrays.stream(request.getCookies()) | ||
| .filter(cookie -> REFRESH_TOKEN_COOKIE_NAME.equals(cookie.getName())) | ||
| .map(Cookie::getValue) | ||
| .findFirst() | ||
| .orElse(""); | ||
| } | ||
|
|
||
| /** | ||
| * 토큰 유효성 검사 | ||
| */ | ||
| private boolean isTokenInvalid(String token) { | ||
| return !StringUtils.hasText(token); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P3: 관련 메서드들이 컨트롤러가 아닌 관련 서비스(ex. RefreshTokenService 등) 에서 구현되어 기능이 분리되면 좋을 것 같습니다!
| } | ||
|
|
||
| public void logout(String refreshToken) { | ||
| Long memberId; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P4: 로그아웃 로직에서 member id를 따로 빼신 이유가 있을까요?
05AM
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
고생하셨습니다! 리뷰 확인 부탁 드립니다.
Jira: YP-688
💡 유형
💁 해결하려는 문제를 적어주세요
🤔 어떤 방식으로 해결했는지 적어주세요
🙋 중점적으로 리뷰 했으면 하는 부분이 있다면 적어주세요
🧑🏫 이해를 위해 필요한 자료가 있다면 첨부해주세요