TheAPI is /api/v1/users/profile endpoint is returning uid of the user while the /api/v1/group/{:group_id}/users uses the id of the user. Hence we are unable to use the uid obtained to add users into the groups.
In https://github.com/gate-sso/gate/blob/master/app/models/user.rb,
Two ids are being used, but they are more or less related with each other. From our understanding of the implementation of generate_uid(uid_buffer=5000). However, from trying out different emails we realized that uid and id do not always have the same difference of 5000 (so we are unable to do a simple subtraction to obtain the required id.
The
API is /api/v1/users/profile
endpoint is returninguid
of the user while the/api/v1/group/{:group_id}/users
uses the id of the user. Hence we are unable to use theuid
obtained to add users into the groups.In https://github.com/gate-sso/gate/blob/master/app/models/user.rb, Two ids are being used, but they are more or less related with each other. From our understanding of the implementation of
generate_uid(uid_buffer=5000)
. However, from trying out different emails we realized thatuid
andid
do not always have the same difference of 5000 (so we are unable to do a simple subtraction to obtain the required id.