feat(users): add SCIMIdentities field to User type
Summary
Add the missing scim_identities field to the User struct to support SCIM identity information. This allows users to access SCIM identity data when retrieving user information from the GitLab API.
Changes
- Added new
SCIMIdentitystruct withExternUIDandActivefields - Added
SCIMIdentities []*SCIMIdentityfield to theUserstruct (placed afterIdentities, matching API doc ordering) - Updated
testdata/get_user_admin.jsonto include a sample SCIM identity - Added
testdata/get_user_with_scim_identities.jsondedicated test fixture - Added
TestGetUserSCIMIdentities— verifies multiple SCIM identities (active and inactive) are correctly unmarshaled, and that regularIdentitiesare unaffected - Added
TestGetUserNoSCIMIdentities— verifiesSCIMIdentitiesisnil(not an empty slice) when the field is absent from the API response - Updated
TestGetUserAdminto assertSCIMIdentitiesalongside the rest of the admin user fields
Motivation
Users need access to SCIM identity information to:
- Track external UID changes (e.g., when interns or rehires change this value)
- Generate reports on SCIM identity status
- Avoid needing to create wrapper types around the
Userstruct
Related Issue
Fixes #2259 (closed)
Note: This was previously submitted as a community fork MR (gitlab-community/gitlab-org/api/client-go!8 (closed)) which was closed in favour of filing directly against the upstream.