|
@@ -1,5 +1,5 @@
|
|
|
/*
|
|
|
- * Copyright 2002-2022 the original author or authors.
|
|
|
+ * Copyright 2002-2023 the original author or authors.
|
|
|
*
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
* you may not use this file except in compliance with the License.
|
|
@@ -170,7 +170,25 @@ public class AuthorizationFilter extends GenericFilterBean {
|
|
|
* @param shouldFilterAllDispatcherTypes should filter all dispatcher types. Default
|
|
|
* is {@code true}
|
|
|
* @since 5.7
|
|
|
+ * @deprecated Permit access to the {@link jakarta.servlet.DispatcherType} instead.
|
|
|
+ * <pre>
|
|
|
+ * @Configuration
|
|
|
+ * @EnableWebSecurity
|
|
|
+ * public class SecurityConfig {
|
|
|
+ *
|
|
|
+ * @Bean
|
|
|
+ * public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception {
|
|
|
+ * http
|
|
|
+ * .authorizeHttpRequests((authorize) -> authorize
|
|
|
+ * .dispatcherTypeMatchers(DispatcherType.ERROR).permitAll()
|
|
|
+ * // ...
|
|
|
+ * );
|
|
|
+ * return http.build();
|
|
|
+ * }
|
|
|
+ * }
|
|
|
+ * </pre>
|
|
|
*/
|
|
|
+ @Deprecated(since = "6.1", forRemoval = true)
|
|
|
public void setShouldFilterAllDispatcherTypes(boolean shouldFilterAllDispatcherTypes) {
|
|
|
this.observeOncePerRequest = !shouldFilterAllDispatcherTypes;
|
|
|
this.filterErrorDispatch = shouldFilterAllDispatcherTypes;
|