microprofile

Quarkus & Microprofile : Is there a better way to use a property from application.properties into @ClientHeaderParam?

孤街醉人 提交于 2021-02-07 14:34:21
问题 I'm trying to build a simple app that calls an API with quarkus-rest-client . I have to inject an API Key as a header which is the same for all resources of the API. So I would like to put the value of this API Key (that depends on the environment dev/qa/prod ) in the application.properties file located in src/main/resources . I tried different ways to achieve this: Use directly com.acme.Configuration.getKey into @ClientHeaderParam value property Create a StoresClientHeadersFactory class

Quarkus & Microprofile : Is there a better way to use a property from application.properties into @ClientHeaderParam?

一曲冷凌霜 提交于 2021-02-07 14:33:42
问题 I'm trying to build a simple app that calls an API with quarkus-rest-client . I have to inject an API Key as a header which is the same for all resources of the API. So I would like to put the value of this API Key (that depends on the environment dev/qa/prod ) in the application.properties file located in src/main/resources . I tried different ways to achieve this: Use directly com.acme.Configuration.getKey into @ClientHeaderParam value property Create a StoresClientHeadersFactory class

Quarkus Rest Client and OAuth2

我与影子孤独终老i 提交于 2020-08-07 17:46:19
问题 I have a secured micro service that is calling another secured micro service. Both services have service accounts in Keycloak. How can I configure the 1st service to automatically obtain access token from keycloak when calling the 2nd service? It's a simple service to service communication. Does the Quarkus Rest client have an API to do this? If not, how can I do that with the vert.x rest client? 回答1: I was able to make this work by extending the javax.ws.rs.client.ClientRequestFilter.

Quarkus Rest Client and OAuth2

大憨熊 提交于 2020-08-07 17:45:16
问题 I have a secured micro service that is calling another secured micro service. Both services have service accounts in Keycloak. How can I configure the 1st service to automatically obtain access token from keycloak when calling the 2nd service? It's a simple service to service communication. Does the Quarkus Rest client have an API to do this? If not, how can I do that with the vert.x rest client? 回答1: I was able to make this work by extending the javax.ws.rs.client.ClientRequestFilter.

Quarkus Rest Client and OAuth2

断了今生、忘了曾经 提交于 2020-08-07 17:43:16
问题 I have a secured micro service that is calling another secured micro service. Both services have service accounts in Keycloak. How can I configure the 1st service to automatically obtain access token from keycloak when calling the 2nd service? It's a simple service to service communication. Does the Quarkus Rest client have an API to do this? If not, how can I do that with the vert.x rest client? 回答1: I was able to make this work by extending the javax.ws.rs.client.ClientRequestFilter.

Quarkus Rest Client and OAuth2

≡放荡痞女 提交于 2020-08-07 17:42:43
问题 I have a secured micro service that is calling another secured micro service. Both services have service accounts in Keycloak. How can I configure the 1st service to automatically obtain access token from keycloak when calling the 2nd service? It's a simple service to service communication. Does the Quarkus Rest client have an API to do this? If not, how can I do that with the vert.x rest client? 回答1: I was able to make this work by extending the javax.ws.rs.client.ClientRequestFilter.