am looking for a sample quarkus reactive project with multiple OidcClients to make multiple service calls?
Eg: DemoProject wants to call service A, B, C, D. DemoProject used keycloak authorization with grant type as password. Service A has OidcClientA, service B has OidcClientB, service C has OidcClientC, Service D has OidcClientD. How can we simply inject OidcClient into a specific service and fetching the specific token, authorization header to a specific service automatically?
Quarkus Documentation: https://quarkus.io/guides/security-openid-connect-client
I couldn't find any sample project, but i think that you just need to configure the named clients in your properties files and they will be accesible through the
OidcClients
class.Here you can find more information.
If you are going to consume each service individually I would suggest you create a facade or a service in front of the rest client to deal with this complexity or maybe a filter for each service rest-client