<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On 5 February 2016 at 08:16, PAA KOJO KONDUAH AMOS <span dir="ltr">&lt;<a href="mailto:pkkamos@gmail.com" target="_blank">pkkamos@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div lang="EN-US" link="blue" vlink="#954F72"><div><p class="MsoNormal">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.</p><p class="MsoNormal"><u></u> <u></u></p><p style="margin-left:31.5pt"><u></u><span>1.<span style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:7pt;line-height:normal;font-family:&#39;Times New Roman&#39;">      </span></span><u></u>Dependency definition:<u></u><u></u></p><p><u></u> <u></u></p><p class="MsoNormal" style="margin-left:0.25in"><b><span style="color:rgb(46,117,182)">                &lt;dependency&gt;<u></u><u></u></span></b></p><p class="MsoNormal" style="margin-left:0.25in"><b><span style="color:rgb(46,117,182)">                                  &lt;groupId&gt;org.keycloak&lt;/groupId&gt;<u></u><u></u></span></b></p><p class="MsoNormal" style="margin-left:0.25in"><b><span style="color:rgb(46,117,182)">                                  &lt;artifactId&gt;keycloak-admin-client&lt;/artifactId&gt;<u></u><u></u></span></b></p><p class="MsoNormal" style="margin-left:0.25in"><b><span style="color:rgb(46,117,182)">                                  &lt;version&gt;1.9.0.CR1&lt;/version&gt;<u></u><u></u></span></b></p><p class="MsoNormal" style="margin-left:0.25in"><b><span style="color:rgb(46,117,182)">                    &lt;/dependency&gt;</span></b><u></u><u></u></p><p class="MsoNormal" style="margin-left:0.25in"><u></u> <u></u></p><p style="margin-left:31.5pt"><u></u><span>2.<span style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:7pt;line-height:normal;font-family:&#39;Times New Roman&#39;">      </span></span><u></u>created a <b>jboss-deployment-structure.xml</b> file, placed it in my <b>WEB-INF</b> folder ,with the following content(<b>This ensures Jackson2 is used</b>)[Credit: <a href="https://docs.jboss.org/resteasy/docs/3.0.2.Final/userguide/html/json.html" target="_blank">https://docs.jboss.org/resteasy/docs/3.0.2.Final/userguide/html/json.html</a>, 21.4. Using Jackson 2.2.x Inside of JBoss AS7]:<u></u><u></u></p><p class="MsoNormal" style="margin-left:13.5pt">                 <b><span style="color:rgb(46,117,182)">&lt;jboss-deployment-structure&gt;<u></u><u></u></span></b></p><p class="MsoNormal" style="margin-left:13.5pt"><b><span style="color:rgb(46,117,182)">                               &lt;deployment&gt;<u></u><u></u></span></b></p><p class="MsoNormal" style="margin-left:13.5pt"><b><span style="color:rgb(46,117,182)">                                        &lt;exclusions&gt;<u></u><u></u></span></b></p><p class="MsoNormal" style="margin-left:13.5pt"><b><span style="color:rgb(46,117,182)"><u></u> <u></u></span></b></p><p class="MsoNormal" style="margin-left:13.5pt"><b><span style="color:rgb(46,117,182)">                                             &lt;module name=&quot;org.jboss.resteasy.resteasy-jackson-provider&quot; /&gt;<u></u><u></u></span></b></p><p class="MsoNormal" style="margin-left:13.5pt"><b><span style="color:rgb(46,117,182)">                                     &lt;/exclusions&gt;<u></u><u></u></span></b></p><p class="MsoNormal" style="margin-left:13.5pt"><b><span style="color:rgb(46,117,182)">                                   &lt;dependencies&gt;<u></u><u></u></span></b></p><p class="MsoNormal" style="margin-left:13.5pt"><b><span style="color:rgb(46,117,182)">                                          &lt;module name=&quot;org.jboss.resteasy.resteasy-jackson2-provider&quot;<u></u><u></u></span></b></p><p class="MsoNormal" style="margin-left:13.5pt"><b><span style="color:rgb(46,117,182)">                                                     services=&quot;import&quot; /&gt;<u></u><u></u></span></b></p><p class="MsoNormal" style="margin-left:13.5pt"><b><span style="color:rgb(46,117,182)">                                  &lt;/dependencies&gt;<u></u><u></u></span></b></p><p class="MsoNormal" style="margin-left:13.5pt"><b><span style="color:rgb(46,117,182)">                          &lt;/deployment&gt;<u></u><u></u></span></b></p><p class="MsoNormal" style="margin-left:13.5pt"><b><span style="color:rgb(46,117,182)">                 &lt;/jboss-deployment-structure&gt;</span></b>                       </p></div></div></blockquote><div><br></div><div>You shouldn&#39;t need the jboss-deployment-structure.xml at all if you are using a recent version of WildFly as Jackson2 is the default.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div lang="EN-US" link="blue" vlink="#954F72"><div><p class="MsoNormal" style="margin-left:13.5pt"><u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Sent from <a href="https://go.microsoft.com/fwlink/?LinkId=550986" target="_blank">Mail</a> for Windows 10</p><p class="MsoNormal"><span style="font-size:12pt;font-family:&#39;Times New Roman&#39;,serif"><u></u> <u></u></span></p><div style="border-style:solid none none;border-top-color:rgb(225,225,225);border-top-width:1pt;padding:3pt 0in 0in"><p class="MsoNormal" style="border:none;padding:0in"><b>From: </b><a href="mailto:sthorger@redhat.com" target="_blank">Stian Thorgersen</a><br><b>Sent: </b>Wednesday, February 3, 2016 12:57 PM<br><b>To: </b><a href="mailto:pkkamos@gmail.com" target="_blank">PAA KOJO KONDUAH AMOS</a><br><b>Cc: </b><a href="mailto:keycloak-user@lists.jboss.org" target="_blank">keycloak-user@lists.jboss.org</a><br><b>Subject: </b>Re: [keycloak-user] KeyCloak Admin Client :</p></div><p class="MsoNormal"><span style="font-size:12pt;font-family:&#39;Times New Roman&#39;,serif"><u></u> <u></u></span></p><div><p class="MsoNormal"><span style="font-size:12pt;font-family:&#39;Times New Roman&#39;,serif">In the past the admin client required Jackson 1.x and didn&#39;t work with Jackson 2.x. This is being fixed in 1.9.</span><span style="font-size:12pt;font-family:&#39;Times New Roman&#39;,serif"><u></u><u></u></span></p><div><p class="MsoNormal"><span style="font-size:12pt;font-family:&#39;Times New Roman&#39;,serif"><u></u> <u></u></span></p></div><div><p class="MsoNormal"><span style="font-size:12pt;font-family:&#39;Times New Roman&#39;,serif">To make it work you&#39;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&#39;t exactly that.<u></u><u></u></span></p></div></div><div><p class="MsoNormal"><span style="font-size:12pt;font-family:&#39;Times New Roman&#39;,serif"><u></u> <u></u></span></p><div><p class="MsoNormal"><span style="font-size:12pt;font-family:&#39;Times New Roman&#39;,serif">On 3 February 2016 at 13:35, PAA KOJO KONDUAH AMOS &lt;<a href="mailto:pkkamos@gmail.com" target="_blank">pkkamos@gmail.com</a>&gt; wrote:<u></u><u></u></span></p><blockquote style="border-style:none none none solid;border-left-color:rgb(204,204,204);border-left-width:1pt;padding:0in 0in 0in 6pt;margin-left:4.8pt;margin-right:0in"><div><div><p class="MsoNormal">Hello, I have tried out KeyCloak Admin Client. In fact, I have done a standalone application which works nicely with KeyCloak Server.<u></u><u></u></p><p class="MsoNormal"> </p><p class="MsoNormal">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:</p><p class="MsoNormal"> </p><p class="MsoNormal"><b><span style="color:rgb(46,117,182)">Caused by: javax.ws.rs.ProcessingException: com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field &quot;access_token&quot; (class org.keycloak.representations.AccessTokenResponse), not marked as ignorable (9 known properties: &quot;notBeforePolicy&quot;, &quot;otherClaims&quot;, &quot;tokenType&quot;, &quot;token&quot;, &quot;expiresIn&quot;, &quot;sessionState&quot;, &quot;refreshExpiresIn&quot;, &quot;idToken&quot;, &quot;refreshToken&quot;])</span></b></p><p class="MsoNormal"><b><span style="color:rgb(46,117,182)"> </span></b></p><p class="MsoNormal"><b><span style="color:rgb(46,117,182)"> </span></b></p><p class="MsoNormal"><span style="color:black">Any lead on how to resolve all these maven dependency issues?</span></p><p class="MsoNormal"><span style="color:black"> </span></p><p class="MsoNormal"><span style="color:black"> </span></p><p class="MsoNormal"><span style="color:black">Thanks.</span></p><p class="MsoNormal"> </p><p class="MsoNormal">Sent from <a href="http://go.microsoft.com/fwlink/?LinkId=550986" target="_blank">Mail</a> for Windows 10</p><p class="MsoNormal"><span style="font-size:12pt;font-family:&#39;Times New Roman&#39;,serif;color:rgb(46,117,182)"> </span></p></div></div><p class="MsoNormal"><span style="font-size:12pt;font-family:&#39;Times New Roman&#39;,serif"><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><u></u><u></u></span></p></blockquote></div></div><p class="MsoNormal"><span style="font-size:12pt;font-family:&#39;Times New Roman&#39;,serif"><u></u> <u></u></span></p><p class="MsoNormal"><u></u> <u></u></p></div></div></blockquote></div><br></div></div>