Migrate AuthState to AuthExchange

MSAL

Migrate Apache HttpClient 4.x AuthState and related types to the HttpClient 5.x AuthExchange API, including the AuthProtocolState enum, AuthOption queue elements, and credential-handling call sites.

org.openrewrite.apache.httpclient5.MigrateAuthState
mod run . --recipe=org.openrewrite.apache.httpclient5.MigrateAuthState

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. Change type AuthState to AuthExchange
  2. Change type AuthProtocolState to AuthExchange$State
  3. Change type AuthOption to AuthScheme
  4. Change method name org.apache.hc.client5.http.auth.AuthExchange setAuthScheme(org.apache.hc.client5.http.auth.AuthScheme) to select
  5. Change method name org.apache.hc.client5.http.auth.AuthExchange setAuthOptions(java.util.Queue) to setOptions
  6. Migrate AuthScheme credential handling
  7. Add comment to method invocations
  8. Add comment to method invocations
  9. Add comment to method invocations