-
Notifications
You must be signed in to change notification settings - Fork 5.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide reactive implementation of AuthorizedClientServiceOAuth2AuthorizedClientManager #7569
Comments
@jgrandja I would like to take this one. |
Thank you @ankurpathak. Let me know if you have any questions. |
@ankurpathak I took a look at #7589 and yes this is the implementation I was expecting. |
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 |
@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. |
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. |
…entManager ReactiveOAuth2AuthorizedClientServiceReactiveOAuth2AuthorizedClientManager is reactive version of AuthorizedClientServiceOAuth2AuthorizedClientManager Fixes: spring-projectsgh-7569
Rename OAuth2AuthorizedClientServiceReactiveOAuth2AuthorizedClientManager to AuthorizedClientServiceReactiveOAuth2AuthorizedClientManager. Handle empty mono returned from contextAttributesMapper. Handle empty map returned from contextAttributesMapper. Fix DefaultContextAttributesMapper so that it doesn't access ServerWebExchange. Fix unit tests so that they pass. Use StepVerifier in unit tests, rather than .subscribe(). Fixes spring-projectsgh-7569
Rename OAuth2AuthorizedClientServiceReactiveOAuth2AuthorizedClientManager to AuthorizedClientServiceReactiveOAuth2AuthorizedClientManager. Handle empty mono returned from contextAttributesMapper. Handle empty map returned from contextAttributesMapper. Fix DefaultContextAttributesMapper so that it doesn't access ServerWebExchange. Fix unit tests so that they pass. Use StepVerifier in unit tests, rather than .subscribe(). Fixes gh-7569
…entManager ReactiveOAuth2AuthorizedClientServiceReactiveOAuth2AuthorizedClientManager is reactive version of AuthorizedClientServiceOAuth2AuthorizedClientManager Fixes: gh-7569
Rename OAuth2AuthorizedClientServiceReactiveOAuth2AuthorizedClientManager to AuthorizedClientServiceReactiveOAuth2AuthorizedClientManager. Handle empty mono returned from contextAttributesMapper. Handle empty map returned from contextAttributesMapper. Fix DefaultContextAttributesMapper so that it doesn't access ServerWebExchange. Fix unit tests so that they pass. Use StepVerifier in unit tests, rather than .subscribe(). Fixes gh-7569
@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! |
@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. |
Hey @justinmusgrove @jgrandja I too hope this gets documented quickly so that it becomes easy for everyone |
org.springframework.security.oauth2.client.web.DefaultOAuth2AuthorizedClientManager |
We should provide a reactive implementation equivalent of
AuthorizedClientServiceOAuth2AuthorizedClientManager
.The text was updated successfully, but these errors were encountered: