Class ScimClient

java.lang.Object
com.ibm.security.access.scimclient.ScimClient

public class ScimClient extends Object
Convenience wrapper for the HTTP client to simplify/standardize SCIM requests.
  • Field Details

  • Constructor Details

    • ScimClient

      public ScimClient()
  • Method Details

    • httpGet

      public static HttpResponse httpGet(HashMap<String,String> config, String urlstr)
      SCIM client GET method.
      Parameters:
      config - The ScimConfig map
      urlstr - The URL to GET
      Returns:
      The HTTP response. Null if invalid URL or no response.
    • httpPost

      public static HttpResponse httpPost(HashMap<String,String> config, String urlstr, String body)
      SCIM client POST method.
      Parameters:
      config - The ScimConfig map
      urlstr - The URL to POST
      body - The POST body data
      Returns:
      The HTTP response. Null if invalid URL or no response.
    • httpPut

      public static HttpResponse httpPut(HashMap<String,String> config, String urlstr, String body)
      SCIM client PUT method.
      Parameters:
      config - The ScimConfig map
      urlstr - The URL to PUT
      body - The POST body data
      Returns:
      The HTTP response. Null if invalid URL or no response.
    • httpPatch

      public static HttpResponse httpPatch(HashMap<String,String> config, String urlstr, String body)
      SCIM client PATCH method.
      Parameters:
      config - The ScimConfig map
      urlstr - The URL to PATCH
      body - The POST body data
      Returns:
      The HTTP response. Null if invalid URL or no response.
    • httpDelete

      public static HttpResponse httpDelete(HashMap<String,String> config, String urlstr)
      SCIM client DELETE method.
      Parameters:
      config - The ScimConfig map
      urlstr - The URL to DELETE
      Returns:
      The HTTP response. Null if invalid URL or no response.
    • computeIDForUsername

      public static String computeIDForUsername(String username)
      Computes the SCIM ID for a given username. (This is a base64urlencode operation.)
      Parameters:
      username - The username to generate the SCIM ID for.
      Returns:
      The SCIM ID for the given username.
    • computeUsernameFromID

      public static String computeUsernameFromID(String scimId)
      Computes the username from a given SCIM ID. (This is a base64urldecode operation.)
      Parameters:
      scimId - The scimId to determine the username for.
      Returns:
      The username corresponding to the given SCIM ID.
    • computeScimUsernameFromUsername

      public static String computeScimUsernameFromUsername(String username)
      Computes the SCIM username from a given username. (This is a toLower operation)
      Parameters:
      username - The username to determine the SCIM username for.
      Returns:
      The SCIM username corresponding to the given username.