Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Add ability to use an HTTP client from a custom SPI #31096

@Nahuel92

Description

@Nahuel92

Description

Hi there. I'd like to have an example documented in Keycloak's docs or to ask for a high-level HTTP client inclusion to the Keycloak distribution that users can use when developing their custom SPIs to invoke microservices. Keycloak includes a dependency that uses HTTP but to connect to external Keycloak instances, this is not what I'm trying to achieve.

Discussion

I couldn't solve my issue:

#30949

Motivation

Very old Keycloak versions allow to use an HTTP client to call microservices without much hassle. But Quarkus-based Keycloak distributions make it really hard to use an HTTP client from a custom SPI (although there is a dependency to talk to external Keycloak instances).

The Keycloak documentation doesn't include an example for this, and the Quarkus documentation is stale and a mess, as they have migrated packages' names a couple of times and it's not clear which one is the right approach.

I spent a lot of hours trying to use a simple HTTP client from a custom SPI, but this has been quite challenging. I don't want to use the built-in HTTP client that comes with Java because of its verbosity, I would like to use a higher-level one.

Details

Please add an example of how to use a high-level HTTP client to the custom SPI (similar to what has been done with JPA) if one is already available, or consider including one to the Keycloak distribution so that we can use it.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions