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

[#7] 로그인 api 구현시 발생하는 BadCredentailsException 해결 #27

Merged
merged 1 commit into from
Feb 5, 2025

Conversation

songhee1
Copy link
Collaborator

@songhee1 songhee1 commented Feb 5, 2025

#️⃣ 연관된 이슈

📝 구현 기능 명세

  • 에러 발생 원인 : ProviderManager 클래스.authenticate() -> AbstractUserDetailsAuthenticationProvider클래스.authenticate() -> additionalAuthenticationChecks() -> DaoAuthenticationProvider클래스.additionalAuthenticationChecks() -> 입력된 rawPassword와 DB상 암호화된 password가 일치하지 않아서 발생한 에러
  • CustomUserDetailsService 클래스.createUserDetails()를 통해 DB상에 저장된 email 계정으로 유저정보를 가져올때, password값이 이미 인코딩 되어있으므로 해당 메서드에서 바로 password를 가져오는 것으로 수정

📷 스크린샷 (선택)

2025-02-05 20 04 13
2025-02-05 20 04 13 (2)
2025-02-05 20 04 13 (3)
2025-02-05 20 04 13 (4)

💬 어려웠던 점

- 에러 발생 원인 : ProviderManager 클래스.authenticate() -> AbstractUserDetailsAuthenticationProvider클래스.authenticate() -> additionalAuthenticationChecks() -> DaoAuthenticationProvider클래스.additionalAuthenticationChecks() -> 입력된 rawPassword와 DB상 암호화된 password가 일치하지 않아서 발생한 에러
- CustomUserDetailsService 클래스.createUserDetails()를 통해 DB상에 저장된 email 계정으로 유저정보를 가져올때, password값이 이미 인코딩 되어있으므로 해당 메서드에서 바로 password를 가져오는 것으로 수정
@songhee1 songhee1 added the bug Something isn't working label Feb 5, 2025
@songhee1 songhee1 requested a review from f-lab-paul February 5, 2025 11:06
@songhee1 songhee1 self-assigned this Feb 5, 2025
@songhee1 songhee1 linked an issue Feb 5, 2025 that may be closed by this pull request
6 tasks
@songhee1 songhee1 merged commit 569e023 into f-lab-edu:feature/1-user-api Feb 5, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[feat] 로그인 기능 구현
1 participant