-
Notifications
You must be signed in to change notification settings - Fork 8
refactor: 만료된 토큰 허용하는 코드 제거 #308
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
refactor: 만료된 토큰 허용하는 코드 제거 #308
Conversation
- 삭제된 테스트 코드와 연관된 테스트 함수명, 구조 수정
Walkthrough
Suggested reviewers
Tip ⚡️ Faster reviews with caching
Enjoy the performance boost—your workflow just got faster. 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (14)
💤 Files with no reviewable changes (11)
⏰ Context from checks skipped due to timeout of 90000ms (1)
🔇 Additional comments (6)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
- 불필요하게 상속 관계였던 클래스를 하나로 통합한다. - ExpiredTokenAuthentication와 SiteUserAuthentication을 다형성을 이용해 처리하기 위해 상속 관계를 만들었지만, ExpiredTokenAuthentication의 삭제(solid-connection#308 PR)에 따라, 상속 관계가 필요하지 않게 되었으므로 통합한다.
- 불필요하게 상속 관계였던 클래스를 하나로 통합한다. - ExpiredTokenAuthentication와 SiteUserAuthentication을 다형성을 이용해 처리하기 위해 상속 관계를 만들었지만, ExpiredTokenAuthentication의 삭제(solid-connection#308 PR)에 따라, 상속 관계가 필요하지 않게 되었으므로 통합한다.
* refactor: 의미상 중요도에 따라 나열 순서 변경 - '스프링 시큐리티의 용어'에 대해 주석으로 추가 설명을 한다. - 의미상 중요한 것을 위에 위치시킨다. * refactor: 토큰 인증 정보 클래스 이름 변경 - JwtAuthentication -> TokenAuthentication - Jwt라는 구체 기술을 드러내지 않도록 한다. * refactor: 토큰 인증 정보 필터 클래스 이름 변경 - JwtAuthenticationFilter -> TokenAuthenticationFilter - Jwt라는 구체 기술을 드러내지 않도록 한다. * refactor: SiteUserAuthentication을 TokenAuthentication으로 통합 - 불필요하게 상속 관계였던 클래스를 하나로 통합한다. - ExpiredTokenAuthentication와 SiteUserAuthentication을 다형성을 이용해 처리하기 위해 상속 관계를 만들었지만, ExpiredTokenAuthentication의 삭제(#308 PR)에 따라, 상속 관계가 필요하지 않게 되었으므로 통합한다. * test: TokenAuthentication 테스트 코드 작성 - SiteUserAuthentication 테스트 코드의 내용을 토대로 작성한다. * refactor: 토큰 인증 정보 provider 클래스 이름 변경 * refactor: 같은 관심사의 파일이 같은 패키지에 있도록 이동 - authentication 객체와 이를 처리하는 provider가 같은 패키지에 오도록 패키지 이동 * refactor: 구체 기술이 들어간 클래스를 다른 패키지로 분리 - "외부의 구체 기술"관련 코드를 모으는 패키지의 관례적인 이름인 'infrastructure'를 사용한다. * test: 테스트에 이름 추가
관련 이슈
작업 내용
이전에는 사용자가 만료된 토큰으로 요청했을 때, 로그인하지 않은 사용자와 동일한 응답을 볼 수 있게하는 기능이 있었습니다.
이번에 새롭게 진행된 논의에 따라, 만료된 토큰 → 401 응답으로 정책을 통일하게 되었습니다.
이에 맞추어 만료된 토큰을 허용하기 위해 존재했던 코드들을 삭제합니다.
AS-IS
사용자가 만료된 토큰으로 요청했을 때,
ExpiredTokenAuthentication 클래스가 존재했습니다.
TO-BE
ExpiredTokenAuthentication 를 처리하기 위해 존재했던 코드들을 삭제합니다.
특이 사항
리뷰 요구사항 (선택)