-
Notifications
You must be signed in to change notification settings - Fork 653
Extract groups from OAuth JWT token #11430
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
Extract groups from OAuth JWT token #11430
Conversation
@haynescd may I ask you to help progress with this PR ? |
@inodb could you help progress with this PR ? |
@inodb please could you help progress with this PR ? |
@inodb Is there any chance we can proceed with this PR? |
Hello cbio team, |
@pnartowski and @kozaka4 I have created a Unit-Test regarding your change / check "rolesCursor.isTextual()" at class "ClaimRoleExtractorUtil.java":
|
…xtract array of groups from string
2d908d9
to
df101f7
Compare
|
I’d like to kindly ask for one more review and if everything looks good a merge. Thanks in advance! |
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.
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
Comments suppressed due to low confidence (2)
src/main/java/org/cbioportal/application/security/util/ClaimRoleExtractorUtil.java:22
- Instead of using a new ObjectMapper in the subsequent readTree call, reuse the configured 'objectMapper' to ensure that the JavaTimeModule remains registered and to avoid potential inconsistencies.
String jsonString = objectMapper.writeValueAsString(claims);
src/main/java/org/cbioportal/application/security/util/ClaimRoleExtractorUtil.java:56
- Consider reusing the previously configured ObjectMapper for parsing the textual JSON instead of creating a new instance, ensuring consistent module registration and behavior.
if (rolesCursor.isTextual()) { rolesCursor = new ObjectMapper().readTree(rolesCursor.asText()); }
We might consider moving objectMapper to class field. As methods which use it are static the field needs to be static to.
What do you think ? |
@sheridancbio and @hweej we need your help, pls |
@haynescd merge:)? |
Extract array of groups from string
Fix #11429
Describe changes proposed in this pull request:
Checks