You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using quarkus-openapi-generator (open-api JSON file) and with "Bearer Token" security context ...
When executing retries (eg waiting for a "not ready" content), the AUTHORIZATION header value is provided several times by the generated REST client (one more for each retry)
Uni<String> res = clientRestService.getSomeData().onItem().transform( response->{
switch( response.getJobStatus() ) {
case COMPLETED:
return "ok";
default:
throw new NotReadyException();
}
})
.onFailure( NotReadyException.class ).retry().withBackOff(Duration.ofSeconds(3), Duration.ofSeconds(3)).atMost(5);
Comments
clientRestService is the client API generated by quarkus-openapi-generator
clientRestService is decorated with @RegisterProvider(com.xxx.api.auth.CompositeAuthenticationProvider.class) which is responsible for adding AUTHORIZATION Header
For the 1st time the AUTHORIZATION header is provided with 1 value : "token-string" => correct
At the 5th time the AUTHORIZATION header is provided with 5x values "token-string ... token-string"=> too much !
I don't know what should be done
Option 1 - the AUTHORIZATION headers should be cleaned before "adding" => my workoaround at this time (I add a filter that set the AUTH header with an empty list )
Option 2 - the Auth provider should prevent for duplicate values
The text was updated successfully, but these errors were encountered:
Using quarkus-openapi-generator (open-api JSON file) and with "Bearer Token" security context ...
When executing retries (eg waiting for a "not ready" content), the AUTHORIZATION header value is provided several times by the generated REST client (one more for each retry)
Comments
clientRestService is the client API generated by quarkus-openapi-generator
clientRestService is decorated with @RegisterProvider(com.xxx.api.auth.CompositeAuthenticationProvider.class) which is responsible for adding AUTHORIZATION Header
For the 1st time the AUTHORIZATION header is provided with 1 value : "token-string" => correct
At the 5th time the AUTHORIZATION header is provided with 5x values "token-string ... token-string"=> too much !
I don't know what should be done
Option 1 - the AUTHORIZATION headers should be cleaned before "adding" => my workoaround at this time (I add a filter that set the AUTH header with an empty list )
Option 2 - the Auth provider should prevent for duplicate values
The text was updated successfully, but these errors were encountered: