use of org.keycloak.util.SystemPropertiesJsonParserFactory in project keycloak by keycloak.
the class KeycloakDeploymentBuilder method loadAdapterConfig.
public static AdapterConfig loadAdapterConfig(InputStream is) {
ObjectMapper mapper = new ObjectMapper(new SystemPropertiesJsonParserFactory());
mapper.setSerializationInclusion(JsonInclude.Include.NON_DEFAULT);
AdapterConfig adapterConfig;
try {
adapterConfig = mapper.readValue(is, AdapterConfig.class);
} catch (IOException e) {
throw new RuntimeException(e);
}
return adapterConfig;
}
use of org.keycloak.util.SystemPropertiesJsonParserFactory in project keycloak by keycloak.
the class AuthzClient method create.
/**
* <p>Creates a new instance.
*
* @param configStream the input stream with the configuration data
* @return a new instance
*/
public static AuthzClient create(InputStream configStream) throws RuntimeException {
if (configStream == null) {
throw new IllegalArgumentException("Config input stream can not be null");
}
try {
ObjectMapper mapper = new ObjectMapper(new SystemPropertiesJsonParserFactory());
mapper.setSerializationInclusion(JsonInclude.Include.NON_DEFAULT);
return create(mapper.readValue(configStream, Configuration.class));
} catch (IOException e) {
throw new RuntimeException("Could not parse configuration.", e);
}
}
Aggregations