Remove MessageSourceAware from ExceptionTranslationWebFilter

Closes gh-11057
This commit is contained in:
Eleftheria Stein 2022-04-05 16:13:41 +02:00
parent 3bd160a71d
commit c4e88415a5
1 changed files with 1 additions and 11 deletions

View File

@ -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))