You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/modules/ROOT/pages/migration.adoc
+80Lines changed: 80 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1623,6 +1623,86 @@ Second, if you still need your custom `access-decision-manager-ref` or have some
1623
1623
----
1624
1624
====
1625
1625
1626
+
=== Propagate ``AuthenticationServiceException``s
1627
+
1628
+
{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`].
1629
+
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.
1630
+
1631
+
==== Configure `AuthenticationFailureHandler` to rethrow ``AuthenticationServiceException``s
1632
+
1633
+
To prepare for the 6.0 default, wire `AuthenticationFilter` instances with a `AuthenticationFailureHandler` that rethrows ``AuthenticationServiceException``s, like so:
1634
+
1635
+
====
1636
+
.Java
1637
+
[source,java,role="primary"]
1638
+
----
1639
+
AuthenticationFilter authenticationFilter = new AuthenticationFilter(...);
1640
+
AuthenticationEntryPointFailureHandler handler = new AuthenticationEntryPointFailureHandler(...);
0 commit comments