[keycloak-user] KeyCloak Admin Client : DEALING WITH[Unrecognized field "access_token" (classorg.keycloak.representations.AccessTokenResponse)] ISSUE.

PAA KOJO KONDUAH AMOS pkkamos at gmail.com
Fri Feb 5 07:35:48 EST 2016


Ok. Noted. Thanks Kindly.

Sent from Mail for Windows 10

From: Stian Thorgersen
Sent: Friday, February 5, 2016 12:13 PM
To: PAA KOJO KONDUAH AMOS
Cc: keycloak-user at lists.jboss.org
Subject: Re: [keycloak-user] KeyCloak Admin Client : DEALING WITH[Unrecognized field "access_token" (classorg.keycloak.representations.AccessTokenResponse)] ISSUE.



On 5 February 2016 at 08:16, PAA KOJO KONDUAH AMOS <pkkamos at gmail.com> wrote:
Hello Stian, I am very happy to share that, Keycloak admin-client 1.9.0.CR1 is working for me. I will like to share 2 things I have done to get it woking in a web context.
 
1.      Dependency definition:
 
                <dependency>
                                  <groupId>org.keycloak</groupId>
                                  <artifactId>keycloak-admin-client</artifactId>
                                  <version>1.9.0.CR1</version>
                    </dependency>
 
2.      created a jboss-deployment-structure.xml file, placed it in my WEB-INF folder ,with the following content(This ensures Jackson2 is used)[Credit: https://docs.jboss.org/resteasy/docs/3.0.2.Final/userguide/html/json.html, 21.4. Using Jackson 2.2.x Inside of JBoss AS7]:
                 <jboss-deployment-structure>
                               <deployment>
                                        <exclusions>
 
                                             <module name="org.jboss.resteasy.resteasy-jackson-provider" />
                                     </exclusions>
                                   <dependencies>
                                          <module name="org.jboss.resteasy.resteasy-jackson2-provider"
                                                     services="import" />
                                  </dependencies>
                          </deployment>
                 </jboss-deployment-structure>                       

You shouldn't need the jboss-deployment-structure.xml at all if you are using a recent version of WildFly as Jackson2 is the default.
 
 
 
Sent from Mail for Windows 10
 
From: Stian Thorgersen
Sent: Wednesday, February 3, 2016 12:57 PM
To: PAA KOJO KONDUAH AMOS
Cc: keycloak-user at lists.jboss.org
Subject: Re: [keycloak-user] KeyCloak Admin Client :
 
In the past the admin client required Jackson 1.x and didn't work with Jackson 2.x. This is being fixed in 1.9.
 
To make it work you'll need to either wait for 1.9 or make your WAR use Jackson instead of Jackson 2. Check out the admin client example as it doesn't exactly that.
 
On 3 February 2016 at 13:35, PAA KOJO KONDUAH AMOS <pkkamos at gmail.com> wrote:
Hello, I have tried out KeyCloak Admin Client. In fact, I have done a standalone application which works nicely with KeyCloak Server.
 
What I don’t get is, when I port a similar thing into a web application context and deploy same on wildfly fly I keep getting the Exception below:
 
Caused by: 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"])
 
 
Any lead on how to resolve all these maven dependency issues?
 
 
Thanks.
 
Sent from Mail for Windows 10
 

_______________________________________________
keycloak-user mailing list
keycloak-user at lists.jboss.org
https://lists.jboss.org/mailman/listinfo/keycloak-user
 
 


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/keycloak-user/attachments/20160205/389c1762/attachment.html 


More information about the keycloak-user mailing list