瀏覽代碼

Remove MessageSourceAware from ExceptionTranslationWebFilter

Closes gh-11057
Eleftheria Stein 3 年之前
父節點
當前提交
c4e88415a5

+ 1 - 11
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 <T> Mono<T> commenceAuthentication(ServerWebExchange exchange, AuthenticationException denied) {
 		return this.authenticationEntryPoint
 				.commence(exchange, new AuthenticationCredentialsNotFoundException("Not Authenticated", denied))