Skip to content
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

Redirect to login page if refresh token has expired #475

Conversation

eva-mueller-coremedia
Copy link
Contributor

The user should be redirected when the refresh token has expired.

Fixes #457

Changes

  • Check if variable is set to avoid NullPointerException
  • Use request/response variables instead of Stapler requests

Testing done

  • This change has been successfully tested with a AWS Cognito connection.

Submitter checklist

  • Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • Link to relevant issues in GitHub or Jira
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Ensure you have provided tests - that demonstrates feature works or fixes the issue

@eva-mueller-coremedia eva-mueller-coremedia requested a review from a team as a code owner December 5, 2024 15:40
Copy link

codecov bot commented Dec 5, 2024

Codecov Report

Attention: Patch coverage is 50.00000% with 2 lines in your changes missing coverage. Please review.

Project coverage is 71.73%. Comparing base (2a120e0) to head (84359ac).
Report is 19 commits behind head on master.

Files with missing lines Patch % Lines
...va/org/jenkinsci/plugins/oic/OicSecurityRealm.java 50.00% 0 Missing and 2 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master     #475      +/-   ##
============================================
+ Coverage     71.65%   71.73%   +0.08%     
- Complexity      221      222       +1     
============================================
  Files            17       17              
  Lines          1030     1033       +3     
  Branches        146      148       +2     
============================================
+ Hits            738      741       +3     
+ Misses          203      201       -2     
- Partials         89       91       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@michael-doubez michael-doubez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@michael-doubez michael-doubez merged commit 6e62f67 into jenkinsci:master Dec 9, 2024
20 of 21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Token Refresh fails when Use Root URL From Request is enabled
2 participants