-
Notifications
You must be signed in to change notification settings - Fork 0
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
feat: 소셜 로그인 구현 #9
Conversation
- Spring Application의 BootJar 생성 후 빌드 된 파일을 Dockerfile에 명시된 위치로 이동하도록 변경
- 외부 모듈에서 의존성을 사용할 수 없도록 변경
Jwt 생성 로직, 필터 로직, 필터 예외처리
Test Results16 tests 16 ✅ 0s ⏱️ Results for commit cee299c. ♻️ This comment has been updated with latest results. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
고생하셨습니다 정완님!
PR에 설명이 아주 잘 되어 있어서, 많은 궁금증이 해소가 되었네요!
companion
을 사용해서 정적 팩토리 메서드를 만드신 부분이 인상이 깊었습니다!
몇 가지 코멘트를 달아두었으니, 확인 부탁드릴게요!
module-independent/src/main/kotlin/site/yourevents/error/exception/ServiceException.kt
Show resolved
Hide resolved
module-infrastructure/security/src/main/kotlin/site/yourevents/SecurityConfig.kt
Show resolved
Hide resolved
module-infrastructure/security/src/main/kotlin/site/yourevents/SecurityConfig.kt
Show resolved
Hide resolved
...nfrastructure/security/src/main/kotlin/site/yourevents/filter/CustomExceptionHandleFilter.kt
Show resolved
Hide resolved
module-infrastructure/security/src/main/kotlin/site/yourevents/jwt/JwtProvider.kt
Show resolved
Hide resolved
module-infrastructure/security/src/main/kotlin/site/yourevents/service/SocialClient.kt
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
수고하셨습니다!!
현재까지 질문사항들을 먼저 적어두었고 추가적인 질문사항 빠른 시일내로 올리도록 하겠습니다.
module-domain/src/main/kotlin/site/yourevents/auth/service/AuthService.kt
Outdated
Show resolved
Hide resolved
module-domain/src/main/kotlin/site/yourevents/auth/service/TokenService.kt
Outdated
Show resolved
Hide resolved
module-domain/src/main/kotlin/site/yourevents/member/port/in/MemberUseCase.kt
Show resolved
Hide resolved
...-infrastructure/persistence-db/src/main/kotlin/site/yourevents/member/entity/MemberEntity.kt
Outdated
Show resolved
Hide resolved
...-infrastructure/persistence-db/src/main/kotlin/site/yourevents/member/entity/MemberEntity.kt
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
테스트 코드가 업데이트되어 추가적으로 의견 남깁니다!
고생 많으셨습니다!
module-presentation/src/test/kotlin/site/yourevents/auth/api/AuthControllerTest.kt
Show resolved
Hide resolved
module-infrastructure/persistence-db/src/test/resources/application-persistence-db.yml
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
추가적인 리뷰 남겼습니다. 확인 한번 부탁드립니다!!
module-infrastructure/security/src/main/kotlin/site/yourevents/dto/response/KakaoAccessToken.kt
Outdated
Show resolved
Hide resolved
...infrastructure/security/src/main/kotlin/site/yourevents/dto/response/KakaoProfileResponse.kt
Outdated
Show resolved
Hide resolved
module-infrastructure/security/src/main/kotlin/site/yourevents/principal/AuthDetails.kt
Outdated
Show resolved
Hide resolved
module-infrastructure/security/src/main/kotlin/site/yourevents/principal/AuthDetails.kt
Outdated
Show resolved
Hide resolved
module-presentation/src/main/kotlin/site/yourevents/auth/api/AuthController.kt
Outdated
Show resolved
Hide resolved
단일 표현식, nullable 여뷰, 인덱스 접근자 적용
✅ PR 유형
어떤 변경 사항이 있었나요?
✏️ 작업 내용
Caution
상당히 많은 양의 FC가 존재합니다. 죄송하다는 말씀 드립니다..🥺
Note
1월 10일부 모든 모듈에 대한 테스트 코드 작성 완료하였습니다! 🥰
모듈 분리
Domain
Independent
Infrastructure
persistence-db
security
presentation
멤버 생성 로직 구현
Note
JPA 특성상 Kotlin이 추구하는 방향과 조금 결이 다른 부분이 존재합니다.
persistence-db
모듈을 통해 엔티티를 저장합니다.!!
어설션을 통해NotNull
을 정의해두었습니다.토큰 생성 로직 변경
토큰 발급 로직에 DI를 적용하였습니다.
AuthFacade
클래스에서TokenService.kt
에 직접적으로 의존하고 있는 상황이었습니다.SocialUseCase
,SecurityPort
포트 인터페이스를 통해 의존성을 역전하였습니다.JwtProvider
클래스는SecurityPort
의 구현체입니다.소셜 로그인
socialPort
의 구현체인SecurityClient
를 통해 로직을 구현하였습니다.KakaoProfile
VO 클래스가 담당하도록 하였습니다.Security 모듈
try-catch
->runCatching
val foo = Foo.add(bar)
->val foo = Foo.apply { bar }
🔗 관련 이슈
💡 추가 사항
email
이 아닌socialId
로 변경하였습니다.