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

added briefRepresentation in query params to show or not the role attributes #52

Conversation

endrit-gjocaj
Copy link

@endrit-gjocaj endrit-gjocaj commented Oct 2, 2024

Updated the implementation of the Get User Roles by adding the briefRepresentation in queryParams, so that we have the option to get attributes of the role (briefRepresentation = false).
https://www.keycloak.org/docs-api/22.0.1/rest-api/index.html#_users:~:text=GET%20/admin/realms/%7Brealm%7D/roles

@endrit-gjocaj endrit-gjocaj force-pushed the feat/add-briefRepresentation-as-queryParam branch from 0174b49 to f668591 Compare October 2, 2024 08:34
Copy link

@sps-campbellwray sps-campbellwray left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@endrit-gjocaj I believe this should be changed to bool? and the default value should be set to null. This way it will use the Keycloak defaults, as opposed to this library imposing it's own default values.

If for some reason this doesn't work, please let me know 😄

@endrit-gjocaj
Copy link
Author

@endrit-gjocaj I believe this should be changed to bool? and the default value should be set to null. This way it will use the Keycloak defaults, as opposed to this library imposing it's own default values.

If for some reason this doesn't work, please let me know 😄

@sps-campbellwray yes your point is valid, I wanted to change the default one to false, in order to always get the attributes since the default one (true) ignores them. What do you think?

@sps-campbellwray
Copy link

@endrit-gjocaj I suspect that the intention of the Keycloak team is to ensure that the requests run quickly and don't return unnecessary information, which is why the default is to ignore the attributes.

By setting it to null, that will also mean that users who are already using Keycloak.Net will continue to have a consistent experience, but that the option will be available to those users who need it.

@endrit-gjocaj endrit-gjocaj force-pushed the feat/add-briefRepresentation-as-queryParam branch from f668591 to 80eefbf Compare October 3, 2024 07:38
@sps-campbellwray sps-campbellwray merged commit abea313 into silentpartnersoftware:main Oct 3, 2024
@endrit-gjocaj
Copy link
Author

@sps-campbellwray any idea when is this going to be released?

@sps-campbellwray
Copy link

@endrit-gjocaj I have just deployed it under 1.0.30.

Thanks for your contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants