From 015cc2203e78cb7c5dbcfb6b86069b956a54a9f7 Mon Sep 17 00:00:00 2001 From: Rob Winch Date: Thu, 12 Oct 2017 15:13:02 -0500 Subject: [PATCH] Fix ServerHttpSecurity --- .../config/annotation/web/reactive/EnableWebFluxSecurity.java | 3 +-- ...Configuration.java => ServerHttpSecurityConfiguration.java} | 2 +- .../annotation/web/builders/HttpConfigurationTests.groovy | 2 +- ...SecurityHeadersTests.java => HttpSecurityHeadersTests.java} | 2 +- ...AntMatchersTests.java => HttpSecurityAntMatchersTests.java} | 2 +- ...tpSecurityLogoutTests.java => HttpSecurityLogoutTests.java} | 2 +- ...atchersTests.java => HttpSecurityRequestMatchersTests.java} | 2 +- ...igurerTests.java => CustomHttpSecurityConfigurerTests.java} | 2 +- 8 files changed, 8 insertions(+), 9 deletions(-) rename config/src/main/java/org/springframework/security/config/annotation/web/reactive/{HttpSecurityConfiguration.java => ServerHttpSecurityConfiguration.java} (97%) rename config/src/test/java/org/springframework/security/config/annotation/web/{ServerHttpSecurityHeadersTests.java => HttpSecurityHeadersTests.java} (98%) rename config/src/test/java/org/springframework/security/config/annotation/web/configurers/{ServerHttpSecurityAntMatchersTests.java => HttpSecurityAntMatchersTests.java} (98%) rename config/src/test/java/org/springframework/security/config/annotation/web/configurers/{ServerHttpSecurityLogoutTests.java => HttpSecurityLogoutTests.java} (98%) rename config/src/test/java/org/springframework/security/config/annotation/web/configurers/{ServerHttpSecurityRequestMatchersTests.java => HttpSecurityRequestMatchersTests.java} (99%) rename config/src/test/java/org/springframework/security/config/http/customconfigurer/{CustomServerHttpSecurityConfigurerTests.java => CustomHttpSecurityConfigurerTests.java} (98%) diff --git a/config/src/main/java/org/springframework/security/config/annotation/web/reactive/EnableWebFluxSecurity.java b/config/src/main/java/org/springframework/security/config/annotation/web/reactive/EnableWebFluxSecurity.java index b8469feabc..3432ed4edb 100644 --- a/config/src/main/java/org/springframework/security/config/annotation/web/reactive/EnableWebFluxSecurity.java +++ b/config/src/main/java/org/springframework/security/config/annotation/web/reactive/EnableWebFluxSecurity.java @@ -19,7 +19,6 @@ package org.springframework.security.config.annotation.web.reactive; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Import; -import javax.servlet.http.HttpServletRequest; import java.lang.annotation.*; /** @@ -29,7 +28,7 @@ import java.lang.annotation.*; @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.TYPE) @Documented -@Import({HttpSecurityConfiguration.class, WebFluxSecurityConfiguration.class}) +@Import({ServerHttpSecurityConfiguration.class, WebFluxSecurityConfiguration.class}) @Configuration public @interface EnableWebFluxSecurity { } diff --git a/config/src/main/java/org/springframework/security/config/annotation/web/reactive/HttpSecurityConfiguration.java b/config/src/main/java/org/springframework/security/config/annotation/web/reactive/ServerHttpSecurityConfiguration.java similarity index 97% rename from config/src/main/java/org/springframework/security/config/annotation/web/reactive/HttpSecurityConfiguration.java rename to config/src/main/java/org/springframework/security/config/annotation/web/reactive/ServerHttpSecurityConfiguration.java index 90a374ac0d..9ef600620a 100644 --- a/config/src/main/java/org/springframework/security/config/annotation/web/reactive/HttpSecurityConfiguration.java +++ b/config/src/main/java/org/springframework/security/config/annotation/web/reactive/ServerHttpSecurityConfiguration.java @@ -35,7 +35,7 @@ import static org.springframework.security.config.web.server.ServerHttpSecurity. * @author Rob Winch * @since 5.0 */ -public class HttpSecurityConfiguration implements WebFluxConfigurer { +public class ServerHttpSecurityConfiguration implements WebFluxConfigurer { private static final String BEAN_NAME_PREFIX = "org.springframework.security.config.annotation.web.reactive.HttpSecurityConfiguration."; private static final String HTTPSECURITY_BEAN_NAME = BEAN_NAME_PREFIX + "httpSecurity"; diff --git a/config/src/test/groovy/org/springframework/security/config/annotation/web/builders/HttpConfigurationTests.groovy b/config/src/test/groovy/org/springframework/security/config/annotation/web/builders/HttpConfigurationTests.groovy index a5a4cbb7d9..2c85dde39b 100644 --- a/config/src/test/groovy/org/springframework/security/config/annotation/web/builders/HttpConfigurationTests.groovy +++ b/config/src/test/groovy/org/springframework/security/config/annotation/web/builders/HttpConfigurationTests.groovy @@ -40,7 +40,7 @@ import spock.lang.Unroll; * @author Rob Winch * */ -public class ServerHttpSecurityTests extends BaseSpringSpec { +public class HttpConfigurationTests extends BaseSpringSpec { def "addFilter with unregistered Filter"() { when: loadConfig(UnregisteredFilterConfig) diff --git a/config/src/test/java/org/springframework/security/config/annotation/web/ServerHttpSecurityHeadersTests.java b/config/src/test/java/org/springframework/security/config/annotation/web/HttpSecurityHeadersTests.java similarity index 98% rename from config/src/test/java/org/springframework/security/config/annotation/web/ServerHttpSecurityHeadersTests.java rename to config/src/test/java/org/springframework/security/config/annotation/web/HttpSecurityHeadersTests.java index 860c354e3e..79e9678188 100644 --- a/config/src/test/java/org/springframework/security/config/annotation/web/ServerHttpSecurityHeadersTests.java +++ b/config/src/test/java/org/springframework/security/config/annotation/web/HttpSecurityHeadersTests.java @@ -48,7 +48,7 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration @WebAppConfiguration -public class ServerHttpSecurityHeadersTests { +public class HttpSecurityHeadersTests { @Autowired WebApplicationContext wac; @Autowired diff --git a/config/src/test/java/org/springframework/security/config/annotation/web/configurers/ServerHttpSecurityAntMatchersTests.java b/config/src/test/java/org/springframework/security/config/annotation/web/configurers/HttpSecurityAntMatchersTests.java similarity index 98% rename from config/src/test/java/org/springframework/security/config/annotation/web/configurers/ServerHttpSecurityAntMatchersTests.java rename to config/src/test/java/org/springframework/security/config/annotation/web/configurers/HttpSecurityAntMatchersTests.java index 573bc39534..3a5d338b2e 100644 --- a/config/src/test/java/org/springframework/security/config/annotation/web/configurers/ServerHttpSecurityAntMatchersTests.java +++ b/config/src/test/java/org/springframework/security/config/annotation/web/configurers/HttpSecurityAntMatchersTests.java @@ -39,7 +39,7 @@ import org.springframework.web.context.support.AnnotationConfigWebApplicationCon * @author Rob Winch * */ -public class ServerHttpSecurityAntMatchersTests { +public class HttpSecurityAntMatchersTests { AnnotationConfigWebApplicationContext context; MockHttpServletRequest request; diff --git a/config/src/test/java/org/springframework/security/config/annotation/web/configurers/ServerHttpSecurityLogoutTests.java b/config/src/test/java/org/springframework/security/config/annotation/web/configurers/HttpSecurityLogoutTests.java similarity index 98% rename from config/src/test/java/org/springframework/security/config/annotation/web/configurers/ServerHttpSecurityLogoutTests.java rename to config/src/test/java/org/springframework/security/config/annotation/web/configurers/HttpSecurityLogoutTests.java index 190656e425..60b4d5ec38 100644 --- a/config/src/test/java/org/springframework/security/config/annotation/web/configurers/ServerHttpSecurityLogoutTests.java +++ b/config/src/test/java/org/springframework/security/config/annotation/web/configurers/HttpSecurityLogoutTests.java @@ -40,7 +40,7 @@ import org.springframework.web.context.support.AnnotationConfigWebApplicationCon * @author Rob Winch * */ -public class ServerHttpSecurityLogoutTests { +public class HttpSecurityLogoutTests { AnnotationConfigWebApplicationContext context; MockHttpServletRequest request; diff --git a/config/src/test/java/org/springframework/security/config/annotation/web/configurers/ServerHttpSecurityRequestMatchersTests.java b/config/src/test/java/org/springframework/security/config/annotation/web/configurers/HttpSecurityRequestMatchersTests.java similarity index 99% rename from config/src/test/java/org/springframework/security/config/annotation/web/configurers/ServerHttpSecurityRequestMatchersTests.java rename to config/src/test/java/org/springframework/security/config/annotation/web/configurers/HttpSecurityRequestMatchersTests.java index d470d5d415..6835425ddf 100644 --- a/config/src/test/java/org/springframework/security/config/annotation/web/configurers/ServerHttpSecurityRequestMatchersTests.java +++ b/config/src/test/java/org/springframework/security/config/annotation/web/configurers/HttpSecurityRequestMatchersTests.java @@ -43,7 +43,7 @@ import static org.assertj.core.api.Assertions.assertThat; * @author Rob Winch * */ -public class ServerHttpSecurityRequestMatchersTests { +public class HttpSecurityRequestMatchersTests { AnnotationConfigWebApplicationContext context; MockHttpServletRequest request; diff --git a/config/src/test/java/org/springframework/security/config/http/customconfigurer/CustomServerHttpSecurityConfigurerTests.java b/config/src/test/java/org/springframework/security/config/http/customconfigurer/CustomHttpSecurityConfigurerTests.java similarity index 98% rename from config/src/test/java/org/springframework/security/config/http/customconfigurer/CustomServerHttpSecurityConfigurerTests.java rename to config/src/test/java/org/springframework/security/config/http/customconfigurer/CustomHttpSecurityConfigurerTests.java index 4dc2a84218..beda71be97 100644 --- a/config/src/test/java/org/springframework/security/config/http/customconfigurer/CustomServerHttpSecurityConfigurerTests.java +++ b/config/src/test/java/org/springframework/security/config/http/customconfigurer/CustomHttpSecurityConfigurerTests.java @@ -42,7 +42,7 @@ import org.springframework.security.web.FilterChainProxy; * @author Rob Winch * */ -public class CustomServerHttpSecurityConfigurerTests { +public class CustomHttpSecurityConfigurerTests { @Autowired ConfigurableApplicationContext context;