Skip to content
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

[BE] 토큰 확인하는 API를 구현한다. #767

Merged
merged 7 commits into from
Oct 10, 2024

Conversation

JINU-CHANG
Copy link
Contributor

❗ Issue

✨ 구현한 기능

  • 리프레시 토큰의 존재 여부를 반환하는 /refreshToken/check API 구현
  • 테스트 코드 추가
  • 이전 PR에서 테스트 깨지는 부분 수정

📢 논의하고 싶은 내용

🎸 기타

Copy link
Contributor

@shin-jisong shin-jisong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

수고하셨습니다! 간단한 사항만 남겼는데 머지 될까 봐 RC로 남겨요 :ㅋㅋ:


public record RefreshTokenCheckResponse(boolean isRefreshTokenExist) {

public static RefreshTokenCheckResponse from (boolean isRefreshTokenExist) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

여기 from 뒤에 공백이 잘못 들어간 것 같아요!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

반영했습니다!

import java.util.List;

public interface ChecklistStationRepository extends JpaRepository<ChecklistStation, Long> {

@Query("SELECT cs FROM ChecklistStation cs " +
"where cs.checklist = :checklist " +
"and cs.deleted = false")
List<ChecklistStation> findByChecklist(Checklist checklist);
List<ChecklistStation> findByChecklist(@Param("checklist") Checklist checklist);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

저희 id로 빼기로 했던 것 같아요!
일괄적으로 수정하는 일정이 있으면 따로 수정하지는 않아도 될 것 같지만 수정한 파트이길래 리뷰 남깁니다 👀

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

테스트가 깨져서 추가한 부분이여서 제가 바꾸는 것보다 나중에 함께 수정하면 좋을 것 같아요~

@@ -71,4 +73,13 @@ public ResponseEntity<Void> reIssueAccessToken(HttpServletRequest httpServletReq
.header(HttpHeaders.SET_COOKIE, accessTokenCookie.toString())
.build();
}

@GetMapping("/refreshToken/check")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

뒤늦게 발견했는데 API URL에서는 kebab-case 사용해야 될 것 같아요!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🍗

Copy link
Contributor

@tkdgur0906 tkdgur0906 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고생하셨습니다~

@@ -177,7 +177,7 @@ void reIssueAccessToken() {
AuthTokenResponse tokenResponse = authService.login(OAUTH_LOGIN_REQUEST);

// when & then
assertThatCode(() -> authService.reIssueAccessToken(tokenResponse.refreshToken()))
assertThatCode(() -> authService.reissueAccessToken(tokenResponse.refreshToken()))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이 pr에서 AuthServiceTest에 문장형으로 작성된 DisplayName 수정해도 편할 것 같아요~

Copy link
Contributor

@tsulocalize tsulocalize left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고진감래 하셨습니다!

Copy link
Contributor

@shin-jisong shin-jisong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

머지하겠습니다~

@shin-jisong shin-jisong merged commit 398a3e8 into dev-be Oct 10, 2024
2 checks passed
@shin-jisong shin-jisong deleted the feat/766-token-check branch October 10, 2024 01:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants