Migrate Spring Security OAuth clients to Spring Security
ProprietaryMigrates the client half of the end-of-life org.springframework.security.oauth:spring-security-oauth2 project to the spring-security-oauth2-client module. Flat security.oauth2.client.* properties and the settings that built an OAuth2RestTemplate in Java both become a single default client registration; rename it to something meaningful when a project has more than one client. Beans whose settings cannot all be read at compile time are left untouched and marked, since a template stripped of its credentials would compile but fail at runtime. Requires Spring Security 6.4 or later for OAuth2ClientHttpRequestInterceptor.
io. moderne. java. spring. security. oauth. MigrateSpringSecurityOAuthClientmod run . --recipe= io. moderne. java. spring. security. oauth. MigrateSpringSecurityOAuthClientInstall it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.
Recipe list
It runs these recipes, in this order.
- Add Gradle or Maven dependency
org.springframework.security:spring-security-oauth2-client:6.5.x - Change the key of a Spring application property
- Change the key of a Spring application property
- Change the key of a Spring application property
- Change the key of a Spring application property
- Change the key of a Spring application property
- Change the key of a Spring application property
- Comment out Spring properties
- Migrate
OAuth2RestTemplatebeans toRestTemplatewith an OAuth2 interceptor