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 구현 #26

Merged
merged 1 commit into from
Feb 5, 2025

Conversation

songhee1
Copy link
Collaborator

@songhee1 songhee1 commented Feb 5, 2025

#️⃣ 연관된 이슈

📝 구현 기능 명세

  • 로그인 jwtProvider를 추가하여 토큰 생성, 검증을 위한 메서드 추가
  • JwtAuthenticationFilter를 추가하여 토큰 정보를 추출하고 토큰 유효성을 검사하도록 추가
  • CustomUserDetailsService를 추가하여 존재하는 이메일 계정인지를 찾고 이후 존재한다면 UserDetails 객체로 반환하도록 추가
  • User 엔티티를 Member 엔티티로 클래스명 변경
  • controller에 login rest api 추가
  • 로그인을 위한 dto정보(이메일, 비밀번호) 추가
  • 데이터베이스 스키마에 member_roles 테이블을 추가하여 role정보를 등록
  • SecurityConfig에서 filterChain 정보에 허용할 uri, csrf, httpBasic 관련 설정정보 등록
  • Member 엔티티에 UserDetails를 구현하도록 하여 로그인 jwt에서 활용할 수 있도록 override 추가

📷 스크린샷 (선택)

💬 어려웠던 점

- 로그인 jwtProvider를 추가하여 토큰 생성, 검증을 위한 메서드 추가
- JwtAuthenticationFilter를 추가하여 토큰 정보를 추출하고 토큰 유효성을 검사하도록 추가
- CustomUserDetailsService를 추가하여 존재하는 이메일 계정인지를 찾고 이후 존재한다면 UserDetails 객체로 반환하도록 추가
- User 엔티티를 Member 엔티티로 클래스명 변경
- controller에 login rest api 추가
- 로그인을 위한 dto정보(이메일, 비밀번호) 추가
- 데이터베이스 스키마에 member_roles 테이블을 추가하여 role정보를 등록
- SecurityConfig에서 filterChain 정보에 허용할 uri, csrf, httpBasic 관련 설정정보 등록
- Member 엔티티에 UserDetails를 구현하도록 하여 로그인 jwt에서 활용할 수 있도록 override 추가
@songhee1 songhee1 requested a review from f-lab-paul February 5, 2025 09:18
@songhee1 songhee1 self-assigned this Feb 5, 2025
@songhee1 songhee1 changed the title [Feat] 로그인 api 구현 (#7) [#7] 로그인 api 구현 Feb 5, 2025
@songhee1 songhee1 merged commit 8f0437e into f-lab-edu:feature/1-user-api Feb 5, 2025
1 check passed
@songhee1 songhee1 linked an issue Feb 5, 2025 that may be closed by this pull request
6 tasks
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.

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