Browse Source

Merge branch '6.0.x'

pull/13212/head
Josh Cummings 3 years ago
parent
commit
9d19435eb0
No known key found for this signature in database
GPG Key ID: A306A51F43B8E5A5
  1. 10
      docs/modules/ROOT/pages/migration/servlet/authentication.adoc

10
docs/modules/ROOT/pages/migration/servlet/authentication.adoc

@ -4,7 +4,7 @@ The following steps relate to how to finish migrating authentication support. @@ -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); @@ -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); @@ -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)
----

Loading…
Cancel
Save