-
Notifications
You must be signed in to change notification settings - Fork 143
Fixing #2233 by renewing Session time also in SessionFinder access. #2234
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
Fixing #2233 by renewing Session time also in SessionFinder access. #2234
Conversation
…ccess. Adding explicit exception into RefreshFlow for invalid tokens instead of NPE.
WalkthroughEnhanced OAuth2 session management by updating SessionFinder retrieval methods to call Changes
Sequence Diagram(s)sequenceDiagram
participant Client as Client
participant RTA as RefreshTokenFlow
participant SF as SessionFinder
participant Session as Session
Note over Client,Session: Previous Flow (without validation)
Client->>RTA: POST refresh_token
RTA->>SF: getSessionForRefreshToken()
SF->>Session: retrieve session
Session-->>SF: returns session or null
SF-->>RTA: session (possibly null)
RTA->>RTA: Enter synchronized block<br/>(potential null error)
Note over Client,Session: New Flow (with validation)
Client->>RTA: POST refresh_token
RTA->>SF: getSessionForRefreshToken()
SF->>Session: retrieve session
Session-->>SF: returns session or null
SF->>Session: session.touch()
Session-->>SF: ✓ updated timestamp
SF-->>RTA: session
rect rgb(200, 220, 255)
RTA->>RTA: Check if session is null
alt session is null
RTA-->>Client: error: invalid_request (no sync block)
else session is valid
RTA->>RTA: Enter synchronized block<br/>(safe processing)
end
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Changes involve straightforward null-check addition and session lifecycle method calls across multiple retrieval methods, but require verification of consistent touch() invocation patterns and validation of error handling semantics in the refresh token flow. Possibly related issues
Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (2)
🔇 Additional comments (4)
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 |
|
This pull request needs "/ok-to-test" from an authorized committer. |
|
@coderabbitai plz review |
|
/ok-to-test |
|
@predic8: I'll review the changes in this pull request now. ✅ Actions performedReview triggered.
|
|
@rrayst should we also merge this into main branch? |
…dding explicit exception into RefreshFlow for invalid tokens instead of NPE. (#2234) Co-authored-by: Mehmet Can Cömert <[email protected]>
Renewing Session time also in SessionFinder access and adding explicit exception into RefreshFlow for invalid tokens instead of NPE.
Now RefreshFlow can renew the Session to prevent log off after initial Session time.
Summary by CodeRabbit
Release Notes