<div dir="ltr">To read the token the user has to have the broker.read-token permission. The client also needs a scope on it. Please take a look at <a href="http://keycloak.github.io/docs/userguide/keycloak-server/html/identity-broker.html#d4e2198">http://keycloak.github.io/docs/userguide/keycloak-server/html/identity-broker.html#d4e2198</a></div><div class="gmail_extra"><br><div class="gmail_quote">On 3 March 2016 at 20:28, Andreas Cserinko <span dir="ltr"><<a href="mailto:a.cserinko@gmail.com" target="_blank">a.cserinko@gmail.com</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"><font color="#000000" face="arial, helvetica, sans-serif">Hey guys!</font><div><font color="#000000" face="arial, helvetica, sans-serif"><br></font></div><div><font color="#000000" face="arial, helvetica, sans-serif">I've been trying since a few days to make a rest-call to '/realms/myrealm/broker/google/token'</font></div><div><font color="#000000" face="arial, helvetica, sans-serif">from my Java-code. But when I send the request, the response says that the token is invalid. I have no clue what token to use. </font></div><div><font color="#000000" face="arial, helvetica, sans-serif"><br></font></div><div><font color="#000000" face="arial, helvetica, sans-serif">Can anybody please describe the flow of how to obtain the right tokens, or post some examples how to solve the problem. I looked at the example on GitHub (<a href="https://github.com/keycloak/keycloak/tree/master/examples/broker/facebook-authentication" target="_blank">https://github.com/keycloak/keycloak/tree/master/examples/broker/facebook-authentication</a>) but this example don't fit my needs because it is client-side.</font></div><div><font color="#000000" face="arial, helvetica, sans-serif"><br></font></div><div><font color="#000000" face="arial, helvetica, sans-serif">Any help would be appreciated, thanks!</font></div><div><font color="#000000" face="arial, helvetica, sans-serif"><br></font></div><div><font color="#000000" face="arial, helvetica, sans-serif">Thank you,</font></div><div><font color="#000000" face="arial, helvetica, sans-serif">Andreas</font></div></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>