Skip to content

Commit 0a5af0e

Browse files
author
Steve Riesenberg
committed
Document deprecations in oauth2-client
Issue gh-12022
1 parent b81fbf0 commit 0a5af0e

File tree

1 file changed

+150
-0
lines changed

1 file changed

+150
-0
lines changed

docs/modules/ROOT/pages/migration.adoc

Lines changed: 150 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3832,6 +3832,131 @@ fun passwordEncoder(): PasswordEncoder {
38323832
----
38333833
====
38343834

3835+
=== Deprecations in OAuth2 Client
3836+
3837+
In Spring Security 6, deprecated classes and methods were removed from xref:servlet/oauth2/client/index.adoc[OAuth2 Client].
3838+
Each deprecation is listed below, along with a direct replacement.
3839+
3840+
==== `ServletOAuth2AuthorizedClientExchangeFilterFunction`
3841+
3842+
The method `setAccessTokenExpiresSkew(...)` can be replaced with one of:
3843+
3844+
* `ClientCredentialsOAuth2AuthorizedClientProvider#setClockSkew(...)`
3845+
* `RefreshTokenOAuth2AuthorizedClientProvider#setClockSkew(...)`
3846+
* `JwtBearerOAuth2AuthorizedClientProvider#setClockSkew(...)`
3847+
3848+
The method `setClientCredentialsTokenResponseClient(...)` can be replaced with the constructor `ServletOAuth2AuthorizedClientExchangeFilterFunction(OAuth2AuthorizedClientManager)`.
3849+
3850+
[NOTE]
3851+
====
3852+
See xref:servlet/oauth2/client/authorization-grants.adoc#oauth2Client-client-creds-grant[Client Credentials] for more information.
3853+
====
3854+
3855+
==== `OidcUserInfo`
3856+
3857+
The method `phoneNumberVerified(String)` can be replaced with `phoneNumberVerified(Boolean)`.
3858+
3859+
==== `JwtAuthenticationConverter`
3860+
3861+
The method `extractAuthorities(...)` can be replaced with `JwtGrantedAuthoritiesConverter#convert(...)`.
3862+
3863+
==== `OAuth2AuthorizedClientArgumentResolver`
3864+
3865+
The method `setClientCredentialsTokenResponseClient(...)` can be replaced with the constructor `OAuth2AuthorizedClientArgumentResolver(OAuth2AuthorizedClientManager)`.
3866+
3867+
[NOTE]
3868+
====
3869+
See xref:servlet/oauth2/client/authorization-grants.adoc#oauth2Client-client-creds-grant[Client Credentials] for more information.
3870+
====
3871+
3872+
==== `ClaimAccessor`
3873+
3874+
The method `containsClaim(...)` can be replaced with `hasClaim(...)`.
3875+
3876+
==== `OidcClientInitiatedLogoutSuccessHandler`
3877+
3878+
The method `setPostLogoutRedirectUri(URI)` can be replaced with `setPostLogoutRedirectUri(String)`.
3879+
3880+
==== `HttpSessionOAuth2AuthorizationRequestRepository`
3881+
3882+
The method `setAllowMultipleAuthorizationRequests(...)` has no direct replacement.
3883+
3884+
==== `AuthorizationRequestRepository`
3885+
3886+
The method `removeAuthorizationRequest(HttpServletRequest)` can be replaced with `removeAuthorizationRequest(HttpServletRequest, HttpServletResponse)`.
3887+
3888+
==== `ClientRegistration`
3889+
3890+
The method `getRedirectUriTemplate()` can be replaced with `getRedirectUri()`.
3891+
3892+
==== `ClientRegistration.Builder`
3893+
3894+
The method `redirectUriTemplate(...)` can be replaced with `redirectUri(...)`.
3895+
3896+
==== `AbstractOAuth2AuthorizationGrantRequest`
3897+
3898+
The constructor `AbstractOAuth2AuthorizationGrantRequest(AuthorizationGrantType)` can be replaced with `AbstractOAuth2AuthorizationGrantRequest(AuthorizationGrantType, ClientRegistration)`.
3899+
3900+
==== `ClientAuthenticationMethod`
3901+
3902+
The static field `BASIC` can be replaced with `CLIENT_SECRET_BASIC`.
3903+
3904+
The static field `POST` can be replaced with `CLIENT_SECRET_POST`.
3905+
3906+
==== `OAuth2AccessTokenResponseHttpMessageConverter`
3907+
3908+
The field `tokenResponseConverter` has no direct replacement.
3909+
3910+
The method `setTokenResponseConverter(...)` can be replaced with `setAccessTokenResponseConverter(...)`.
3911+
3912+
The field `tokenResponseParametersConverter` has no direct replacement.
3913+
3914+
The method `setTokenResponseParametersConverter(...)` can be replaced with `setAccessTokenResponseParametersConverter(...)`.
3915+
3916+
==== `NimbusAuthorizationCodeTokenResponseClient`
3917+
3918+
The class `NimbusAuthorizationCodeTokenResponseClient` can be replaced with `DefaultAuthorizationCodeTokenResponseClient`.
3919+
3920+
==== `NimbusJwtDecoderJwkSupport`
3921+
3922+
The class `NimbusJwtDecoderJwkSupport` can be replaced with `NimbusJwtDecoder` or `JwtDecoders`.
3923+
3924+
==== `ImplicitGrantConfigurer`
3925+
3926+
The class `ImplicitGrantConfigurer` has no direct replacement.
3927+
3928+
[WARNING]
3929+
====
3930+
Use of the `implicit` grant type is not recommended and all related support is removed in Spring Security 6.
3931+
====
3932+
3933+
==== `AuthorizationGrantType`
3934+
3935+
The static field `IMPLICIT` has no direct replacement.
3936+
3937+
[WARNING]
3938+
====
3939+
Use of the `implicit` grant type is not recommended and all related support is removed in Spring Security 6.
3940+
====
3941+
3942+
==== `OAuth2AuthorizationResponseType`
3943+
3944+
The static field `TOKEN` has no direct replacement.
3945+
3946+
[WARNING]
3947+
====
3948+
Use of the `implicit` grant type is not recommended and all related support is removed in Spring Security 6.
3949+
====
3950+
3951+
==== `OAuth2AuthorizationRequest`
3952+
3953+
The static method `implicit()` has no direct replacement.
3954+
3955+
[WARNING]
3956+
====
3957+
Use of the `implicit` grant type is not recommended and all related support is removed in Spring Security 6.
3958+
====
3959+
38353960
== Reactive
38363961

38373962
=== Use `AuthorizationManager` for Method Security
@@ -4002,3 +4127,28 @@ http {
40024127
==== Opt-out Steps
40034128

40044129
To opt-out of the 6.0 defaults and instead continue to pass `AuthenticationServiceException` on to ``ServerAuthenticationEntryPoint``s, you can follow the same steps as above, except set `rethrowAuthenticationServiceException` to false.
4130+
4131+
=== Deprecations in OAuth2 Client
4132+
4133+
==== `ServerOAuth2AuthorizedClientExchangeFilterFunction`
4134+
4135+
The method `setAccessTokenExpiresSkew(...)` can be replaced with one of:
4136+
4137+
* `ClientCredentialsReactiveOAuth2AuthorizedClientProvider#setClockSkew(...)`
4138+
* `RefreshTokenReactiveOAuth2AuthorizedClientProvider#setClockSkew(...)`
4139+
* `JwtBearerReactiveOAuth2AuthorizedClientProvider#setClockSkew(...)`
4140+
4141+
The method `setClientCredentialsTokenResponseClient(...)` can be replaced with the constructor `ServerOAuth2AuthorizedClientExchangeFilterFunction(ReactiveOAuth2AuthorizedClientManager)`.
4142+
4143+
[NOTE]
4144+
====
4145+
See xref:reactive/oauth2/client/authorization-grants.adoc#oauth2Client-client-creds-grant[Client Credentials] for more information.
4146+
====
4147+
4148+
==== `WebSessionOAuth2ServerAuthorizationRequestRepository`
4149+
4150+
The method `setAllowMultipleAuthorizationRequests(...)` has no direct replacement.
4151+
4152+
==== `UnAuthenticatedServerOAuth2AuthorizedClientRepository`
4153+
4154+
The class `UnAuthenticatedServerOAuth2AuthorizedClientRepository` has no direct replacement. Usage of the class can be replaced with `AuthorizedClientServiceReactiveOAuth2AuthorizedClientManager`.

0 commit comments

Comments
 (0)