Skip to content

Remove deprecated implementations of OAuth2AccessTokenResponseClient #16909

Open
@sjohnr

Description

@sjohnr

With the 6.4 release, a new set of OAuth2AccessTokenResponseClient implementations were introduced based on RestClient. These are:

  • RestClientAuthorizationCodeTokenResponseClient
  • RestClientRefreshTokenTokenResponseClient
  • RestClientClientCredentialsTokenResponseClient
  • RestClientJwtBearerTokenResponseClient
  • RestClientTokenExchangeTokenResponseClient

These implementations are drop-in replacements for the RestOperations-based implementations which have been deprecated. These are:

  • DefaultAuthorizationCodeTokenResponseClient
  • DefaultRefreshTokenTokenResponseClient
  • DefaultClientCredentialsTokenResponseClient
  • DefaultPasswordTokenResponseClient
  • DefaultJwtBearerTokenResponseClient
  • DefaultTokenExchangeTokenResponseClient

Note that the DefaultPasswordTokenResponseClient does not have a replacement, as it is deprecated for removal for separate reasons (it should not be used according to RFC 9700).

The following checklist should be used to help validate removal:

  • Remove Default* deprecated classes above and replace usages in the framework with the RestClient*
  • Remove AbstractOAuth2AuthorizationGrantRequestEntityConverter and all deprecated subclasses and their usages
  • ClientAuthenticationMethodValidatingRequestEntityConverter should also be removed
  • All related tests; Note that tests in spring-security-config should remain mostly unchanged, though some may need to be updated to customize RestClient instead of RestTemplate

Related gh-15298

Metadata

Metadata

Assignees

No one assigned

    Labels

    in: oauth2An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose)type: breaks-passivityA change that breaks passivity with the previous releasetype: enhancementA general enhancement

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions