Search in sources :

Example 1 with ScimConf

use of io.jans.configapi.plugin.scim.model.config.ScimConf 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();
}
Also used : ScimAppConfiguration(io.jans.configapi.plugin.scim.model.config.ScimAppConfiguration) ScimConf(io.jans.configapi.plugin.scim.model.config.ScimConf) ProtectedApi(io.jans.configapi.core.rest.ProtectedApi)

Example 2 with ScimConf

use of io.jans.configapi.plugin.scim.model.config.ScimConf in project jans by JanssenProject.

the class ScimConfigService method find.

public ScimAppConfiguration find() {
    final ScimConf conf = findConf();
    log.debug("\n\n ScimConfigService::find() - new - conf.getDn:{}, conf.getDynamicConf:{}, conf.getStaticConf:{}, conf.getRevision:{}", conf.getDn(), conf.getDynamicConf(), conf.getStaticConf(), conf.getRevision());
    return conf.getDynamicConf();
}
Also used : ScimConf(io.jans.configapi.plugin.scim.model.config.ScimConf)

Aggregations

ScimConf (io.jans.configapi.plugin.scim.model.config.ScimConf)2 ProtectedApi (io.jans.configapi.core.rest.ProtectedApi)1 ScimAppConfiguration (io.jans.configapi.plugin.scim.model.config.ScimAppConfiguration)1