-
Notifications
You must be signed in to change notification settings - Fork 8
refactor: auth type 추가, 로그아웃 필터 로직 변경 #167
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
8 commits
Select commit
Hold shift + click to select a range
9737e11
refactor: 사용자가 다양한 인증 유형을 가지도록 수정
nayonsoso d843569
refactor: 함수 이름 변경
nayonsoso 72eabba
test: 테스트 코드 패키지 이동
nayonsoso be5ca5e
refactor: EntryPoint 말고 필터로 필터에서 발생하는 모든 예외 처리
nayonsoso 4676e99
feat: 토큰 만료 검사 함수 추가
nayonsoso d87c5ba
test: 깨지는 테스트 해결
nayonsoso d8eac22
refactor: 로그아웃 로직 수정
nayonsoso 126164b
test: 로그아웃 필터 테스트 수정
nayonsoso 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
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
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
9 changes: 9 additions & 0 deletions
9
src/main/java/com/example/solidconnection/siteuser/domain/AuthType.java
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 |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| package com.example.solidconnection.siteuser.domain; | ||
|
|
||
| public enum AuthType { | ||
|
|
||
| KAKAO, | ||
| APPLE, | ||
| EMAIL, | ||
| ; | ||
| } |
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.
이렇게 CustomException예외와 일반 예외를 한 필터에서 관리하니 훨씬 좋은 거 같습니다! 한 가지 궁금한 점이 있는데 예외 발생시마다SecurityContextHolder.clearContext()를 호출해야하는 이유가 혹시 무엇인지 알 수 있을까요? 저는 보통 토큰 만료나 로그아웃 등의 인증 관련 상황에서만 호출했어서 궁금해서 여쭤봅니다!
Uh oh!
There was an error while loading. Please reload this page.
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.
Authentication 이 불완전한 상태로 저장되는 것을 막기 위해 그렇게 했습니다.
예를 들어 [A 필터에서 정상 저장됨 -> B 필터에서 예외 발생] 의 경우, 이전에 저장된 것을 지워주는게 안전하다 생각해서요 😊