-
Notifications
You must be signed in to change notification settings - Fork 400
Throw a client error if an idp not found for the issuer name #2984
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?
Throw a client error if an idp not found for the issuer name #2984
Conversation
| String resourceResidentOrgId = PrivilegedCarbonContext.getThreadLocalCarbonContext().getOrganizationId(); | ||
| if (!jwtIssuerOrgId.equals(switchedOrgOrgAncestors.get(depthOfRootOrg)) || | ||
| !resourceResidentOrgId.equals(switchedOrgId)) { | ||
| throw new IdentityOAuth2Exception("No registered IDP found for the token with issuer name : " | ||
| throw new IdentityOAuth2ClientException("No registered IDP found for the token with issuer name : " |
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
| String resourceResidentOrgId = PrivilegedCarbonContext.getThreadLocalCarbonContext().getOrganizationId(); | |
| if (!jwtIssuerOrgId.equals(switchedOrgOrgAncestors.get(depthOfRootOrg)) || | |
| !resourceResidentOrgId.equals(switchedOrgId)) { | |
| throw new IdentityOAuth2Exception("No registered IDP found for the token with issuer name : " | |
| throw new IdentityOAuth2ClientException("No registered IDP found for the token with issuer name : " | |
| String resourceResidentOrgId = PrivilegedCarbonContext.getThreadLocalCarbonContext().getOrganizationId(); | |
| if (!jwtIssuerOrgId.equals(switchedOrgOrgAncestors.get(depthOfRootOrg)) || | |
| !resourceResidentOrgId.equals(switchedOrgId)) { | |
| log.error("No registered IDP found for JWT issuer: " + jwtIssuer + ", jwtIssuerOrgId: " + jwtIssuerOrgId + ", resourceResidentOrgId: " + resourceResidentOrgId); |
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 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2984 +/- ##
============================================
- Coverage 56.88% 55.98% -0.91%
- Complexity 9608 9884 +276
============================================
Files 669 669
Lines 54806 57392 +2586
Branches 12545 13438 +893
============================================
+ Hits 31179 32133 +954
- Misses 19239 20658 +1419
- Partials 4388 4601 +213
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:
|
Proposed changes in this pull request
note $subject