-
Notifications
You must be signed in to change notification settings - Fork 36
[김선호] 2단계 - 리다이렉트 필터 & OAuth2 인증 필터 리뷰 요청드립니다 🚀 #21
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
Merged
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
34b36b8
사전 리팩토링 - OAuth2ClientProperties 패키지 위치 변경
haero77 93ce857
사전 리팩토링 - 미사용 클래스 제거
haero77 d3ef98d
사전 리팩토링 - OAuth2 관련 클래스를 성격에 따라 패키지 구분
haero77 592788e
(step2-2) docs: update step2 requirements, questions, OAuth2 Flow chart
haero77 c5e9bfa
(step2-1) registrationId별 ClientRegistration을 담는 일급컬렉션 ClientRegistra…
haero77 139e450
(step2-1) OAuth2AuthorizationRequestResolver 구현
haero77 a751086
(step2-1) OAuth2ClientPropertiesMapper 구현
haero77 242ed1c
(step2-1) AuthorizationRequestRepository 구현
haero77 0d8aadc
(step2-2) 싱글톤 패턴 구현 시 인스턴스 필드가 null이 되는 문제 수정
haero77 9758bcb
(step2-2) OAuth2LoginAuthenticationFilter 인증 처리 로직 개선
haero77 4d827a9
(step2-2) 미사용 메서드 제거
haero77 7424d70
(step2-2) OAuth2LoginAuthenticationFilter 인증 로직 개선
haero77 e8b6513
(step2-2) OAuth2AuthorizationCodeAuthenticationProvider 구현
haero77 61a3bf9
(step2-2) 불필요한 상수 제거
haero77 4caeb8c
(step2-2) OAuth2 플랫폼별 유저 정보 조회 로직 통합
haero77 143f617
(step2-2) 프로덕션 변경에 따른 테스트 수정
haero77 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,27 @@ | ||
## 미션 3-1 질문 | ||
## 미션 3-1 질문 | ||
|
||
### 시스템에 저장하는 username은 어떻게 정할지? | ||
|
||
### OAuth2를 이용한 로그인 시, 임의로 생성된 username으로 로그인이 가능하게 할 것인가? | ||
### OAuth2를 이용한 로그인 시, 임의로 생성된 username으로 로그인이 가능하게 할 것인가? | ||
|
||
### authentication 패키지와 provider 패키지 양방향 참조. | ||
|
||
## 미션 3-2 질문 | ||
--- | ||
|
||
## 미션 3-2 진행하며 생긴 궁금증 | ||
|
||
> PR 코멘트로 따로 질문드릴 예정입니다..! | ||
|
||
### Spring Security에서 어떤 필드는 주입 받고, 어떤 필드는 자체적으로 생성하는 이유? | ||
|
||
- OAuth2AuthorizationRequestRedirectFilter 에서, | ||
- OAuth2AuthorizationRequestResolver는 주입받지 않고, clientRegistrationRepository만 주입받는 이유? | ||
- OAuth2AuthorizationRequestResolver는 OAuth2AuthorizationRequestRedirectFilter만 쓰이고, clientRegistrationRepository는 다른 곳에서도 쓰이기 때문일 것으로 추측. | ||
|
||
### AuthorizationRequestRepository는 왜 필요한가? | ||
|
||
- state값 검증과 HttpSession에 OAuth2AuthorizationRequest를 저장하는 역할을 한다. | ||
|
||
### OAuth2LoginAuthenticationFilter | ||
|
||
// ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
현재는 clientRegistrationRepository를 주입받고 있군요!
실제 OAuth2AuthorizationRequestRedirectFilter의 경우에도 직접 주입 받는데 잘 구현하셨네요 👍