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

Change the return type of GetUserGroups to Group #245

Closed
azerbe opened this issue Dec 13, 2020 · 1 comment · Fixed by #246
Closed

Change the return type of GetUserGroups to Group #245

azerbe opened this issue Dec 13, 2020 · 1 comment · Fixed by #246

Comments

@azerbe
Copy link
Contributor

azerbe commented Dec 13, 2020

Is your feature request related to a problem? Please describe.

When you query for UserGroups (GET /{realm}/users/{id}/groups) you get a Grouprepresentation as result.
But currently the return type is a UserGroup. This doesn't allow the use of querys like

briefRep := false
groups, err := client.GetUserGroups(ctx, k.token.AccessToken, k.Realm, id, gocloak.GetGroupsParams{BriefRepresentation: &briefRep})

Something that is totally possible, if you query the API directly and if you are interested in informations like group attributes.

Describe the solution you'd like
Return []Group instead.

@SVilgelm
Copy link
Collaborator

SVilgelm commented Dec 16, 2020

So, my question: Is it the bug we have from the very beginning or the return type is changed in some version?
Looks like that the USerGroup is a subset of Group, so I don't see any problems, it should be backward compatible with Keycloak's API, but form the Gocloak's point of view we must to release new major version, since it breaks backward compatibility

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 a pull request may close this issue.

2 participants