<div dir="ltr"><br><div class="gmail_quote">---------- Forwarded message ----------<br>From: <b class="gmail_sendername">Alexander Chriztopher</b> <span dir="ltr"><<a href="mailto:alexander.chriztopher@gmail.com">alexander.chriztopher@gmail.com</a>></span><br>Date: Mon, Nov 3, 2014 at 9:44 AM<br>Subject: Re: [keycloak-user] Java API documentation<br>To: Stian Thorgersen <<a href="mailto:stian@redhat.com">stian@redhat.com</a>><br><br><br><div dir="ltr">Hi Stian,<div><br></div><div>I have opened an issue here : <a href="https://issues.jboss.org/browse/KEYCLOAK-811" target="_blank">https://issues.jboss.org/browse/KEYCLOAK-811</a></div><div><br></div><div>Thanks for your help.</div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Nov 3, 2014 at 9:30 AM, Stian Thorgersen <span dir="ltr"><<a href="mailto:stian@redhat.com" target="_blank">stian@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span><br>
<br>
----- Original Message -----<br>
> From: "Alexander Chriztopher" <<a href="mailto:alexander.chriztopher@gmail.com" target="_blank">alexander.chriztopher@gmail.com</a>><br>
> To: "Kamal Jagadevan" <<a href="mailto:j.kamal@ymail.com" target="_blank">j.kamal@ymail.com</a>><br>
> Cc: <a href="mailto:keycloak-user@lists.jboss.org" target="_blank">keycloak-user@lists.jboss.org</a><br>
</span><span>> Sent: Friday, 31 October, 2014 4:59:24 PM<br>
> Subject: Re: [keycloak-user] Java API documentation<br>
><br>
</span><span>> I have upgraded to 1.0.4.Final but still have the issue.<br>
><br>
> I would consider this as a bug in Keycloak -well in the client at least- as<br>
> am using Wildfly and i am embedding the Jackson dependencies with my war<br>
> anyway. These dependencies are pulled by the Keycloak ones.<br>
><br>
> @Keycloak team : should i open an issue for this one ?<br>
<br>
</span>Sure<br>
<span><br>
><br>
> On Wed, Oct 29, 2014 at 8:16 PM, Kamal Jagadevan < <a href="mailto:j.kamal@ymail.com" target="_blank">j.kamal@ymail.com</a> > wrote:<br>
><br>
><br>
><br>
> Hi Alexander,<br>
> On a second look, my problem was with my tomcat application that integrates<br>
> with Keycloak. This tomcat application was using fasterxml jackson parser<br>
> whereas keycloak implementation uses codehaus jackson which gets overridden<br>
> during runtime. I was able to overcome this problem by creating<br>
> PropertyNamingStrategy and set it to ObjectMapper before deserializing the<br>
> JSON.<br>
><br>
> Alternatively Keycloak implementation can be modified to use fasterxml<br>
> jackson databinding.<br>
><br>
> -Kamal<br>
><br>
><br>
</span><div><div>> From: Alexander Chriztopher < <a href="mailto:alexander.chriztopher@gmail.com" target="_blank">alexander.chriztopher@gmail.com</a> ><br>
> To: Kamal Jagadevan < <a href="mailto:j.kamal@ymail.com" target="_blank">j.kamal@ymail.com</a> ><br>
> Cc: " <a href="mailto:keycloak-user@lists.jboss.org" target="_blank">keycloak-user@lists.jboss.org</a> " < <a href="mailto:keycloak-user@lists.jboss.org" target="_blank">keycloak-user@lists.jboss.org</a> ><br>
> Sent: Monday, October 27, 2014 12:54 PM<br>
> Subject: Re: [keycloak-user] Java API documentation<br>
><br>
> Hi Kamal and thanks.<br>
><br>
> Am using the keycloak admin client which brings the following Jackson<br>
> dependency : jackson-core-asl:1.9.9 and can not override this. I also don't<br>
> have the option to change the property mapping as it comes with the Keycloak<br>
> distribution am using :-(<br>
><br>
><br>
><br>
> On Mon, Oct 27, 2014 at 4:54 PM, Kamal Jagadevan < <a href="mailto:j.kamal@ymail.com" target="_blank">j.kamal@ymail.com</a> > wrote:<br>
><br>
><br>
><br>
> Hi Alexander,<br>
> I had faced the same problem few days back it is because of the mismatch<br>
> between JSONProperty and POJO variable name(getter method) that too with<br>
> fasterxml jackson parser.<br>
> If you use codehaus jackson parser you wouldnt get any problem. One work<br>
> around to this problem is to update the POJO variable name to reflect the<br>
> JSONProperty name.<br>
> Similar problem is observed in multiple places where deserialization kicks<br>
> in..<br>
><br>
> Specifically it is because of this<br>
><br>
> @JsonProperty(" access_token ")<br>
> protected String token ;<br>
><br>
> Hi Bill,<br>
> Do you have any other ideas besides updating POJOs member variable name<br>
> matching the JSON property? Please advise.<br>
><br>
> Thanks<br>
> Kamal<br>
><br>
><br>
><br>
</div></div><div><div>> From: Alexander Chriztopher < <a href="mailto:alexander.chriztopher@gmail.com" target="_blank">alexander.chriztopher@gmail.com</a> ><br>
> To: " <a href="mailto:keycloak-user@lists.jboss.org" target="_blank">keycloak-user@lists.jboss.org</a> " < <a href="mailto:keycloak-user@lists.jboss.org" target="_blank">keycloak-user@lists.jboss.org</a> ><br>
> Sent: Monday, October 27, 2014 11:45 AM<br>
> Subject: [keycloak-user] Java API documentation<br>
><br>
> Hi All,<br>
> Am using Keycloak 1.0.2.Final and am getting this error when using the rest<br>
> API :<br>
> Caused by: com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException :<br>
> Unrecognized field "access_token" (class<br>
> org.keycloak.representations.AccessTokenResponse), not marked as ignorable<br>
> (7 known properties: "tokenType", "notBeforePolicy", "token", "expiresIn",<br>
> "sessionState", "refreshToken", "idToken"])<br>
> at [Source: org.apache.http.conn.EofSensorInputStream@11b8a95d; line: 1,<br>
> column: 18] (through reference chain:<br>
> org.keycloak.representations.AccessTokenResponse["access_token"])<br>
> at com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException.from(<br>
> UnrecognizedPropertyException.java:51 ) [jackson-databind-2.3.2.jar:2.3.2]<br>
> at<br>
> com.fasterxml.jackson.databind.DeserializationContext.reportUnknownProperty(<br>
> DeserializationContext.java:671 ) [jackson-databind-2.3.2.jar:2.3.2]<br>
> at<br>
> com.fasterxml.jackson.databind.deser.std.StdDeserializer.handleUnknownProperty(<br>
> StdDeserializer.java:771 ) [jackson-databind-2.3.2.jar:2.3.2]<br>
> at<br>
> com.fasterxml.jackson.databind.deser.BeanDeserializerBase.handleUnknownProperty(<br>
> BeanDeserializerBase.java:1297 ) [jackson-databind-2.3.2.jar:2.3.2]<br>
> at<br>
> com.fasterxml.jackson.databind.deser.BeanDeserializerBase.handleUnknownVanilla(<br>
> BeanDeserializerBase.java:1275 ) [jackson-databind-2.3.2.jar:2.3.2]<br>
> at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(<br>
> BeanDeserializer.java:247 ) [jackson-databind-2.3.2.jar:2.3.2]<br>
> at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(<br>
> BeanDeserializer.java:118 ) [jackson-databind-2.3.2.jar:2.3.2]<br>
> at com.fasterxml.jackson.databind.ObjectReader._bind( ObjectReader.java:1233<br>
> ) [jackson-databind-2.3.2.jar:2.3.2]<br>
> at com.fasterxml.jackson.databind.ObjectReader.readValue(<br>
> ObjectReader.java:677 ) [jackson-databind-2.3.2.jar:2.3.2]<br>
> at<br>
> org.jboss.resteasy.plugins.providers.jackson.ResteasyJackson2Provider.readFrom(<br>
> ResteasyJackson2Provider.java:120 )<br>
> [resteasy-jackson2-provider-3.0.8.Final.jar:]<br>
> at<br>
> org.jboss.resteasy.core.interception.AbstractReaderInterceptorContext.readFrom(<br>
> AbstractReaderInterceptorContext.java:59 ) [resteasy-jaxrs-3.0.8.Final.jar:]<br>
> at<br>
> org.jboss.resteasy.core.interception.AbstractReaderInterceptorContext.proceed(<br>
> AbstractReaderInterceptorContext.java:51 ) [resteasy-jaxrs-3.0.8.Final.jar:]<br>
> at<br>
> org.jboss.resteasy.security.doseta.DigitalVerificationInterceptor.aroundReadFrom(<br>
> DigitalVerificationInterceptor.java:32 ) [resteasy-crypto-3.0.8.Final.jar:]<br>
> at<br>
> org.jboss.resteasy.core.interception.AbstractReaderInterceptorContext.proceed(<br>
> AbstractReaderInterceptorContext.java:53 ) [resteasy-jaxrs-3.0.8.Final.jar:]<br>
> at<br>
> org.jboss.resteasy.plugins.interceptors.encoding.GZIPDecodingInterceptor.aroundReadFrom(<br>
> GZIPDecodingInterceptor.java:59 ) [resteasy-jaxrs-3.0.8.Final.jar:]<br>
> at<br>
> org.jboss.resteasy.core.interception.AbstractReaderInterceptorContext.proceed(<br>
> AbstractReaderInterceptorContext.java:53 ) [resteasy-jaxrs-3.0.8.Final.jar:]<br>
> at org.jboss.resteasy.client.jaxrs.internal.ClientResponse.readFrom(<br>
</div></div>> ClientResponse.java:248 ) [resteasy-client-3.0.8.Final.jar:]<br>
<div><div>> ... 164 more<br>
><br>
> Was wondering where this comes from as am using the 1.0.2.Final admin api and<br>
> have updated my Wildfly Server accordingly.<br>
><br>
> _______________________________________________<br>
> keycloak-user mailing list<br>
> <a href="mailto:keycloak-user@lists.jboss.org" target="_blank">keycloak-user@lists.jboss.org</a><br>
> <a href="https://lists.jboss.org/mailman/listinfo/keycloak-user" target="_blank">https://lists.jboss.org/mailman/listinfo/keycloak-user</a><br>
><br>
><br>
><br>
><br>
><br>
><br>
> _______________________________________________<br>
> keycloak-user mailing list<br>
> <a href="mailto:keycloak-user@lists.jboss.org" target="_blank">keycloak-user@lists.jboss.org</a><br>
> <a href="https://lists.jboss.org/mailman/listinfo/keycloak-user" target="_blank">https://lists.jboss.org/mailman/listinfo/keycloak-user</a><br>
</div></div></blockquote></div><br></div>
</div></div></div><br></div>