Skip to content

Commit 1a37f9f

Browse files
Create readme.md
1 parent 1b3235e commit 1a37f9f

File tree

1 file changed

+14
-0
lines changed
  • Script Includes/SCIM Payload Generator

1 file changed

+14
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
A script include to generate payload for testing SCIM-based integration.
2+
3+
The script covers as specific case where user is added/removed to user groups based on the values in the 'entitlements' object of the SCIM payload.
4+
5+
The main function accepts 3 parameters:
6+
7+
groupsToRemove - will check all groups of which the user is currently member and will randomly remove the membership of groups equal to the number passed to the parameter
8+
groupsToAdd - will check all groups to which the is not currently a member and will randomly create membershis for groups equal to the number passed to the parameter
9+
newGroupsToCreate - will create new groups and add the user to them. Group names are concatenation of a prefix and randomly generated string.
10+
The end result of the function is a JSON object that can be directly passed as a payload while testing via REST API explorer or Postman.
11+
12+
Usage: var groupsToRemove = 2; var groupsToAdd = 1; var newGroupsToCreate = 3;
13+
14+
var generator = new GenerateSCIMPayload(); var scimPayload = generator.generateEntitlements(jamesVittoloSysID, groupsToRemove, groupsToAdd, newGroupsToCreate); gs.info(JSON.stringify(scimPayload));

0 commit comments

Comments
 (0)