Class ScimClient
java.lang.Object
org.cibseven.bpm.identity.impl.scim.ScimClient
HTTP client for SCIM API operations.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final ScimConfigurationprotected org.apache.hc.client5.http.impl.classic.CloseableHttpClientprotected ScimOAuth2TokenStoreprotected final com.fasterxml.jackson.databind.ObjectMapperprotected ScimSimpleCache<com.fasterxml.jackson.databind.JsonNode> -
Constructor Summary
ConstructorsConstructorDescriptionScimClient(ScimConfiguration configuration) ScimClient(ScimConfiguration configuration, ScimSimpleCache<com.fasterxml.jackson.databind.JsonNode> responseCache) ScimClient(ScimConfiguration configuration, ScimSimpleCache<com.fasterxml.jackson.databind.JsonNode> responseCache, ScimOAuth2TokenStore oauth2TokenStore) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddAuthenticationHeader(org.apache.hc.client5.http.classic.methods.HttpUriRequestBase request) protected voidaddCustomHeaders(org.apache.hc.client5.http.classic.methods.HttpUriRequestBase request) protected voidprotected booleancheckUserPasswordWithOidc(String userName, String password) protected booleancheckUserWithSearchFilter(String userId, String filter) voidclose()protected SSLContextcom.fasterxml.jackson.databind.JsonNodedeleteGroupByScimId(String scimId) Delete a specific group by scim ID.com.fasterxml.jackson.databind.JsonNodedeleteUserByScimId(String scimId) Delete a specific user by scim ID.protected StringencodeUrlParameter(String param) protected voidprotected com.fasterxml.jackson.databind.JsonNodeexecuteDel(String url) protected com.fasterxml.jackson.databind.JsonNodeexecuteGet(String url) protected com.fasterxml.jackson.databind.JsonNodeexecuteHttpRequest(ScimClient.HttpMethod method, String url, com.fasterxml.jackson.databind.JsonNode body, boolean isRetry) protected com.fasterxml.jackson.databind.JsonNodeexecutePatch(String url, com.fasterxml.jackson.databind.JsonNode patchBody) protected com.fasterxml.jackson.databind.JsonNodeexecutePost(String url, com.fasterxml.jackson.databind.JsonNode postBody) com.fasterxml.jackson.databind.JsonNodegetGroupByScimId(String scimId) Get a specific group by scim ID.com.fasterxml.jackson.databind.JsonNodegetUserByScimId(String scimId) Get a specific user by scim ID.protected voidprotected booleancom.fasterxml.jackson.databind.JsonNodepatchGroupByScimId(String scimId, com.fasterxml.jackson.databind.JsonNode patchBody) Patch a specific group by scim ID.com.fasterxml.jackson.databind.JsonNodepatchUserByScimId(String scimId, com.fasterxml.jackson.databind.JsonNode patchBody) Patch a specific user by scim ID.protected voidcom.fasterxml.jackson.databind.JsonNodesearchGroups(String filter, int startIndex, int count, String sorting) Search for groups using SCIM filter.com.fasterxml.jackson.databind.JsonNodesearchUsers(String filter, int startIndex, int count, String sorting) Search for users using SCIM filter.
-
Field Details
-
configuration
-
objectMapper
protected final com.fasterxml.jackson.databind.ObjectMapper objectMapper -
httpClient
protected org.apache.hc.client5.http.impl.classic.CloseableHttpClient httpClient -
oauth2TokenStore
-
responseCache
-
-
Constructor Details
-
ScimClient
-
ScimClient
public ScimClient(ScimConfiguration configuration, ScimSimpleCache<com.fasterxml.jackson.databind.JsonNode> responseCache) -
ScimClient
public ScimClient(ScimConfiguration configuration, ScimSimpleCache<com.fasterxml.jackson.databind.JsonNode> responseCache, ScimOAuth2TokenStore oauth2TokenStore)
-
-
Method Details
-
checkConfiguration
protected void checkConfiguration() -
initializeHttpClient
protected void initializeHttpClient() -
createTrustAllSSLContext
protected SSLContext createTrustAllSSLContext() throws NoSuchAlgorithmException, KeyManagementException -
searchUsers
public com.fasterxml.jackson.databind.JsonNode searchUsers(String filter, int startIndex, int count, String sorting) Search for users using SCIM filter. -
searchGroups
public com.fasterxml.jackson.databind.JsonNode searchGroups(String filter, int startIndex, int count, String sorting) Search for groups using SCIM filter. -
getUserByScimId
Get a specific user by scim ID. -
patchUserByScimId
public com.fasterxml.jackson.databind.JsonNode patchUserByScimId(String scimId, com.fasterxml.jackson.databind.JsonNode patchBody) Patch a specific user by scim ID. -
deleteUserByScimId
Delete a specific user by scim ID. -
getGroupByScimId
Get a specific group by scim ID. -
patchGroupByScimId
public com.fasterxml.jackson.databind.JsonNode patchGroupByScimId(String scimId, com.fasterxml.jackson.databind.JsonNode patchBody) Patch a specific group by scim ID. -
deleteGroupByScimId
Delete a specific group by scim ID. -
executeGet
-
executePost
protected com.fasterxml.jackson.databind.JsonNode executePost(String url, com.fasterxml.jackson.databind.JsonNode postBody) -
executeDel
-
executePatch
protected com.fasterxml.jackson.databind.JsonNode executePatch(String url, com.fasterxml.jackson.databind.JsonNode patchBody) -
executeHttpRequest
protected com.fasterxml.jackson.databind.JsonNode executeHttpRequest(ScimClient.HttpMethod method, String url, com.fasterxml.jackson.databind.JsonNode body, boolean isRetry) -
addAuthenticationHeader
protected void addAuthenticationHeader(org.apache.hc.client5.http.classic.methods.HttpUriRequestBase request) -
addCustomHeaders
protected void addCustomHeaders(org.apache.hc.client5.http.classic.methods.HttpUriRequestBase request) -
isOAuth2Authentication
protected boolean isOAuth2Authentication() -
ensureOAuth2Token
protected void ensureOAuth2Token() -
refreshOAuth2Token
protected void refreshOAuth2Token() -
checkUserPasswordWithOidc
-
checkUserWithSearchFilter
-
encodeUrlParameter
-
close
public void close()
-