Open
Conversation
yuuuyeonho
reviewed
Dec 18, 2025
Comment on lines
+43
to
+47
| //test.java.com.keunsori.keunsoriserver.auth.api.AuthApiTest.java에서 사용하기 위해 추가하였습니다. | ||
| public String generateTokenForTest(String studentId, String name, MemberStatus status, long validity) { | ||
| return createToken(studentId, name, status, validity); | ||
| } | ||
|
|
Contributor
There was a problem hiding this comment.
이 부분 사용되지 않고 있는 것 같은데 혹시 맞을까요..?
kckc0608
requested changes
Jan 9, 2026
Member
kckc0608
left a comment
There was a problem hiding this comment.
첫 PR 수고 많으셨습니다!! 코멘트 확인 부탁드려요~
Comment on lines
+43
to
+47
| //test.java.com.keunsori.keunsoriserver.auth.api.AuthApiTest.java에서 사용하기 위해 추가하였습니다. | ||
| public String generateTokenForTest(String studentId, String name, MemberStatus status, long validity) { | ||
| return createToken(studentId, name, status, validity); | ||
| } | ||
|
|
Member
There was a problem hiding this comment.
테스트 용도의 코드는 메인 패키지 안에서 작성하지 않습니다!
테스트 용도로 필요한 로직은 테스트 패키지 내부에서 별도로 작성해주세용
Comment on lines
+25
to
+26
| @Value("${jwt.secret}") | ||
| private String secretKey; |
Member
There was a problem hiding this comment.
보통 테스트 할 때 시크릿키는 테스트용 시크릿키를 커스텀으로 만들어서 테스트해요!
Comment on lines
+38
to
39
| @DisplayName("Header에 유효한 토큰 존재") | ||
| void 로그인_되어있는_경우_테스트() throws JsonProcessingException { |
Member
There was a problem hiding this comment.
보통 DisplayName 을 쓸 때는 메서드 명을 한글로 적지 않습니당. (DisplayName 을 두고 메서드 명을 영어로 적기 vs 메서드 명을 지을 때 구체적으로 무엇을 테스트하는지 상세하게 한글로 적기 중 택 1 하는 것이 일반적)
저희는 DisplayName 을 쓰지 않고 한글로 메서드 명을 적은거에용
| .addFilterBefore(jwtAuthenticationFilter, UsernamePasswordAuthenticationFilter.class); | ||
|
|
||
| .addFilterBefore(jwtAuthenticationFilter, UsernamePasswordAuthenticationFilter.class) | ||
| .addFilterBefore(jwtExceptionFilter, JwtAuthenticationFilter.class); |
Member
There was a problem hiding this comment.
- 요 로직들이 새로 추가된 이유를 PR 설명에 같이 적어주시면 더 좋을 것 같아요
- 에러 메세지는 하드코딩하지 않고 상수로 빼서 적어주세요!
| Map<String, Object> body = new HashMap<>(); | ||
| body.put("status", HttpServletResponse.SC_UNAUTHORIZED); | ||
| body.put("error", "Unauthorized"); | ||
| body.put("message", e.getMessage()); |
Member
There was a problem hiding this comment.
SecurityConfig 에서 응답하는 body 형식과 다른 것 같은데, 통일하면 더 좋을 것 같아요~
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.
작업 내용
특이 사항 (리뷰 시 참고할 내용)
관련 이슈
close #160