As I have been discussing in this question, I would like to use a REST client defined as an interface in a Keycloak provider (specifically a OIDCAccessTokenMapper). For example, the REST client could be defined as follows:
@RegisterRestClient()
@Path("/my-path")
@Produces(MediaType.APPLICATION_JSON)
@Consumes(MediaType.APPLICATION_FORM_URLENCODED)
public interface TokenRestInterface{
@POST
@Path("/token")
TokenDtoResponse getToken(@HeaderParam("User-Id") Integer userId, @FormParam("client_id") String clientId, @FormParam("client_secret") String clientSecret, @FormParam("grant_type") String grantType);
}
After some research, I have figured out that there is no library included in the Keycloak server that allows me to do this, so I had to install resteasy-client. Are there really no libraries that allow this? It seems strange to me.
Thanks.