Class ScimClient
- java.lang.Object
-
- com.ibm.security.access.scimclient.ScimClient
-
public class ScimClient extends java.lang.Object
Convenience wrapper for the HTTP client to simplify/standardize SCIM requests.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
HttpClient_java_copyright
static java.lang.String
HttpClient_java_sourceCodeID
-
Constructor Summary
Constructors Constructor Description ScimClient()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.String
computeIDForUsername(java.lang.String username)
Computes the SCIM ID for a given username.static java.lang.String
computeScimUsernameFromUsername(java.lang.String username)
Computes the SCIM username from a given username.static java.lang.String
computeUsernameFromID(java.lang.String scimId)
Computes the username from a given SCIM ID.static HttpResponse
httpDelete(java.util.HashMap<java.lang.String,java.lang.String> config, java.lang.String urlstr)
SCIM client DELETE method.static HttpResponse
httpGet(java.util.HashMap<java.lang.String,java.lang.String> config, java.lang.String urlstr)
SCIM client GET method.static HttpResponse
httpPatch(java.util.HashMap<java.lang.String,java.lang.String> config, java.lang.String urlstr, java.lang.String body)
SCIM client PATCH method.static HttpResponse
httpPost(java.util.HashMap<java.lang.String,java.lang.String> config, java.lang.String urlstr, java.lang.String body)
SCIM client POST method.static HttpResponse
httpPut(java.util.HashMap<java.lang.String,java.lang.String> config, java.lang.String urlstr, java.lang.String body)
SCIM client PUT method.
-
-
-
Field Detail
-
HttpClient_java_sourceCodeID
public static final java.lang.String HttpClient_java_sourceCodeID
- See Also:
- Constant Field Values
-
HttpClient_java_copyright
public static final java.lang.String HttpClient_java_copyright
-
-
Method Detail
-
httpGet
public static HttpResponse httpGet(java.util.HashMap<java.lang.String,java.lang.String> config, java.lang.String urlstr)
SCIM client GET method.- Parameters:
config
- The ScimConfig mapurlstr
- The URL to GET- Returns:
- The HTTP response. Null if invalid URL or no response.
-
httpPost
public static HttpResponse httpPost(java.util.HashMap<java.lang.String,java.lang.String> config, java.lang.String urlstr, java.lang.String body)
SCIM client POST method.- Parameters:
config
- The ScimConfig mapurlstr
- The URL to POSTbody
- The POST body data- Returns:
- The HTTP response. Null if invalid URL or no response.
-
httpPut
public static HttpResponse httpPut(java.util.HashMap<java.lang.String,java.lang.String> config, java.lang.String urlstr, java.lang.String body)
SCIM client PUT method.- Parameters:
config
- The ScimConfig mapurlstr
- The URL to PUTbody
- The POST body data- Returns:
- The HTTP response. Null if invalid URL or no response.
-
httpPatch
public static HttpResponse httpPatch(java.util.HashMap<java.lang.String,java.lang.String> config, java.lang.String urlstr, java.lang.String body)
SCIM client PATCH method.- Parameters:
config
- The ScimConfig mapurlstr
- The URL to PATCHbody
- The POST body data- Returns:
- The HTTP response. Null if invalid URL or no response.
-
httpDelete
public static HttpResponse httpDelete(java.util.HashMap<java.lang.String,java.lang.String> config, java.lang.String urlstr)
SCIM client DELETE method.- Parameters:
config
- The ScimConfig mapurlstr
- The URL to DELETE- Returns:
- The HTTP response. Null if invalid URL or no response.
-
computeIDForUsername
public static java.lang.String computeIDForUsername(java.lang.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 java.lang.String computeUsernameFromID(java.lang.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 java.lang.String computeScimUsernameFromUsername(java.lang.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.
-
-