Skip to content

[refactor/#429] Auth 서비스의 UserRepository 직접 의존 경계 정리#438

Merged
Dimo-2562 merged 8 commits into
developfrom
refactor/#429
Jun 15, 2026
Merged

[refactor/#429] Auth 서비스의 UserRepository 직접 의존 경계 정리#438
Dimo-2562 merged 8 commits into
developfrom
refactor/#429

Conversation

@Dimo-2562

@Dimo-2562 Dimo-2562 commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

❤️ 기능 설명

Auth / Security 코드가 User Account repository와 aggregate에 직접 의존하던 경계를 Auth 전용 useraccount seam으로 정리했습니다.

  • UserAuthAccountService, UserAuthProfile 추가로 Auth/Security가 필요한 최소 인증 스냅샷만 조회하도록 변경
  • AuthCommandService, KakaoLoginCommandService, JwtAuthenticationFilter, CustomOidcUserServiceUserRepository 직접 의존 제거
  • iOS direct Kakao 로그인과 OIDC 로그인 모두 탈퇴 사용자를 동일하게 재활성화하도록 정책 통일
  • UserReactivatedEvent 발행 및 auth cache evict listener 추가로 재활성화 이후 stale principal 위험 완화
  • Redis auth cache 복원 경로를 UserAuthProfile -> UserPrincipal로 통일해 principal 매핑 drift 위험 축소
  • Kakao REST id와 OIDC sub를 같은 service user ID socialId로 정규화하는 KakaoSocialId 추가
  • useraccount 내부 aggregate loader 이름을 UserAggregateReader로 변경해 외부 lookup seam과 구분

Swagger 테스트 성공 결과 스크린샷 첨부

  • API path, JSON field, status code 변경 없는 Auth/UserAccount 경계 리팩터링이라 Swagger 스크린샷은 해당 없습니다.
  • 아래 CLI 검증 결과와 PR CI로 대체합니다.

연결된 issue

close #429



✅ 체크리스트

  • PR 제목 규칙 잘 지켰는가?
  • 추가/수정사항을 설명하였는가?
  • 테스트 결과 사진을 넣었는가? (API 계약 변경 없는 리팩터링이라 CLI 결과로 대체)
  • 이슈넘버를 적었는가?

🧪 테스트 결과

git diff --check
# 통과

./gradlew test \
  --tests 'com.techfork.useraccount.application.auth.UserAuthAccountServiceTest' \
  --tests 'com.techfork.auth.security.listener.UserAuthCacheEventListenerTest' \
  --tests 'com.techfork.useraccount.integration.UserAccountAfterCommitEventIntegrationTest'
# BUILD SUCCESSFUL

./gradlew test \
  --tests 'com.techfork.auth.security.oauth.CustomOidcUserServiceTest' \
  --tests 'com.techfork.auth.security.service.UserAuthCacheServiceTest' \
  --tests 'com.techfork.auth.security.filter.JwtAuthenticationFilterTest'
# BUILD SUCCESSFUL

./gradlew test \
  --tests 'com.techfork.auth.infrastructure.kakao.KakaoSocialIdTest' \
  --tests 'com.techfork.auth.application.command.KakaoLoginCommandServiceTest' \
  --tests 'com.techfork.auth.security.oauth.CustomOidcUserServiceTest'
# BUILD SUCCESSFUL

./gradlew test \
  --tests 'com.techfork.useraccount.application.reader.UserAggregateReaderTest' \
  --tests 'com.techfork.useraccount.application.command.UserCommandServiceTest' \
  --tests 'com.techfork.useraccount.application.command.InterestCommandServiceTest' \
  --tests 'com.techfork.useraccount.application.query.UserQueryServiceTest' \
  --tests 'com.techfork.useraccount.application.query.InterestQueryServiceTest'
# BUILD SUCCESSFUL

@Dimo-2562 Dimo-2562 self-assigned this Jun 15, 2026
@Dimo-2562 Dimo-2562 added the 🌟 REFACTOR 리팩터링 (기능 변화 X) label Jun 15, 2026
@Dimo-2562 Dimo-2562 merged commit 10a3ec3 into develop Jun 15, 2026
1 check passed
@Dimo-2562 Dimo-2562 deleted the refactor/#429 branch June 15, 2026 06:18
@Dimo-2562 Dimo-2562 added the 🔐 domain:auth 인증/보안 관련 (로그인, JWT, OAuth) label Jun 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🔐 domain:auth 인증/보안 관련 (로그인, JWT, OAuth) 🌟 REFACTOR 리팩터링 (기능 변화 X)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[REFACTOR] Auth 서비스의 UserRepository 직접 의존 경계 정리

1 participant