diff --git a/docs/modules/ROOT/pages/migration/servlet/authentication.adoc b/docs/modules/ROOT/pages/migration/servlet/authentication.adoc index 600dc208d1..e5ef9a2e35 100644 --- a/docs/modules/ROOT/pages/migration/servlet/authentication.adoc +++ b/docs/modules/ROOT/pages/migration/servlet/authentication.adoc @@ -4,7 +4,7 @@ The following steps relate to how to finish migrating authentication support. == Propagate ``AuthenticationServiceException``s -{security-api-url}org/springframework/security/web/authentication/AuthenticationFilter.html[`AuthenticationFilter`] propagates {security-api-url}org/springframework/security/authentication/AuthenticationServiceException.html[``AuthenticationServiceException``]s to the {security-api-url}org/springframework/security/authentication/AuthenticationEntryPoint.html[`AuthenticationEntryPoint`]. +{security-api-url}org/springframework/security/web/authentication/AuthenticationFilter.html[`AuthenticationFilter`] propagates {security-api-url}org/springframework/security/authentication/AuthenticationServiceException.html[``AuthenticationServiceException``]s to the {security-api-url}org/springframework/security/web/AuthenticationEntryPoint.html[`AuthenticationEntryPoint`]. Because ``AuthenticationServiceException``s represent a server-side error instead of a client-side error, in 6.0, this changes to propagate them to the container. So, if you opted into this behavior by setting `rethrowAuthenticationServiceException` to `true`, you can now remove it like so: @@ -22,8 +22,8 @@ authenticationFilter.setAuthenticationFailureHandler(handler); .Kotlin [source,kotlin,role="secondary"] ---- -val authenticationFilter: AuthenticationFilter = new AuthenticationFilter(...) -val handler: AuthenticationEntryPointFailureHandler = new AuthenticationEntryPointFailureHandler(...) +val authenticationFilter: AuthenticationFilter = AuthenticationFilter(...) +val handler: AuthenticationEntryPointFailureHandler = AuthenticationEntryPointFailureHandler(...) handler.setRethrowAuthenticationServiceException(true) authenticationFilter.setAuthenticationFailureHandler(handler) ---- @@ -56,8 +56,8 @@ authenticationFilter.setAuthenticationFailureHandler(handler); .Kotlin [source,kotlin,role="secondary"] ---- -val authenticationFilter: AuthenticationFilter = new AuthenticationFilter(...) -val handler: AuthenticationEntryPointFailureHandler = new AuthenticationEntryPointFailureHandler(...) +val authenticationFilter: AuthenticationFilter = AuthenticationFilter(...) +val handler: AuthenticationEntryPointFailureHandler = AuthenticationEntryPointFailureHandler(...) authenticationFilter.setAuthenticationFailureHandler(handler) ----