Summary

Provide a way to customize the token response being extracted by OAuth2BodyExtractors before parsing it.

Current Behavior Using WebClient to authenticate against a server that returns custom JSON Response, for example: {"Token":"xyz"}, where "xyz" is the token and "bearer" is the type, but since the server doesn't follow the right naming convention and some properties are missing, I can't read the token.

Desired Behavior A way to customize the raw Map<String, Object> before it gets decoded by OAuth2BodyExtractors

Comment From: jzheaux

Thanks for the suggestion, @bishoybasily. I think it makes sense to add a setBodyExtractor method to AbstractWebClientReactiveOAuth2AccessTokenResponseClient. This would allow an application to take the ReactiveHttpInputMessage and transform it in the way that they need to.

Are you able to submit a PR to add this?

Comment From: bishoybasily

Hi @jzheaux, Yes submitted Please check #10269