diff --git a/web/src/main/java/org/springframework/security/web/server/csrf/CsrfWebFilter.java b/web/src/main/java/org/springframework/security/web/server/csrf/CsrfWebFilter.java index c5947ff0dd..ff5cdfa1e5 100644 --- a/web/src/main/java/org/springframework/security/web/server/csrf/CsrfWebFilter.java +++ b/web/src/main/java/org/springframework/security/web/server/csrf/CsrfWebFilter.java @@ -113,23 +113,6 @@ public class CsrfWebFilter implements WebFilter { this.requestHandler = requestHandler; } - /** - * Specifies if the {@code CsrfWebFilter} should try to resolve the actual CSRF token - * from the body of multipart data requests. - * @param tokenFromMultipartDataEnabled true if should read from multipart form body, - * else false. Default is false - * @deprecated Use - * {@link ServerCsrfTokenRequestAttributeHandler#setTokenFromMultipartDataEnabled(boolean)} - * instead - */ - @Deprecated - public void setTokenFromMultipartDataEnabled(boolean tokenFromMultipartDataEnabled) { - if (this.requestHandler instanceof ServerCsrfTokenRequestAttributeHandler) { - ((ServerCsrfTokenRequestAttributeHandler) this.requestHandler) - .setTokenFromMultipartDataEnabled(tokenFromMultipartDataEnabled); - } - } - @Override public Mono filter(ServerWebExchange exchange, WebFilterChain chain) { if (Boolean.TRUE.equals(exchange.getAttribute(SHOULD_NOT_FILTER))) {