diff --git a/web/src/main/java/org/springframework/security/web/server/authorization/ExceptionTranslationWebFilter.java b/web/src/main/java/org/springframework/security/web/server/authorization/ExceptionTranslationWebFilter.java index 0c7acb1596..de91e15c97 100644 --- a/web/src/main/java/org/springframework/security/web/server/authorization/ExceptionTranslationWebFilter.java +++ b/web/src/main/java/org/springframework/security/web/server/authorization/ExceptionTranslationWebFilter.java @@ -18,8 +18,6 @@ package org.springframework.security.web.server.authorization; import reactor.core.publisher.Mono; -import org.springframework.context.MessageSource; -import org.springframework.context.MessageSourceAware; import org.springframework.http.HttpStatus; import org.springframework.security.access.AccessDeniedException; import org.springframework.security.authentication.AuthenticationCredentialsNotFoundException; @@ -40,7 +38,7 @@ import org.springframework.web.server.WebFilterChain; * @author César Revert * @since 5.0 */ -public class ExceptionTranslationWebFilter implements WebFilter, MessageSourceAware { +public class ExceptionTranslationWebFilter implements WebFilter { private ServerAuthenticationEntryPoint authenticationEntryPoint = new HttpBasicServerAuthenticationEntryPoint(); @@ -92,14 +90,6 @@ public class ExceptionTranslationWebFilter implements WebFilter, MessageSourceAw this.authenticationTrustResolver = authenticationTrustResolver; } - /** - * @since 5.5 - * @deprecated This class no longer retrieves error messages from a MessageSource - */ - @Deprecated - public void setMessageSource(MessageSource messageSource) { - } - private Mono commenceAuthentication(ServerWebExchange exchange, AuthenticationException denied) { return this.authenticationEntryPoint .commence(exchange, new AuthenticationCredentialsNotFoundException("Not Authenticated", denied))