<div dir="ltr">Hi Marek,<div>I worked on it during the weekend.</div><div><br></div><div>Now my problem is <span style="font-family:arial,sans-serif;font-size:13px">the header like: Authorization: Bearer &lt;your_access_token&gt; .</span></div>
<div><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div><font face="arial, sans-serif">I&#39;m running the frontend on Tomcat, I made an adapter for it <a href="https://github.com/ungarida/keycloak/">https://github.com/ungarida/keycloak/</a>, I adapted AS7.</font></div>
<div><font face="arial, sans-serif"><br></font></div><div><font face="arial, sans-serif">Now I can not figure out how to retrieve the access token to include it in the JS that call the JAX-RS service.</font></div><div><br>
</div><div><br></div></div><div class="gmail_extra"><br clear="all"><div><div>--</div>Davide</div>
<br><br><div class="gmail_quote">On Mon, Apr 14, 2014 at 8:44 AM, Marek Posolda <span dir="ltr">&lt;<a href="mailto:mposolda@redhat.com" target="_blank">mposolda@redhat.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    <div>Hi Davide,<br>
      <br>
      I think that this exactly is already addressed by our examples.
      You can take a look especially at this example
      <a href="https://github.com/keycloak/keycloak/tree/master/examples/demo-template/database-service" target="_blank">https://github.com/keycloak/keycloak/tree/master/examples/demo-template/database-service</a>
      which is JAX-RS service service based on resteasy, which requires
      Bearer token authentication, so all requests sent to it from
      &quot;frontend&quot; applications like &quot;customer-portal&quot; or &quot;product-portal&quot;
      need to contain header like: Authorization: Bearer
      &lt;your_access_token&gt; .<br>
      <br>
      You can try existing set of examples to see how it all works
      together. See instructions in README files under
      <a href="https://github.com/keycloak/keycloak/tree/master/examples/demo-template" target="_blank">https://github.com/keycloak/keycloak/tree/master/examples/demo-template</a><br>
      <br>
      Marek<div><div class="h5"><br>
      <br>
      On 12.4.2014 10:58, Davide Ungari wrote:<br>
    </div></div></div>
    <blockquote type="cite"><div><div class="h5">
      <div dir="ltr">Hi everybody,
        <div>I configured keycloak with mongodb,<br>
          <div>then I secured frontend on Tomcat making an adapter.</div>
          <div><br>
          </div>
          <div>I need to secure backend, it is an JAX-RS service based
            on resteasy and running on undertow.</div>
          <div><br>
          </div>
          <div>I do not use EJB so I need some help to figure out the
            best way to implement security with keycloak in my scenario.</div>
          <div><br>
          </div>
          <div>Suggestions?</div>
          <div><br clear="all">
            <div>
              <div>--</div>
              Davide</div>
          </div>
        </div>
      </div>
      <br>
      <fieldset></fieldset>
      <br>
      </div></div><pre>_______________________________________________
keycloak-user mailing list
<a href="mailto:keycloak-user@lists.jboss.org" target="_blank">keycloak-user@lists.jboss.org</a>
<a href="https://lists.jboss.org/mailman/listinfo/keycloak-user" target="_blank">https://lists.jboss.org/mailman/listinfo/keycloak-user</a></pre>
    </blockquote>
    <br>
  </div>

</blockquote></div><br></div>