[keycloak-user] Correct Maven dependencies in 3.4.2 Keycloak and admin client

Tero Ahonen tahonen at redhat.com
Tue Jan 2 04:27:42 EST 2018


Hi,

What are correct Maven settings to get keycloak-admin-client working on Wildfly 10

From command line client it works with following below. When using same code in Wildfly with most recent keycloak module execution fails with following 


Caused by: javax.ws.rs.client.ResponseProcessingException: javax.ws.rs.ProcessingException: com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "access_token" (class org.keycloak.representations.AccessTokenResponse), not marked as ignorable (9 known properties: "notBeforePolicy", "otherClaims", "tokenType", "token", "expiresIn", "sessionState", "refreshExpiresIn", "idToken", "refreshToken"])
 at [Source: org.apache.http.conn.EofSensorInputStream at 9d6aba2; line: 1, column: 18] (through reference chain: org.keycloak.representations.AccessTokenResponse["access_token"])
I got that fixed in command line example by changing jackson provider to  resteasy-jackson2-provider

<dependency>
			<groupId>org.keycloak</groupId>
			<artifactId>keycloak-core</artifactId>
			<version>3.4.2.Final</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.keycloak</groupId>
			<artifactId>keycloak-adapter-core</artifactId>
			<version>3.4.2.Final</version>
			<scope>provided</scope>
		</dependency>

		<dependency>
			<groupId>org.keycloak</groupId>
			<artifactId>keycloak-common</artifactId>
			<version>3.4.2.Final</version>
		</dependency>
		
		<dependency>
			<groupId>org.keycloak</groupId>
			<artifactId>keycloak-admin-client</artifactId>
			<version>3.4.2.Final</version>

		</dependency>
		<dependency>
			<groupId>org.jboss.resteasy</groupId>
			<artifactId>resteasy-client</artifactId>
			<version>3.0.24.Final</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.jboss.resteasy</groupId>
			<artifactId>resteasy-jackson2-provider</artifactId>
			<version>3.0.24.Final</version>
			<scope>provided</scope>
		</dependency>


.t



More information about the keycloak-user mailing list