-
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
Allow providing of custom WebClient to the oauth2 resource server configuration #12655
Comments
We have found a way to set the client, but it looks like way too much obfuscated: So the underlying web-client configuration is done with the "main" oauth web-client configuration (we needed to provide a client while building a client - this is way different from what I proposed in the original post). (works for spring-boot version 2.7.5) WebClient that will be used by our app (to do http calls to some business resources):
The
Now the
And finally, the
So this is the client you want to configure with your own pool settings. I would definitely prefer to have it exposed by the sdk somewhere higher.... |
|
@maciejwitwicki, thanks for reaching out. I'm not sure I understand the concern. In your description, you talk about resource server configuration, and then in a subsequent post you talk about client configuration. If what you are primarily concerned about is client configuration, please see #8882 for some background. To participate in the discussion further, follow to the end of that issue to find the current open related issues. As for Resource Server specifically, you can configure a web client in the following way: @Bean
ReactiveJwtDecoder jwtDecoder() {
return NimbusReactiveJwtDecoder.withIssuerLocation("http://issuer.example.org").webClient(web).build();
} Either way, I'm going to close this ticket as answered, though please feel free to discuss further if it feels like the above doesn't fully address your concern. |
Expected Behavior
I'd expect to have a method similar to
Current Behavior
Web client is created in the AbstractWebClientReactiveOAuth2AccessTokenResponseClient:
Context
How has this issue affected you?
We are suffering from exceptions thrown when requesting resource server endpoints:
Default web client settings are different than our AWS setup (max idle connection time in pool, etc ) so it's crucial for us to configure the web client used by the oauth2 implementation.
(Please see that this is causing trouble for other netty client users reactor/reactor-netty#1774)
What are you trying to accomplish?
Get stable oauth2 authentication in our environment
What other alternatives have you considered?
Provide own oauth2.authenticationManagerResolver, but it will be an overkill just for setting up web client max idle time
Are you aware of any workarounds?
No
The text was updated successfully, but these errors were encountered: