Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upOAuth2LoginSpec discovers ReactiveOAuth2AccessTokenResponseClient @Bean #6477
Comments
jgrandja
added
Reactive
OAuth2
first-timers-only
labels
Jan 23, 2019
jgrandja
added this to the 5.2.0.M2 milestone
Jan 23, 2019
jgrandja
added
Java Config
Improvement
labels
Jan 23, 2019
This comment has been minimized.
This comment has been minimized.
Hello @jgrandja Does this have to do with autowiring that bean? I’ll like to work on it regardless. |
This comment has been minimized.
This comment has been minimized.
@darthCodr Yes, it's all about wiring the |
This comment has been minimized.
This comment has been minimized.
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. |
jgrandja
self-assigned this
Jan 28, 2019
This comment has been minimized.
This comment has been minimized.
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 |
This comment has been minimized.
This comment has been minimized.
Hello, @jgrandja
At what point do I invoke/call |
This comment has been minimized.
This comment has been minimized.
You would call it in |
This comment has been minimized.
This comment has been minimized.
Hello @jgrandja I have implemented this and it's fine. |
This comment has been minimized.
This comment has been minimized.
The tests should go in |
This comment has been minimized.
This comment has been minimized.
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. |
This comment has been minimized.
This comment has been minimized.
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? |
jgrandja commentedJan 23, 2019
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()
.