feat: WS AT 만료 시 능동 종료 처리#112
Conversation
|
Warning Review limit reached
More reviews will be available in 37 minutes and 46 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughWebSocket AT 만료 시 서버가 세션을 능동 종료하는 기능을 구현합니다. JWT 토큰 클레임을 Handshake 시 세션 속성에 저장하고, STOMP CONNECT 및 SEND/SUBSCRIBE 프레임 처리 시 저장된 만료 시각을 검증하여 만료된 세션을 종료 후 재연결을 유도합니다. ChangesWebSocket 토큰 만료 감시 및 종료
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In
`@src/main/java/com/howaboutus/backend/realtime/config/WebSocketSessionAttributes.java`:
- Around line 28-37: The helper method requireExpiresAt in
WebSocketSessionAttributes appears unused; search the codebase (including tests
and any reflective access) for requireExpiresAt and direct session attribute
access to confirm whether it's dead; if truly unused delete the method,
otherwise refactor by extracting the expires-at validation into a shared utility
(e.g., SessionAttributeUtils.requireExpiresAt) and update all duplicates and
callers to use that single method (ensure visibility and package placement), and
add/adjust unit tests to cover the consolidated behavior.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 447f9a60-2788-4be6-962f-e4b61b47f13f
📒 Files selected for processing (18)
docs/superpowers/plans/2026-05-29-ws-at-expiry-enforcement.mddocs/superpowers/specs/2026-05-28-sockjs-token-refresh-design.mddocs/superpowers/specs/2026-05-29-ws-at-expiry-enforcement-design.mdsrc/main/java/com/howaboutus/backend/auth/service/JwtProvider.javasrc/main/java/com/howaboutus/backend/auth/service/dto/AuthTokenClaims.javasrc/main/java/com/howaboutus/backend/realtime/config/StompAuthenticationInterceptor.javasrc/main/java/com/howaboutus/backend/realtime/config/TokenExpiryChannelInterceptor.javasrc/main/java/com/howaboutus/backend/realtime/config/TokenExpiryWebSocketHandlerDecorator.javasrc/main/java/com/howaboutus/backend/realtime/config/WebSocketConfig.javasrc/main/java/com/howaboutus/backend/realtime/config/WebSocketHandshakeInterceptor.javasrc/main/java/com/howaboutus/backend/realtime/config/WebSocketSessionAttributes.javasrc/main/java/com/howaboutus/backend/realtime/config/WebSocketSessionRegistry.javasrc/test/java/com/howaboutus/backend/auth/service/JwtProviderTest.javasrc/test/java/com/howaboutus/backend/realtime/config/StompAuthenticationInterceptorTest.javasrc/test/java/com/howaboutus/backend/realtime/config/TokenExpiryChannelInterceptorTest.javasrc/test/java/com/howaboutus/backend/realtime/config/TokenExpiryWebSocketHandlerDecoratorTest.javasrc/test/java/com/howaboutus/backend/realtime/config/WebSocketHandshakeInterceptorTest.javasrc/test/java/com/howaboutus/backend/realtime/config/WebSocketSessionRegistryTest.java
|



변경 내용
변경 이유
테스트
./gradlew build/review-code-against-docs스킬로 검증/app/ping기반 access token refresh/reconnect 흐름 확인 기록체크리스트
하네스 변경 체크리스트
Summary by CodeRabbit
릴리스 노트
New Features
Documentation