title: How to integrate Keycloak with Payara Micro?
body: <p>How i can integrate the <a href="https://www.keycloak.org/" rel="nofollow noreferrer">Keycloak</a> with <a href="https://www.payara.fish/payara_micro" rel="nofollow noreferrer">Payara Micro</a>?</p>
  
  <p>I want create an stateless REST JAX-RS application that use the Keycloak as authentication and authorization server, but i unknown how do it.</p>
  
  <p>The Eclipse MicroProfile JWT Authentication API defines the <code>@LoginConfig</code> annotation:</p>
  
  <pre><code>@LoginConfig(authMethod = "MP-JWT", realmName = "admin-realm")
  @ApplicationPath("/")
  public class MyApplication extends Application {...}
  </code></pre>
  
  <p>And the java EE the <code>@RolesAllowed</code> annotation:</p>
  
  <pre><code>@Path("/api/v1/books")
  public class BooksController {
  
      @GET
      @RolesAllowed("read-books")
      public Books findAll() {...}
  
  }
  </code></pre>
  
  <p>How integrate these two things?</p>