Description
Describe the bug
I'm trying to set up an OAuth2 client against okta with private_key_jwt authentication and client_credentials flow, in Reactive context (not Servlet).
But when I try to use a NimbusJwtClientAuthenticationParametersConverter<>(jwkResolver) with a private key I cannot add the converter to WebClientReactiveClientCredentialsTokenResponseClient.
The converter is appliable only to DefaultClientCredentialsTokenResponseClient, while WebClientReactiveClientCredentialsTokenResponseClient lacks of support for private_key_jwt.
To Reproduce
OAuth2ClientCredentialsGrantRequestEntityConverter requestEntityConverter = new OAuth2ClientCredentialsGrantRequestEntityConverter();
requestEntityConverter.addParametersConverter(new NimbusJwtClientAuthenticationParametersConverter<>(jwkResolver));
// DefaultClientCredentialsTokenResponseClient clientCredentialsTokenResponseClient = new DefaultClientCredentialsTokenResponseClient();
// clientCredentialsTokenResponseClient.setRequestEntityConverter(requestEntityConverter);
WebClientReactiveClientCredentialsTokenResponseClient wc = new WebClientReactiveClientCredentialsTokenResponseClient();
// wc.setWebClient(webClient); // questo dovrà essere compatibile con proxy e mtls
ClientCredentialsReactiveOAuth2AuthorizedClientProvider prov = new ClientCredentialsReactiveOAuth2AuthorizedClientProvider();
prov.setAccessTokenResponseClient(wc);
authorizedClientManager.setAuthorizedClientProvider(prov);
ServerOAuth2AuthorizedClientExchangeFilterFunction oauth = new ServerOAuth2AuthorizedClientExchangeFilterFunction(
authorizedClientManager);
oauth.setDefaultClientRegistrationId("buyerbank");
Expected behavior
wc.setRequestEntityConverter(requestEntityConverter);
(I think is a bug, not a enhancemente request)