<div dir="ltr"><a href="http://jwt.io">jwt.io</a> is a bit sensitive you need to select rs256 and paste in the realm public key before passing in the token.<div><br></div><div>Are you actually using both 1.0.4 and 1.4.0? If so it's quite likely that's the reason why the token is failing. The recommended way of verifying the token would be to use the adapters like what you're already doing in your REST service.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On 19 September 2015 at 10:56, Nicholaos Petalidis <span dir="ltr"><<a href="mailto:nikos@petalidis.gr" target="_blank">nikos@petalidis.gr</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi,<div><br></div><div>I would like to ask what is the recommended way for validating a token I received from a keycloak server.</div><div><br></div><div>Specifically, I have the following.</div><div><br></div><div>1. A keycloak server running v. 1.0.4Final.</div><div><br></div><div>2. A javascript client using the js adapter provided for 1.0.4Final</div><div><br></div><div>3. REST services on a wildfly server using 1.4.0 adapter for wildfly 9.</div><div><br></div><div>I use the JS adapter to receive a token from keycloak server.</div><div><br></div><div>The token seems to be a JWT, but when it is included in the Authorization header for the REST request I make to the REST service that is on wildfly I get back an 'invalid signature' response.</div><div><br></div><div>I also fail to verify the token if I enter the relevant info on <a href="http://jwt.io" target="_blank">jwt.io</a> (token and public key).</div><div><br></div><div>So my question is</div><div>1. Does the 1.0.4Final version sign the tokens?</div><div>2. What is the recommended way for the REST service to validate the token present on the Authorization/Bearer header of a REST request?</div><div><br></div><div>Thanks in advance for any answers</div><span class="HOEnZb"><font color="#888888"><div><br clear="all"><div><br></div>-- <br><div><div dir="ltr">Nikos<br></div></div>
</div></font></span></div>
<br>_______________________________________________<br>
keycloak-user mailing list<br>
<a href="mailto:keycloak-user@lists.jboss.org">keycloak-user@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/keycloak-user" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/keycloak-user</a><br></blockquote></div><br></div>