Remove MessageSourceAware from ExceptionTranslationWebFilter
Closes gh-11057
This commit is contained in:
parent
3bd160a71d
commit
c4e88415a5
|
@ -18,8 +18,6 @@ package org.springframework.security.web.server.authorization;
|
||||||
|
|
||||||
import reactor.core.publisher.Mono;
|
import reactor.core.publisher.Mono;
|
||||||
|
|
||||||
import org.springframework.context.MessageSource;
|
|
||||||
import org.springframework.context.MessageSourceAware;
|
|
||||||
import org.springframework.http.HttpStatus;
|
import org.springframework.http.HttpStatus;
|
||||||
import org.springframework.security.access.AccessDeniedException;
|
import org.springframework.security.access.AccessDeniedException;
|
||||||
import org.springframework.security.authentication.AuthenticationCredentialsNotFoundException;
|
import org.springframework.security.authentication.AuthenticationCredentialsNotFoundException;
|
||||||
|
@ -40,7 +38,7 @@ import org.springframework.web.server.WebFilterChain;
|
||||||
* @author César Revert
|
* @author César Revert
|
||||||
* @since 5.0
|
* @since 5.0
|
||||||
*/
|
*/
|
||||||
public class ExceptionTranslationWebFilter implements WebFilter, MessageSourceAware {
|
public class ExceptionTranslationWebFilter implements WebFilter {
|
||||||
|
|
||||||
private ServerAuthenticationEntryPoint authenticationEntryPoint = new HttpBasicServerAuthenticationEntryPoint();
|
private ServerAuthenticationEntryPoint authenticationEntryPoint = new HttpBasicServerAuthenticationEntryPoint();
|
||||||
|
|
||||||
|
@ -92,14 +90,6 @@ public class ExceptionTranslationWebFilter implements WebFilter, MessageSourceAw
|
||||||
this.authenticationTrustResolver = authenticationTrustResolver;
|
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) {
|
private <T> Mono<T> commenceAuthentication(ServerWebExchange exchange, AuthenticationException denied) {
|
||||||
return this.authenticationEntryPoint
|
return this.authenticationEntryPoint
|
||||||
.commence(exchange, new AuthenticationCredentialsNotFoundException("Not Authenticated", denied))
|
.commence(exchange, new AuthenticationCredentialsNotFoundException("Not Authenticated", denied))
|
||||||
|
|
Loading…
Reference in New Issue