-
Notifications
You must be signed in to change notification settings - Fork 12
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
Feature ETP-801: Fix claims generation #550
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This comment has been minimized.
This comment has been minimized.
RomanMagnoli
force-pushed
the
feature/ETP-801
branch
from
December 4, 2024 19:43
63caeb4
to
e7c1607
Compare
etendobot
reviewed
Dec 4, 2024
...re/com.smf.securewebservices/src/com/smf/securewebservices/utils/SecureWebServicesUtils.java
Show resolved
Hide resolved
This comment has been minimized.
This comment has been minimized.
RomanMagnoli
force-pushed
the
feature/ETP-801
branch
from
December 5, 2024 13:42
e7c1607
to
9bbe9d8
Compare
This comment has been minimized.
This comment has been minimized.
RomanMagnoli
force-pushed
the
feature/ETP-801
branch
from
December 5, 2024 14:54
9bbe9d8
to
456a017
Compare
This comment has been minimized.
This comment has been minimized.
RomanMagnoli
requested review from
Matias-Bernal,
sebastianbarrozo,
Gremiger,
valeg-etendo and
jortolanosmf
December 5, 2024 17:16
Matias-Bernal
approved these changes
Dec 5, 2024
etendobot
reviewed
Dec 6, 2024
...re/com.smf.securewebservices/src/com/smf/securewebservices/utils/SecureWebServicesUtils.java
Show resolved
Hide resolved
etendobot
reviewed
Dec 6, 2024
src-test/src/com/smf/securewebservices/utils/SecureWebServicesUtilsTest.java
Show resolved
Hide resolved
This comment has been minimized.
This comment has been minimized.
valeg-etendo
approved these changes
Dec 6, 2024
Analysis Details0 IssuesCoverage and DuplicationsProject ID: etendosoftware_etendo_core_AYOKvQCAuJ79WHyLB97g |
etendobot
reviewed
Dec 6, 2024
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.
GPT Review for SecureWebServicesUtils.java
Review
- Estimated effort to review [1-5]:
1, because the changes are straightforward and involve renaming claims in a JWT builder method, which is simple to review. - Score: 95
Code feedback
- File:
modules_core/com.smf.securewebservices/src/com/smf/securewebservices/utils/SecureWebServicesUtils.java - Language:
java - Suggestion:
Consider adding a comment to explain the rationale behind renaming the JWT claims. This can help future developers understand the context and reason for these changes. [medium] - Label:
documentation - Existing code:
.withClaim("user", user.getId())
.withClaim("client", selectedRole.getClient().getId())
.withClaim("role", selectedRole.getId())
.withClaim("organization", selectedOrg.getId())
- Improved code:
// Renamed claims for better clarity and consistency
.withClaim("user", user.getId())
.withClaim("client", selectedRole.getClient().getId())
.withClaim("role", selectedRole.getId())
.withClaim("organization", selectedOrg.getId())
etendobot
reviewed
Dec 6, 2024
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.
GPT Review for SecureWebServicesUtilsTest.java
Review
- Estimated effort to review [1-5]:
2, because the changes are straightforward and involve updating the claim keys in test assertions, which is a simple and clear modification. - Score: 95
Code feedback
- File:
src-test/src/com/smf/securewebservices/utils/SecureWebServicesUtilsTest.java - Language:
java - Suggestion:
Consider adding a comment or updating documentation to reflect the change in claim keys fromad_user_id
,ad_role_id
, andad_org_id
touser
,role
, andorganization
. This will help maintain clarity for future developers who may work with this code. [medium] - Label:
documentation - Existing code:
assertEquals(user.getId(), decodedToken.getClaim("user").asString());
assertEquals(role.getId(), decodedToken.getClaim("role").asString());
assertEquals(org.getId(), decodedToken.getClaim("organization").asString());
- Improved code:
// Updated claim keys to match new token structure
assertEquals(user.getId(), decodedToken.getClaim("user").asString());
assertEquals(role.getId(), decodedToken.getClaim("role").asString());
assertEquals(org.getId(), decodedToken.getClaim("organization").asString());
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.