pull/10519/merge
Andy Wilkinson 7 years ago
parent 41fc023a67
commit 2bb54f16fb

@ -34,8 +34,6 @@ import org.springframework.boot.test.rule.OutputCapture;
import org.springframework.boot.test.util.TestPropertyValues; import org.springframework.boot.test.util.TestPropertyValues;
import org.springframework.boot.web.servlet.DelegatingFilterProxyRegistrationBean; import org.springframework.boot.web.servlet.DelegatingFilterProxyRegistrationBean;
import org.springframework.boot.web.servlet.FilterRegistrationBean; import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.ApplicationEvent;
import org.springframework.context.ApplicationListener;
import org.springframework.context.annotation.AnnotationConfigApplicationContext; import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
@ -46,7 +44,6 @@ import org.springframework.security.authentication.AuthenticationProvider;
import org.springframework.security.authentication.ProviderManager; import org.springframework.security.authentication.ProviderManager;
import org.springframework.security.authentication.TestingAuthenticationProvider; import org.springframework.security.authentication.TestingAuthenticationProvider;
import org.springframework.security.authentication.TestingAuthenticationToken; import org.springframework.security.authentication.TestingAuthenticationToken;
import org.springframework.security.authentication.event.AbstractAuthenticationEvent;
import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder; import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
@ -271,18 +268,6 @@ public class SecurityAutoConfigurationTests {
DispatcherType.ERROR); DispatcherType.ERROR);
} }
private static final class AuthenticationListener
implements ApplicationListener<AbstractAuthenticationEvent> {
private ApplicationEvent event;
@Override
public void onApplicationEvent(AbstractAuthenticationEvent event) {
this.event = event;
}
}
@Configuration @Configuration
@TestAutoConfigurationPackage(City.class) @TestAutoConfigurationPackage(City.class)
protected static class EntityConfiguration { protected static class EntityConfiguration {

@ -88,7 +88,7 @@ public class OAuth2WebSecurityConfigurationTests {
.run((context) -> assertThat(getAuthCodeFilters(context)).isEmpty()); .run((context) -> assertThat(getAuthCodeFilters(context)).isEmpty());
} }
@SuppressWarnings({ "unchecked", "cast" }) @SuppressWarnings("unchecked")
private List<Filter> getAuthCodeFilters(AssertableApplicationContext context) { private List<Filter> getAuthCodeFilters(AssertableApplicationContext context) {
FilterChainProxy filterChain = (FilterChainProxy) context FilterChainProxy filterChain = (FilterChainProxy) context
.getBean("springSecurityFilterChain"); .getBean("springSecurityFilterChain");

Loading…
Cancel
Save