This gist describes the configuration required for Spring reactive WebClient to make a call to an OAuth2 protected resource through OAuth2.0 Client Credentials Grant Type Flow.
Assumption is that the Authorization Server supports OpenId Connect 1.0 specifications.
@krnbr Hey Karanbir, I think you are using authorization code oauth flow. That's why you are getting redirected. If you can share your code (github link) or post your question in stackoverflow, I would definitely take a look .
In my code, I am trying to access a resource that supports "client credentials" flow. That's why there is no redirection. This is pure machine-to-machine communication.