diff --git a/authz/client/src/main/java/org/keycloak/authorization/client/AuthzClient.java b/authz/client/src/main/java/org/keycloak/authorization/client/AuthzClient.java index 524f90777a..64c9632a42 100644 --- a/authz/client/src/main/java/org/keycloak/authorization/client/AuthzClient.java +++ b/authz/client/src/main/java/org/keycloak/authorization/client/AuthzClient.java @@ -23,6 +23,8 @@ import java.io.IOException; import java.io.InputStream; import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.databind.ObjectMapper; import org.keycloak.authorization.client.representation.ServerConfiguration; import org.keycloak.authorization.client.resource.AuthorizationResource; import org.keycloak.authorization.client.resource.ProtectionResource; @@ -30,7 +32,7 @@ import org.keycloak.authorization.client.util.Http; import org.keycloak.authorization.client.util.TokenCallable; import org.keycloak.common.util.KeycloakUriBuilder; import org.keycloak.representations.AccessTokenResponse; -import org.keycloak.util.JsonSerialization; +import org.keycloak.util.SystemPropertiesJsonParserFactory; /** *
This is class serves as an entry point for clients looking for access to Keycloak Authorization Services.
@@ -72,7 +74,11 @@ public class AuthzClient {
}
try {
- return create(JsonSerialization.readValue(configStream, Configuration.class));
+ 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);
}
diff --git a/testsuite/integration-arquillian/tests/base/pom.xml b/testsuite/integration-arquillian/tests/base/pom.xml
index a45cd0ab1e..a7f8426d1c 100644
--- a/testsuite/integration-arquillian/tests/base/pom.xml
+++ b/testsuite/integration-arquillian/tests/base/pom.xml
@@ -42,6 +42,7 @@