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

[TLVB-236] 로그인 api 시큐리티 적용 #77

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

Heejeong01110
Copy link
Collaborator

👩‍💻 요구 사항과 구현 내용

  • 로그인 api 시큐리티 적용

✅ 피드백 반영사항

🤔 PR 포인트 & 궁금한 점

관련 이슈

TLVB-236

@github-actions
Copy link

Unit Test Results

  6 files  ±0    6 suites  ±0   1s ⏱️ ±0s
41 tests  - 3  41 ✔️  - 3  0 💤 ±0  0 ±0 

Results for commit e098be0. ± Comparison against base commit 559e4ae.

This pull request removes 3 tests.
kdt.prgrms.kazedon.everevent.service.UserServiceTest ‑ loginNotEqualsPasswordTest()
kdt.prgrms.kazedon.everevent.service.UserServiceTest ‑ loginNotExistEmailTest()
kdt.prgrms.kazedon.everevent.service.UserServiceTest ‑ loginSuccessTest()

this.userConverter = userConverter;
}

@SneakyThrows

Choose a reason for hiding this comment

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

아래에 예외를 던지는데 이거 사용한 이유가 무엇인가요?

userDetails.getAuthorities().stream().map(GrantedAuthority::getAuthority).toList()
);

response.setHeader("X-AUTH-TOKEN", token);

Choose a reason for hiding this comment

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

X-AUTH-TOKEN 이 값을 상수로 할 수 있도록 하면 어떨까요?

Copy link
Member

Choose a reason for hiding this comment

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

JwtProperty 클래스에 변수(HEADER_STRING)로 추가 해도 좋을 것 같슴다ㅏㅏ!!

@@ -303,67 +295,6 @@ void updateUserUsingDuplicatedNicknameTest() {
verify(userRepository).existsByNickname(updateRequest.getNickname());
}

@Test
void loginSuccessTest() {

Choose a reason for hiding this comment

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

시큐리티로 변경했으니 그거에 맞춰서 테스트 코드를 작성해보세요 :)

Copy link
Member

@dia312 dia312 left a comment

Choose a reason for hiding this comment

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

수고하셨습니다 리엔~!! 👍

Comment on lines +65 to +67
"/api-docs",
"/webjars/**",
"/h2-console/**");
Copy link
Member

Choose a reason for hiding this comment

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

👍👍👍

userDetails.getAuthorities().stream().map(GrantedAuthority::getAuthority).toList()
);

response.setHeader("X-AUTH-TOKEN", token);
Copy link
Member

Choose a reason for hiding this comment

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

JwtProperty 클래스에 변수(HEADER_STRING)로 추가 해도 좋을 것 같슴다ㅏㅏ!!

Copy link
Collaborator

@nasaoreo nasaoreo left a comment

Choose a reason for hiding this comment

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

수고하셨습니다 👍 💯

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