Migrate from Spring Security OAuth to Spring Security

Proprietary

Migrates the client and resource server halves of the end-of-life org.springframework.security.oauth:spring-security-oauth2 project onto the modules that replaced them in Spring Security, and drops the legacy dependencies; code that could not be migrated is marked and will fail to compile against the removed dependency, which is preferable to failing silently at runtime. Authorization servers built on @EnableAuthorizationServer are deliberately out of scope: Spring Authorization Server uses a different configuration model, moves the token endpoints, and drops the password grant, so those need a manual migration.

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

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. Migrate Spring Security OAuth resource servers to Spring Security
  2. Migrate Spring Security OAuth clients to Spring Security
  3. Remove a Gradle or Maven dependency org.springframework.security.oauth:spring-security-oauth2
  4. Remove a Gradle or Maven dependency org.springframework.security.oauth.boot:spring-security-oauth2-autoconfigure