Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This sample demonstrates how to consume SCIM Rest Endpoints in WSO2 Identity Server from a JAVA client application based on HttpClient.

Step 1: Steps to run the sample:

  1. Start the Identity Server, using the startup script found in the [IS_Home]/bin folder.

    Info

    Use wso2server.sh for Linux and wso2server.bat for Windows.

  2. Make sure you have installed Apache Ant.
  3. Refer to the client.properties file for SCIM user endpoint, group endpoint URLs, username and password.
  4. Modify it if the default configuration to run the sample is different.

Step 2: Sample for creating a user:

  1. Run the command: 'ant create-user' at this directory level in the command line and observe the JSON message sent to the SCIM endpoint, the . The response status and the SCIM response are printed in the command line output.
  2. You will notice that the The new user is created in Identity Server.
  3. If you wish, you can modify the org.wso2.scim.sample.user.CreateUser class to add more attributes to the creating created user and observe the output in the command line.

Step 3: Sample for creating a group:

  1. Run the command: 'ant create-user' at this directory level in the command line and observe the JSON message sent to the SCIM endpoint. The response status and the SCIM response are printed in the command line output.
  2. You will notice that the The new group is created in the Identity Server and the user created in step 4 Step 2 is added to the group.

Step 4: Sample for updating user identity information:

  1. Run the command: 'ant update-user' at this directory level in command line and observe the json message sent to the SCIM endpoint, the response status and the SCIM response are printed in the command line output.
  2. You will notice that the The user created in the step 4 above, Step 2 is updated with new attribute values for: display name and work email. If you wish, you can modify the org.wso2.scim.sample.user.UpdateUser class to add more attributes to user and observe the output in the command line.

Step 5: Sample for updating group:

  1. Run the command: 'ant update-group' at this directory level in command line and observe the json message sent to the SCIM endpoint, the response status and the SCIM response are printed in the command line output.
  2. You will notice that the group created in the step 5 above, is updated with new attribute values for: display name.

Step 6: Sample for deleting user:

  1. Run the command: 'ant delete-user' at this directory level in command line and observe the response status and the SCIM response printed in the command line output.
  2. You will notice that the The user created in step 4 above Step 2 is now deleted in Identity Server.

Step 7: Sample for deleting group:

  1. Run the command: 'ant delete-group' at this directory level in command line and observe the response status and the SCIM response printed in the command line output. If the
  2. You will notice that the The group created in step 5 above Step 3 is now deleted in Identity Server.
  3. Provisioning SCIM operations to other SCIM providers.

...