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

Compare username based on ID strategy on token refresh #394

Merged
merged 1 commit into from
Sep 18, 2024

Conversation

eva-mueller-coremedia
Copy link
Contributor

When using the option to refresh the token, the expected username and the username from the token might differ in their case.

This lead to an "Username was not the same after refresh". To take the User ID strategy into account, one can use User.idStrategy().equals instead of a plain equals comparison.

Fixes: #392

Testing done

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 September 10, 2024 07:38
Copy link

codecov bot commented Sep 10, 2024

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Project coverage is 71.88%. Comparing base (791ef3c) to head (a5a97f8).
Report is 27 commits behind head on master.

Files with missing lines Patch % Lines
...va/org/jenkinsci/plugins/oic/OicSecurityRealm.java 0.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master     #394      +/-   ##
============================================
- Coverage     72.47%   71.88%   -0.60%     
+ Complexity      244      239       -5     
============================================
  Files            12       12              
  Lines          1021     1010      -11     
  Branches        148      145       -3     
============================================
- Hits            740      726      -14     
- Misses          201      206       +5     
+ Partials         80       78       -2     

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

@michael-doubez michael-doubez merged commit db7d59e into jenkinsci:master Sep 18, 2024
19 of 20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

User name was not the same after refresh request
3 participants