use of org.wso2.carbon.identity.application.common.model.xsd.InboundProvisioningConfig in project identity-api-server by wso2.
the class UpdateProvisioningConfiguration method apply.
@Override
public void apply(ServiceProvider application, ProvisioningConfiguration provisioningConfigApiModel) {
if (provisioningConfigApiModel != null) {
InboundSCIMProvisioningConfiguration inboundProvisioningModel = provisioningConfigApiModel.getInboundProvisioning();
if (inboundProvisioningModel != null) {
InboundProvisioningConfig inboundProvisioningConfig = getInboundProvisioningConfig(application);
setIfNotNull(inboundProvisioningModel.getProxyMode(), inboundProvisioningConfig::setDumbMode);
setIfNotNull(inboundProvisioningModel.getProvisioningUserstoreDomain(), inboundProvisioningConfig::setProvisioningUserStore);
application.setInboundProvisioningConfig(inboundProvisioningConfig);
}
List<OutboundProvisioningConfiguration> outboundProvisioningIdps = provisioningConfigApiModel.getOutboundProvisioningIdps();
if (outboundProvisioningIdps != null) {
OutboundProvisioningConfig outboundProvisioningConfig = getOutboundProvisionConfig(application);
IdentityProvider[] identityProviders = getProvisioningIdps(outboundProvisioningIdps);
outboundProvisioningConfig.setProvisioningIdentityProviders(identityProviders);
application.setOutboundProvisioningConfig(outboundProvisioningConfig);
}
}
}
use of org.wso2.carbon.identity.application.common.model.xsd.InboundProvisioningConfig in project identity-api-server by wso2.
the class ServerConfigManagementService method updateInboundScimConfigs.
/**
* Update SCIM Inbound Provisioning Configurations.
*
* @param scimConfig ScimConfig.
*/
public void updateInboundScimConfigs(ScimConfig scimConfig) {
ServiceProvider application = getResidentApplication();
if (scimConfig != null) {
InboundProvisioningConfig inboundProvisioningConfig = new InboundProvisioningConfig();
inboundProvisioningConfig.setDumbMode(scimConfig.getEnableProxyMode());
if (!scimConfig.getEnableProxyMode()) {
inboundProvisioningConfig.setProvisioningEnabled(true);
inboundProvisioningConfig.setProvisioningUserStore(scimConfig.getProvisioningUserstore());
}
ServiceProvider applicationClone = createApplicationClone(application);
applicationClone.setInboundProvisioningConfig(inboundProvisioningConfig);
try {
ConfigsServiceHolder.getInstance().getApplicationManagementService().updateApplicationByResourceId(applicationClone.getApplicationResourceId(), applicationClone, ContextLoader.getTenantDomainFromContext(), ContextLoader.getUsernameFromContext());
} catch (IdentityApplicationManagementException e) {
throw handleApplicationMgtException(e, Constants.ErrorMessage.ERROR_CODE_ERROR_RETRIEVING_CONFIGS, null);
}
}
}
Aggregations