userID does not update even after passing ID in User struct
shubhamUpadhyayInBlue opened this issue · 1 comments
Describe the bug
The userID does not update even after passing ID in the user struct, here.
user := gocloak.User{
ID: gocloak.StringP(data.MsgData.OrgID)
To Reproduce
Steps to reproduce the behavior:
- Run keycloak server using docker image - https://quay.io/repository/keycloak/keycloak?tab=tags&tag=latest
- Now use the gocloak library v13.7.0
- Send data to create new user and pass a custom userID to the ID field of User struct
- The user is created but not with the custom ID of the user but an auto-generated UUID.
Expected behavior
- Since ID is provided in the User struct it should update the user_id but it does not.
Desktop (please complete the following information):
N.A.
Smartphone (please complete the following information):
N.A.
Additional context
I also found an article that says that keycloak does not allow custom userid, but since it was being accepted in the user struct of this library I tried to update it but doesn't look like it works.
The library is a wrapper around the keycloak API.
The models used in Gocloak match the models provided in the Keycloak API Documentation.
Some (lots) of these models hold more fields, than used/filled by the Keycloak API.
I guess it would be a good idea for the future to clean them up a bit, to match what they actually do.