use of io.quarkus.resteasy.server.common.deployment.ResteasyDeploymentCustomizerBuildItem in project keycloak by keycloak.
the class KeycloakProcessor method configureResteasy.
@BuildStep
void configureResteasy(BuildProducer<ResteasyDeploymentCustomizerBuildItem> deploymentCustomizerProducer) {
deploymentCustomizerProducer.produce(new ResteasyDeploymentCustomizerBuildItem(new Consumer<ResteasyDeployment>() {
@Override
public void accept(ResteasyDeployment resteasyDeployment) {
// we need to explicitly set the application to avoid errors at build time due to the application
// from keycloak-services also being added to the index
resteasyDeployment.setApplicationClass(QuarkusKeycloakApplication.class.getName());
// we need to disable the sanitizer to avoid escaping text/html responses from the server
resteasyDeployment.setProperty(ResteasyContextParameters.RESTEASY_DISABLE_HTML_SANITIZER, Boolean.TRUE);
}
}));
}
Aggregations