Skip to content

[Feat] 티모 9주차 과제 JWT 토큰 방식 회원가입, 로그인 구현 및 마이페이지 개선 - #53

Open
guingguing wants to merge 1 commit into
teemofrom
week9-teemo
Open

[Feat] 티모 9주차 과제 JWT 토큰 방식 회원가입, 로그인 구현 및 마이페이지 개선#53
guingguing wants to merge 1 commit into
teemofrom
week9-teemo

Conversation

@guingguing

@guingguing guingguing commented May 26, 2026

Copy link
Copy Markdown
Contributor

📂 관련 이슈

  • closes #[이슈 번호]

🛠️ 작업 사항

  • JWT 토큰 방식 회원가입 기능 구현
  • 로그인 API 구현 및 AccessToken 발급
  • JwtUtil 구현
  • JwtAuthFilter 구현
  • SecurityConfig에 JWT 필터 등록
  • 토큰 기반 마이페이지 조회 API 개선
  • Swagger 테스트 완료
  • DB 저장 확인 완료

📸 관련 이미지 (스크린샷 또는 동영상)

Swagger

  • 회원가입
스크린샷 2026-05-26 오후 10 40 02 스크린샷 2026-05-26 오후 10 40 16
  • 로그인
스크린샷 2026-05-27 오전 11 08 41 스크린샷 2026-05-27 오전 11 08 52
  • 토큰 등록
스크린샷 2026-05-26 오후 10 40 44 스크린샷 2026-05-26 오후 10 40 50
  • 마이페이지 조회
스크린샷 2026-05-26 오후 10 41 49 스크린샷 2026-05-26 오후 10 41 58

DB
스크린샷 2026-05-26 오후 10 57 22

스크린샷 2026-05-26 오후 10 56 11 스크린샷 2026-05-26 오후 10 56 02

💬 기타 설명

💡 추가적으로 공유할 내용이나 리뷰어에게 전달할 사항이 있다면 작성해 주세요.

@guingguing guingguing changed the title feat:JWT 토큰 방식 회원가입, 로그인 구현 및 마이페이지 개선 [Feat] 티모 9주차 과제 JWT 토큰 방식 회원가입, 로그인 구현 및 마이페이지 개선 May 26, 2026
@guingguing guingguing self-assigned this May 26, 2026
return UserConverter.toMyPageDTO(user);
}

public UserResDTO.MyPage getMyPage(AuthUser member) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

위에 메소드랑 중복 이름인데 같은 역할이면 둘 중 하나 삭제해야할 듯

@gyeonseo gyeonseo left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

티모몽 JWT 기반 9주차 미션도 다 잘 해줬다! 스웨거 테스트부터 데이타그립 까지 쓰는거보니까 정말 다컸군 ㅎㅎ 데모데이도 여러가지 맡아보면서 성장해봤으면 좋겠다~ 냉동실 문 꼭 닫고다니고.. 9주차 미션 수고많았어 10주차도 파이팅구리야~~

Comment on lines +13 to +14
EMAIL_ALREADY_EXISTS(HttpStatus.BAD_REQUEST, "USER400_1", "이미 사용 중인 이메일입니다."),
PASSWORD_NOT_MATCH(HttpStatus.UNAUTHORIZED, "USER401_1", "비밀번호가 일치하지 않습니다.");

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

이렇게 비밀번호 가 틀렸다는 걸 그대로 내려주는건 보안상으로는 좋은 느낌은 아냐..!!
이메일 불일치랑 비밀번호 불일치를 다르게 내려주면, 어떤 이메일들이 가입되어있는지 확인할수가 있겠지?? user enumeration 라는 키워드로 찾아보면 이런 관련된 여러 이슈들이 나오니까 한 번 찾아보면 좋겠다!

return UserConverter.toMyPageDTO(user);
}

public UserResDTO.MyPage getMyPage(AuthUser member) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

요거 이전에 userId 기반으로 잘 해줬는데 왜 AuthUser 받는 메서드 추가했을까 ?? authUser 는 따지자면 인증 계층에서 쓰이는 객체니까, 서비스 계층까지 넘겨주면 책임이 좀 섞이게 보일 수 있을거같아.
컨트롤러에서 authMember 에서 userId 만 추출해서 넘겨줘서 책임 분리가 된 좋은 설계로 수정해 볼 수 있을듯!!

Comment on lines +40 to +43
.httpBasic(AbstractHttpConfigurer::disable)
.formLogin(AbstractHttpConfigurer::disable)
.logout(AbstractHttpConfigurer::disable)
.sessionManagement(session -> session.sessionCreationPolicy(SessionCreationPolicy.STATELESS))

Copy link
Copy Markdown

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants