use of io.jans.configapi.plugin.scim.model.config.ScimAppConfiguration in project jans by JanssenProject.
the class ScimConfigResource method getAppConfiguration.
@GET
@ProtectedApi(scopes = { "https://jans.io/scim/config.readonly" })
public Response getAppConfiguration() {
ScimAppConfiguration appConfiguration = scimConfigService.find();
log.debug("SCIM appConfiguration:{}", appConfiguration);
return Response.ok(appConfiguration).build();
}
use of io.jans.configapi.plugin.scim.model.config.ScimAppConfiguration in project jans by JanssenProject.
the class ScimConfigResource method patchAppConfigurationProperty.
@PATCH
@Consumes(MediaType.APPLICATION_JSON_PATCH_JSON)
@ProtectedApi(scopes = { "https://jans.io/scim/config.write" })
public Response patchAppConfigurationProperty(@NotNull String requestString) throws IOException, JsonPatchException {
log.debug("AUTH CONF details to patch - requestString:{}", requestString);
ScimConf conf = scimConfigService.findConf();
ScimAppConfiguration appConfiguration = conf.getDynamicConf();
log.trace("AUTH CONF details BEFORE patch - conf:{}, appConfiguration:{}", conf, appConfiguration);
appConfiguration = Jackson.applyPatch(requestString, appConfiguration);
log.trace("AUTH CONF details BEFORE patch merge - appConfiguration:{}", appConfiguration);
conf.setDynamicConf(appConfiguration);
scimConfigService.merge(conf);
appConfiguration = scimConfigService.find();
log.debug("AUTH CONF details AFTER patch merge - appConfiguration:{}", appConfiguration);
return Response.ok(appConfiguration).build();
}
Aggregations