-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Injecting into custom ClientRequestFilter does not work with Reactive RestClient #16540
Comments
/cc @FroMage, @geoand, @stuartwdouglas |
Good point. We should fix this one. I'll take a later this week |
Hey @geoand - thanks - let me know please if i can help somehow - I was just typing a line suggesting that it should be reproducible with a custom test filter injecting some test bean (no need to use OidcClientFilter) - perhaps I can help with a reproducer, etc |
Thanks for the offer @sberyozkin :). I know exactly what this doesn't work and I am already refactoring the client code a little for #16615, so this will fit it nicely one I'm done with the other issue |
@geoand, Np at all, cool, great you are already aware of where the problem is :-) |
Actually, I tried this and could not reproduce this issue. I took https://github.com/quarkusio/quarkus-quickstarts/tree/development/rest-client-reactive-quickstart and added: @Provider
public class MyFilter implements ClientRequestFilter {
@Inject
HttpServerRequest httpServerRequest;
@Override
public void filter(ClientRequestContext requestContext) throws IOException {
System.out.println(httpServerRequest.absoluteURI());
}
} while also adding |
Hi @geoand thanks, let me try to add a reactive rest client/oidc filter integration test based on your enhancement earlier and see what happens :-) |
Thanks @sberyozkin. If you come up with a reproducer of the problem, I'd love to see it :) |
So indeed
from https://docs.oracle.com/javaee/7/api/javax/ws/rs/client/ClientRequestFilter.html Was this not the case with the old rest-client? |
It works OK here since it is registered as a provider here. I don't really mind adding |
@michalszynkiewicz I think that we should register the class in |
NP! |
Actually the test passes now - it is just that the reactive client is a bit sensitive to the lack of Cheers |
Yeah, let's keep this open for the CDI enhancement |
…e rest client Fixes: quarkusio#16540
#16673 contains the CDI enhancement |
…e rest client Fixes: quarkusio#16540
…e rest client Fixes: quarkusio#16540
…e rest client Fixes: quarkusio#16540
Make providers registered with @RegisterProvider CDI beans in reactive rest client
Describe the bug
Reported by Simone DiCola.
For example, injecting a
RequestScoped
Tokens
shipped withquarkus-oidc-client
into a custom filter:works with
quarkus-rest-client
but it isnull
withquarkus-rest-client-reactive
.The text was updated successfully, but these errors were encountered: