-
Notifications
You must be signed in to change notification settings - Fork 400
Improve claim retriving logic in JWTTokenGenerator #2969
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
base: master
Are you sure you want to change the base?
Conversation
|
WSO2 seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
| AuthenticatedUser authenticatedUser = new AuthenticatedUser(); | ||
| authenticatedUser.setUserName(UserCoreUtil.removeDomainFromName(tenantAwareUsername)); | ||
| authenticatedUser.setUserStoreDomain(IdentityUtil.extractDomainFromName(tenantAwareUsername)); | ||
| authenticatedUser.setTenantDomain(tenantDomain); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Log Improvement Suggestion No: 1
| authenticatedUser.setTenantDomain(tenantDomain); | |
| authenticatedUser.setTenantDomain(tenantDomain); | |
| log.info("Generating JWT token for user: " + authenticatedUser.getUserName() + " in tenant: " + tenantDomain); |
| missing.add(req); | ||
| } | ||
| } | ||
| if (!missing.isEmpty() && isExistingUser) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Log Improvement Suggestion No: 2
| if (!missing.isEmpty() && isExistingUser) { | |
| if (!missing.isEmpty() && isExistingUser) { | |
| log.debug("Fetching " + missing.size() + " missing claims from claims retriever for user: " + authzUser); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AI Agent Log Improvement Checklist
- The log-related comments and suggestions in this review were generated by an AI tool to assist with identifying potential improvements. Purpose of reviewing the code for log improvements is to improve the troubleshooting capabilities of our products.
- Please make sure to manually review and validate all suggestions before applying any changes. Not every code suggestion would make sense or add value to our purpose. Therefore, you have the freedom to decide which of the suggestions are helpful.
✅ Before merging this pull request:
- Review all AI-generated comments for accuracy and relevance.
- Complete and verify the table below. We need your feedback to measure the accuracy of these suggestions and the value they add. If you are rejecting a certain code suggestion, please mention the reason briefly in the suggestion for us to capture it.
| Comment | Accepted (Y/N) | Reason |
|---|---|---|
| #### Log Improvement Suggestion No: 1 | ||
| #### Log Improvement Suggestion No: 2 |
|
PR builder started |
Codecov Report❌ Patch coverage is
❌ Your patch check has failed because the patch coverage (0.00%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## master #2969 +/- ##
============================================
- Coverage 58.07% 58.04% -0.04%
+ Complexity 9628 9378 -250
============================================
Files 669 669
Lines 53605 53634 +29
Branches 12235 12244 +9
============================================
Hits 31131 31131
- Misses 18118 18146 +28
- Partials 4356 4357 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
PR builder completed |
jenkins-is-staging
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving the pull request based on the successful pr build https://github.com/wso2/product-is/actions/runs/19066477424
Proposed changes in this pull request
[List all changes you want to add here. If you fixed an issue, please
add a reference to that issue as well.]
When should this PR be merged
[Please describe any preconditions that need to be addressed before we
can merge this pull request.]
Follow up actions
[List any possible follow-up actions here; for instance, testing data
migrations, software that we need to install on staging and production
environments.]
Developer Checklist (Mandatory)
product-isissue to track any behavioral change or migration impact.Checklist (for reviewing)
General
Functionality
Code
Tests
Security
Documentation