-
Notifications
You must be signed in to change notification settings - Fork 41.5k
Open
Labels
type: enhancementA general enhancementA general enhancement
Milestone
Description
It would be nice if Spring Boot added some autoconfiguration for applying Spring Security's OAuth2 Support for Interface HTTP Clients.
The configuration looks like this for RestClient
and should be activated with the classpath has RestClient
, the OAuth2 client jar, and has an OAuth2AuthorizedClientManager
bean.
@Bean
OAuth2RestClientHttpServiceGroupConfigurer securityConfigurer(
OAuth2AuthorizedClientManager manager) {
return OAuth2RestClientHttpServiceGroupConfigurer.from(manager);
}
The configuration looks like this for WebClient
and should be activated with the classpath has WebClient
and OAuth2 client jar, and has an OAuth2AuthorizedClientManager
bean.
@Bean
OAuth2RestClientHttpServiceGroupConfigurer securityConfigurer(
OAuth2AuthorizedClientManager manager) {
return OAuth2RestClientHttpServiceGroupConfigurer.from(manager);
}
cc @joshlong
Metadata
Metadata
Assignees
Labels
type: enhancementA general enhancementA general enhancement