KEYCLOAK-10330 Force Jackson2 provider to be used by Keycloak admin client, to prevent json-b provider taking over

This commit is contained in:
stianst 2020-03-05 11:31:43 +01:00 committed by Stian Thorgersen
parent b84160786b
commit fae333750a
2 changed files with 8 additions and 0 deletions

View file

@ -0,0 +1,6 @@
package org.keycloak.admin.client;
import org.jboss.resteasy.plugins.providers.jackson.ResteasyJackson2Provider;
public class JacksonProvider extends ResteasyJackson2Provider {
}

View file

@ -67,6 +67,8 @@ public class Keycloak implements AutoCloseable {
if (customJacksonProvider != null) { if (customJacksonProvider != null) {
clientBuilder.register(customJacksonProvider, 100); clientBuilder.register(customJacksonProvider, 100);
} else {
clientBuilder.register(JacksonProvider.class, 100);
} }
return clientBuilder.build(); return clientBuilder.build();