I'm struggeling to correctly setup the webflux-weblient with oauth2 behind a proxy.
It seems, that the ServerOAuth2AuthorizedClientExchangeFilterFunction uses a new instance of a webclient , which doesn't contain my proxy-configuration.
OAuth2-Config
ServerOAuth2AuthorizedClientExchangeFilterFunction oauth2ClientFilter = new ServerOAuth2AuthorizedClientExchangeFilterFunction(
clientRegistrations,
new UnAuthenticatedServerOAuth2AuthorizedClientRepository());
oauth2ClientFilter.setDefaultClientRegistrationId("azure");
OAuth2AuthorizedClientResolver.class contains:
private ReactiveOAuth2AccessTokenResponseClient<OAuth2ClientCredentialsGrantRequest> clientCredentialsTokenResponseClient = new WebClientReactiveClientCredentialsTokenResponseClient();
The WebClientReactiveClientCredentialsTokenResponseClient.java creates a new webclient as follows:
private WebClient webClient = WebClient.builder().build();
Does anybody have a sample how to correctly setup a http-proxy for the oauth2 client?