-
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
[YS-131] refact: WebSecurityConfig 우선순위 수정 및 memberId 삽입 위치 변경 #25
Conversation
…cess control for auth
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.
WebSecurityConfig
에서 먼저 인증 생략해야 하는 URI를 적용하고 나머지 URI에 대해 인증을 수행하도록 우선순위를 수정했습니다. 테스트 했을 때, 정상적으로 동작했습니다.
object ExperimentPostMapper { | ||
fun toCreatePostUseCaseInput(request: CreateExperimentPostRequest): CreateExperimentPostUseCase.Input { | ||
return CreateExperimentPostUseCase.Input( | ||
memberId = getCurrentMemberId(), |
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.
클린아키텍처에 위배되지 않도록 memberId
를 주입시키기 위해, 서버 회의에서 ArgumentResolver
를 도입하기로 했습니다.
하지만 생각해보니 presentation 계층에서 Input에 memberId
를 주입시키면 클린아키텍처 원칙을 위배하지 않고 ArgumentResolver
를 이용해 주입시키는 방식보다는 오히려 더 효율적일 거라 생각해 위와 같이 처리했습니다.
혹시 이렇게 처리하는거에 대해 어떻게 생각하시나요?
import java.time.LocalDate | ||
|
||
class CreatePostUseCase( | ||
class CreateExperimentPostUseCase( |
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.
확장성을 고려하여, Post보다는 더 구체적인 이름을 사용하는 것이 좋다고 판단했습니다. 그래서 모든 파일명을 ExperimentPost로 변경하였는데, 이 방식이 괜찮을지 의견 부탁드립니다.
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.
네 저도 아까 네이밍 통일을 하면 좋을지 의견 여쭙고 싶었던 거라, 통일하면 좋을 것 같습니다!
Quality Gate failedFailed conditions |
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.
LGTM!
저번 PR에서 사소하게 위배된 클린 아키텍처 원칙을 잘 반영해주신 것 같아요!!😊😊
수고 많으셨습니다 💪
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.
이메일 인증 로직까지 헤더에 토큰 필요하지 않은 부분 작업 깔끔하게 잘해주신 것 같아요 💪💪
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에서 제가 놓친 부분이었네요!
* refact: refactor security filter chains to ensure proper order and access control for auth * refact: delete path condition in JwtAuthenticationFilter * refact: remove AuthenticationUtils and use getCurrentMemberId directly * refact: inject memberId in mapper instead of use case * refact: rename file name related to ExperimentPost * refact: organize packages by domain * refact: rename request file
💡 작업 내용
✅ 셀프 체크리스트
🙋🏻 확인해주세요
🔗 Jira 티켓
https://yappsocks.atlassian.net/browse/YS-131