We should provide a reactive implementation equivalent of AuthorizedClientServiceOAuth2AuthorizedClientManager.
Comment From: ankurpathak
@jgrandja I would like to take this one.
Comment From: jgrandja
Thank you @ankurpathak. Let me know if you have any questions.
Comment From: ankurpathak
@jgrandja Here is early pull request for this issue, just to understand if I am on right path. Expect your feedback. https://github.com/spring-projects/spring-security/pull/7589
Comment From: jgrandja
@ankurpathak I took a look at #7589 and yes this is the implementation I was expecting.
Comment From: ghostd
HI,
Can we expect a sample (in the repo or in the official documentation or elsewhere) showing how to combine those classes to run a batch (or some code without web context) with OAuth ?
Regards
Comment From: ankurpathak
@jgrandja Here is complete pull request with tests. I have some confusion on name of class and instance variables. So lets agree with some commons on them and if it needs any modification do let me know.
Comment From: frzme
I think it is rather unfortunate that this feature which supported in spring security 5.1 is being treated as an addition. I think it should be treated as an regression and therefore fixed within the scope of the 5.2 release and not postponed till 5.3. Using the "wrong" (previously working) DefaultClientManager fails transparently - for users it looks like it might be working, it's just re-requesting oauth tokens with every request, which makes it rather hard to spot the error.
I'm fine with a natively supported alternate configuration but hope that it can make it to 5.2.x.
Comment From: jgrandja
@frzme Please see comment
Comment From: justinmusgrove
@ghostd - was wondering if sample was documented as I am looking to run this within spring data flow. I was following @rwinch example https://github.com/rwinch/webclientoauth2-cli, then running into "Authorization required for Client Registration Id" as I was trying to programmatically provide a user. Any direction would be appreciated. Thanks!
Comment From: jgrandja
@justinmusgrove It was recently documented in the reference. This references the Servlet implementation as the reactive is not documented yet, but it's the same approach just different classes.
Comment From: abhi2495
Hey @justinmusgrove @jgrandja You can use the following code : Spring WebFlux Security- Client config - OAuth2.0 Client Credentials Flow
I too hope this gets documented quickly so that it becomes easy for everyone
Comment From: seetharam-hub
org.springframework.security.oauth2.client.web.DefaultOAuth2AuthorizedClientManager