-
Notifications
You must be signed in to change notification settings - Fork 1
refactor: 리프레시 토큰 저장을 위한 Redis 추가 #98
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
Conversation
|
2025.4.5 추가 refresh 재발급
토큰에 type 필드 추가
Redis-MySQL 동기화
|
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
|
Caution Review failedThe pull request is closed. Walkthrough이번 변경 사항은 리프레시 토큰(Refresh Token)의 발급, 저장, 검증 및 재발급을 Redis 기반으로 전환하는 데 중점을 두고 있습니다. 이를 위해 Redis 연동 설정, 토큰 엔티티 및 저장소, 서비스, 컨트롤러가 추가되었으며, 기존 JWT 인증 및 사용자 서비스 로직이 새 리프레시 토큰 서비스와 통합되었습니다. 또한 도커 컴포즈에 Redis 서비스가 추가되고, Spring Boot 프로젝트에 Redis 의존성이 포함되었습니다. Swagger 및 CI/CD, DTO, 결과 코드 등도 이에 맞게 수정되었습니다. Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant JwtAuthenticationFilter
participant RefreshTokenService
participant JwtTokenProvider
participant UserService
Client->>JwtAuthenticationFilter: 요청(Access Token 포함)
JwtAuthenticationFilter->>JwtTokenProvider: Access Token 유효성 검사
alt Access Token 유효
JwtAuthenticationFilter->>UserService: 사용자 인증
JwtAuthenticationFilter-->>Client: 정상 응답
else Access Token 만료/무효
JwtAuthenticationFilter->>RefreshTokenService: 이메일로 Refresh Token 조회
RefreshTokenService-->>JwtAuthenticationFilter: Refresh Token 반환
JwtAuthenticationFilter->>JwtTokenProvider: Refresh Token 유효성 검사
alt Refresh Token 유효
JwtAuthenticationFilter->>JwtTokenProvider: 새 Access Token 생성
JwtAuthenticationFilter-->>Client: 새 Access Token 헤더로 응답
else Refresh Token 만료/무효
JwtAuthenticationFilter-->>Client: 인증 실패(토큰 만료)
end
end
sequenceDiagram
participant UserService
participant RefreshTokenService
participant RefreshTokenRepository
participant JwtTokenProvider
UserService->>RefreshTokenService: createRefreshToken(email)
RefreshTokenService->>JwtTokenProvider: 토큰 생성 요청(email, type=REFRESH)
JwtTokenProvider-->>RefreshTokenService: Refresh Token 반환
RefreshTokenService->>RefreshTokenRepository: 저장(email, refreshToken)
RefreshTokenRepository-->>RefreshTokenService: 저장 완료
RefreshTokenService-->>UserService: Refresh Token 반환
Poem
Tip ⚡💬 Agentic Chat (Pro Plan, General Availability)
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (18)
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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 (
|
Summary
Redis와 리프레시 토큰 로직 추가
Description
feat
fix
Screenshot
Test Checklist
Summary by CodeRabbit
신규 기능
버그 수정
리팩터
문서화
환경설정