[keycloak-user] Get the realms through the Client Admin Api

Felix Knecht Felix.Knecht at hrm-systems.ch
Tue Feb 5 04:37:24 EST 2019

Ciao Luca

In my case it turned out, that the TestEasy client used the wrong annotations provider. So the @JsonProperty <access_token> was not recognized and was null therefore.

What helped in my case was to set  the annotation provider explicitely:

ResteasyClientBuilder clientBuilder = new ResteasyClientBuilder()

ResteasyJackson2Provider jacksonProvider = new ResteasyJackson2Provider() {};
ObjectMapper objectMapper = new ObjectMapper();
objectMapper.setAnnotationIntrospector(new JacksonAnnotationIntrospector());
clientBuilder.register(jacksonProvider, 100);

client = clientBuilder.build();

Keycloak keycloak = KeycloakBuilder.builder()


Cheers Felix

More information about the keycloak-user mailing list