Skip to content

Conversation

@komascode
Copy link
Collaborator

@komascode komascode commented Jan 18, 2026

📍 PR 타입 (하나 이상 선택)

  • 기능 추가

❗️ 관련 이슈 링크

Close #6

📌 개요

  • 인증 기능 개발을 위한 기반 설정 작업

🔁 변경 사항

의존성 추가

  • JWT (jjwt-api, jjwt-impl, jjwt-jackson)
  • Spring Security
  • Redis

Auth 도메인 생성

  • AuthController: 6개 API 엔드포인트 정의
  • AuthService: 비즈니스 로직 스켈레톤 (TODO로 처리해놓았음)
  • AuthReqDTO: 5개 요청 DTO
  • AuthResDTO: 3개 응답 DTO
  • AuthErrorCode: 7개 에러 코드 정의
  • AuthException: 커스텀 예외
  • AuthConverter: DTO 변환 로직

Member 도메인 수정

  • MemberRepository: findByPhoneNumber, existsByPhoneNumber 추가
  • MemberTokenRepository: Refresh Token 관리용 레포지토리 추가

📸 스크린샷

👀 기타 더 이야기해볼 점

  • 실제 구현 로직은 다음 PR에서 진행 예정

✅ 체크 리스트

  • PR 템플릿에 맞추어 작성했어요.
  • 변경 내용에 대한 테스트를 진행했어요. (구현 전)
  • 프로그램이 정상적으로 동작해요. (구현 전)
  • PR에 적절한 라벨을 선택했어요.
  • 불필요한 코드는 삭제했어요.

@komascode komascode self-assigned this Jan 18, 2026
@komascode komascode added the ✨ feat 새로운 기능! label Jan 18, 2026
Copy link
Collaborator

@rlawngjs0313 rlawngjs0313 left a comment

Choose a reason for hiding this comment

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

고생했어요!! 🔥 일단 지금은 틀만 잡은 것 같은데, 지금 PR 머지하지 않고 모두 완성한 뒤에 PR을 날리는걸로 할까요?? 코멘트 남긴거 읽어보시고 나중에 개발하실때 참고하면 좋을 것 같아요!!


@Operation(summary = "SMS 발송", description = "휴대폰 번호로 인증번호를 발송합니다.")
@PostMapping("/sms/send")
public ResponseEntity<ApiResponse<Void>> sendSms(
Copy link
Collaborator

Choose a reason for hiding this comment

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

ResponseEntity.ok() 만 사용하면 차라리 ApiResponse만 이용하는게 나을 것 같아요!!
public ApiResponse
...
return ApiResponse.onSuccess(AuthSuccessCode.OK, null); 처럼요!


private final AuthService authService;

@Operation(summary = "SMS 발송", description = "휴대폰 번호로 인증번호를 발송합니다.")
Copy link
Collaborator

Choose a reason for hiding this comment

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

나중에 배포를 염두해서 Swagger 상에서 누가 이 API를 만들었는지 파악하기 쉽게 담당자를 한번 적어볼까요??
SMS 발송 By 장명준 처럼요!!

package com.example.scoi.domain.auth.dto;

public class AuthResDTO {

Copy link
Collaborator

Choose a reason for hiding this comment

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

API 명세서에는 SMS 발송에 응답으로 expiredAt, 회원가입에 memberId, koreanName 이 있는거 같은데 여기 DTO에선 안적은 거 같아요!!


// 2. 로그인 실패 5회 체크
if (member.getLoginFailCount() >= 5) {
// TODO: RT 블랙리스트 등록 (Redis)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Refresh Token말고 Access Token을 블랙리스트에 등록해야 해요!! Refresh Token은 DB에 저장되어 있고 재발급할때 DB 업데이트 하니까 Refresh Token은 따로 블랙리스트에 등록할 필요는 없는 것 같아요!!

@rlawngjs0313 rlawngjs0313 changed the base branch from main to develop January 18, 2026 10:21
@rlawngjs0313 rlawngjs0313 changed the title [Feat] 외부 API 서버의 private API를 호출하기 위한 JWT 유틸 생성 [Feat] 인증 도메인 (Auth) 틀 잡기 Jan 18, 2026
@komascode
Copy link
Collaborator Author

고생했어요!! 🔥 일단 지금은 틀만 잡은 것 같은데, 지금 PR 머지하지 않고 모두 완성한 뒤에 PR을 날리는걸로 할까요?? 코멘트 남긴거 읽어보시고 나중에 개발하실때 참고하면 좋을 것 같아요!!

감사합니다!! 수정 하고 완성 후 PR 머지 하겠겠습니다!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

✨ feat 새로운 기능!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

✨ [Feat] 인증 기능 개발을 위한 기반 설정

5 participants