-
Notifications
You must be signed in to change notification settings - Fork 6k
OAuth2LoginSpec discovers ReactiveOAuth2AccessTokenResponseClient @Bean #6477
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
Comments
Hello @jgrandja Does this have to do with autowiring that bean? I’ll like to work on it regardless. |
@darthCodr Yes, it's all about wiring the |
You are welcome. @jgrandja you mentioned that this Will my implementation be in Also, I have looked at 'getOauth2UserService()' and 'getOidcUserService()'. Is there a particular method name you would like me to use? I currently have something like this:
If the bean is null, should I return null? ... as Maybe I didn't understand what you meant by "follow the same pattern". Would appreciate if you could explain more. Many thanks. |
@darthCodr
Yes, this is exactly where you would apply the change.
Let's go with
It should behave as it currently does today, which is defaulting to |
Hello, @jgrandja
At what point do I invoke/call |
You would call it in |
Hello @jgrandja I have implemented this and it's fine. |
The tests should go in |
Hello @jgrandja. I found some existing tests in I know this might be an urgent fix. Should I do a PR regardless then work through the tests together with you from there? Sincere apologies for the delay. |
@darthCodr
No worries, it's not urgent. It's planned for 5.2.0.M2 so we have some time. The tests need to go with the PR so let's keep working through it.
Take a look at Note how it registers: @Bean
public ReactiveJwtDecoderFactory<ClientRegistration> jwtDecoderFactory() {
return jwtDecoderFactory;
} and
and than in the test we verify that the actual
This is the same type of test logic you need to apply for Let me know if this helps? |
Hello @jgrandja the PR failed. I can't place what I did wrong. I would appreciate your help with the tests. Many thanks. |
@darthCodr The issue is with this line
change it to the following and it will pass
You will notice a few lines above the
Also, since you're putting the test in
Thank you! |
@jgrandja All checks finally passed. Grateful for the help and the opportunity to contribute. |
We should allow for a
@Bean
of typeReactiveOAuth2AccessTokenResponseClient<OAuth2AuthorizationCodeGrantRequest>
to be discovered byOAuth2LoginSpec
.This will allow the user to register a
WebClientReactiveAuthorizationCodeTokenResponseClient
@Bean
with a configuredWebClient
viaWebClientReactiveAuthorizationCodeTokenResponseClient.setWebClient()
.The text was updated successfully, but these errors were encountered: