spring-boot/spring-boot-project
Andy Wilkinson 231396e6ba Restructure OAuth2 client auto-configuration
Previously, OAuth2 client auto-configuration was managed by a single
class:

- OAuth2ClientAutoConfiguration for servlet apps
- ReactiveOAuth2ClientAutoConfiguration for reactive apps

OAuth2ClientAutoConfiguration being for servlet apps meant that
a blocking OAuth2 client was not availabile in a non-web application.

The auto-configuration classes did two things:

- Auto-configured beans that are specific to server-side web security
  that uses an OAuth2 client
- Auto-configured OAuth2 client beans that may be used client- or
  server-side

Combining these two things into a single auto-configuration class
meant that you could not choose to use one or the other. For example,
you may want to make use of an OAuth2 client in a web application
without also using OAuth2 client-based web security.

This commit restructures the auto-configuration to address these
problems. There are now two auto-configurations for non-reactive apps:

- OAuth2ClientAutoConfiguration
- OAuth2ClientWebSecurityAutoConfiguration

and two auto-configurations for reactive apps:

- ReactiveOAuth2ClientAutoConfiguration
- ReactiveOAuth2ClientWebSecurityAutoConfiguration

This separation allows one to be used without the other. Furthermore,
the conditions have been updated so that, for example, the blocking
OAuth2 client is available in a non-web application.

Closes gh-40997
Closes gh-44906

Co-authored-by: Moritz Halbritter <moritz.halbritter@broadcom.com>
2025-04-22 15:31:35 +01:00
..
spring-boot Allow withTlsSocketStrategyFactory to work without SSL bundle 2025-04-17 15:27:41 -07:00
spring-boot-actuator Merge branch '3.4.x' 2025-04-11 09:42:20 -07:00
spring-boot-actuator-autoconfigure Restructure OAuth2 client auto-configuration 2025-04-22 15:31:35 +01:00
spring-boot-autoconfigure Restructure OAuth2 client auto-configuration 2025-04-22 15:31:35 +01:00
spring-boot-dependencies Upgrade to Pulsar Reactive 0.6.0 2025-04-21 16:12:13 -07:00
spring-boot-devtools Merge branch '3.4.x' 2025-04-14 16:18:50 -07:00
spring-boot-docker-compose Restore visibility for DockerComposeProperties.get() 2025-04-21 08:34:17 +02:00
spring-boot-docs Merge branch '3.4.x' 2025-04-21 08:33:20 +02:00
spring-boot-parent Merge branch '3.4.x' 2025-03-26 10:58:32 +00:00
spring-boot-starters Remove unnecessary excludes on javax.xml.bind:jaxb-api 2025-04-08 11:42:34 -07:00
spring-boot-test Fix checkstyle violations 2025-04-17 15:27:06 -07:00
spring-boot-test-autoconfigure Restructure OAuth2 client auto-configuration 2025-04-22 15:31:35 +01:00
spring-boot-testcontainers Polish 'Allow ConnectionDetailsFactories to use context class loader' 2025-04-08 13:04:16 -07:00
spring-boot-tools Merge branch '3.4.x' 2025-04-21 08:33:20 +02:00