How i can integrate the Keycloak with Payara Micro?
I want create an stateless REST JAX-RS application that use the Keycloak as authentication and authorization server, but i unknown how do it.
The Eclipse MicroProfile JWT Authentication API defines the @LoginConfig
annotation:
@LoginConfig(authMethod = "MP-JWT", realmName = "admin-realm")
@ApplicationPath("/")
public class MyApplication extends Application {...}
And the java EE the @RolesAllowed
annotation:
@Path("/api/v1/books")
public class BooksController {
@GET
@RolesAllowed("read-books")
public Books findAll() {...}
}
How integrate these two things?