Migrate Spring Security OAuth resource servers to Spring Security

Proprietary

Migrates the resource server half of the end-of-life org.springframework.security.oauth:spring-security-oauth2 project to the spring-security-oauth2-resource-server module. Note that the legacy project shares the org.springframework.security.oauth2 package root with its replacement, so every type here is matched by exact name rather than by package. Configuration classes that cannot be migrated faithfully are left exactly as they are and marked for a manual migration rather than partially rewritten.

io.moderne.java.spring.security.oauth.MigrateSpringSecurityOAuthResourceServer
mod run . --recipe=io.moderne.java.spring.security.oauth.MigrateSpringSecurityOAuthResourceServer

Install 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.

  1. Add Gradle or Maven dependency org.springframework.security:spring-security-oauth2-resource-server:6.5.x
  2. Add Gradle or Maven dependency org.springframework.security:spring-security-oauth2-jose:6.5.x
  3. Migrate ResourceServerConfigurerAdapter to a SecurityFilterChain bean
  4. Change the key of a Spring application property
  5. Change the key of a Spring application property
  6. Comment out Spring properties
  7. Comment out Spring properties
  8. Comment out Spring properties
  9. Comment out Spring properties