Browse Source

Resolve package tangles in Kotlin server package

Eleftheria Stein 5 years ago
parent
commit
bc272ddf73
20 changed files with 17 additions and 58 deletions
  1. 1 4
      config/src/main/kotlin/org/springframework/security/config/web/server/ServerCacheControlDsl.kt
  2. 1 4
      config/src/main/kotlin/org/springframework/security/config/web/server/ServerContentSecurityPolicyDsl.kt
  3. 1 4
      config/src/main/kotlin/org/springframework/security/config/web/server/ServerContentTypeOptionsDsl.kt
  4. 1 3
      config/src/main/kotlin/org/springframework/security/config/web/server/ServerFrameOptionsDsl.kt
  5. 0 1
      config/src/main/kotlin/org/springframework/security/config/web/server/ServerHeadersDsl.kt
  6. 1 3
      config/src/main/kotlin/org/springframework/security/config/web/server/ServerHttpStrictTransportSecurityDsl.kt
  7. 1 3
      config/src/main/kotlin/org/springframework/security/config/web/server/ServerJwtDsl.kt
  8. 0 2
      config/src/main/kotlin/org/springframework/security/config/web/server/ServerOAuth2ResourceServerDsl.kt
  9. 1 3
      config/src/main/kotlin/org/springframework/security/config/web/server/ServerOpaqueTokenDsl.kt
  10. 1 3
      config/src/main/kotlin/org/springframework/security/config/web/server/ServerReferrerPolicyDsl.kt
  11. 1 4
      config/src/main/kotlin/org/springframework/security/config/web/server/ServerXssProtectionDsl.kt
  12. 1 3
      config/src/test/kotlin/org/springframework/security/config/web/server/ServerCacheControlDslTests.kt
  13. 1 3
      config/src/test/kotlin/org/springframework/security/config/web/server/ServerContentSecurityPolicyDslTests.kt
  14. 1 3
      config/src/test/kotlin/org/springframework/security/config/web/server/ServerContentTypeOptionsDslTests.kt
  15. 1 3
      config/src/test/kotlin/org/springframework/security/config/web/server/ServerFrameOptionsDslTests.kt
  16. 0 0
      config/src/test/kotlin/org/springframework/security/config/web/server/ServerHttpStrictTransportSecurityDslTests.kt
  17. 1 3
      config/src/test/kotlin/org/springframework/security/config/web/server/ServerJwtDslTests.kt
  18. 1 3
      config/src/test/kotlin/org/springframework/security/config/web/server/ServerOpaqueTokenDslTests.kt
  19. 1 3
      config/src/test/kotlin/org/springframework/security/config/web/server/ServerReferrerPolicyDslTests.kt
  20. 1 3
      config/src/test/kotlin/org/springframework/security/config/web/server/ServerXssProtectionDslTests.kt

+ 1 - 4
config/src/main/kotlin/org/springframework/security/config/web/server/headers/ServerCacheControlDsl.kt → config/src/main/kotlin/org/springframework/security/config/web/server/ServerCacheControlDsl.kt

@@ -14,10 +14,7 @@
  * limitations under the License.
  */
 
-package org.springframework.security.config.web.server.headers
-
-import org.springframework.security.config.web.server.ServerHttpSecurity
-import org.springframework.security.config.web.server.ServerSecurityMarker
+package org.springframework.security.config.web.server
 
 /**
  * A Kotlin DSL to configure the [ServerHttpSecurity] cache control headers using

+ 1 - 4
config/src/main/kotlin/org/springframework/security/config/web/server/headers/ServerContentSecurityPolicyDsl.kt → config/src/main/kotlin/org/springframework/security/config/web/server/ServerContentSecurityPolicyDsl.kt

@@ -14,10 +14,7 @@
  * limitations under the License.
  */
 
-package org.springframework.security.config.web.server.headers
-
-import org.springframework.security.config.web.server.ServerHttpSecurity
-import org.springframework.security.config.web.server.ServerSecurityMarker
+package org.springframework.security.config.web.server
 
 /**
  * A Kotlin DSL to configure the [ServerHttpSecurity] Content-Security-Policy header using

+ 1 - 4
config/src/main/kotlin/org/springframework/security/config/web/server/headers/ServerContentTypeOptionsDsl.kt → config/src/main/kotlin/org/springframework/security/config/web/server/ServerContentTypeOptionsDsl.kt

@@ -14,10 +14,7 @@
  * limitations under the License.
  */
 
-package org.springframework.security.config.web.server.headers
-
-import org.springframework.security.config.web.server.ServerHttpSecurity
-import org.springframework.security.config.web.server.ServerSecurityMarker
+package org.springframework.security.config.web.server
 
 /**
  * A Kotlin DSL to configure the [ServerHttpSecurity] the content type options header

+ 1 - 3
config/src/main/kotlin/org/springframework/security/config/web/server/headers/ServerFrameOptionsDsl.kt → config/src/main/kotlin/org/springframework/security/config/web/server/ServerFrameOptionsDsl.kt

@@ -14,10 +14,8 @@
  * limitations under the License.
  */
 
-package org.springframework.security.config.web.server.headers
+package org.springframework.security.config.web.server
 
-import org.springframework.security.config.web.server.ServerHttpSecurity
-import org.springframework.security.config.web.server.ServerSecurityMarker
 import org.springframework.security.web.server.header.XFrameOptionsServerHttpHeadersWriter
 
 /**

+ 0 - 1
config/src/main/kotlin/org/springframework/security/config/web/server/ServerHeadersDsl.kt

@@ -16,7 +16,6 @@
 
 package org.springframework.security.config.web.server
 
-import org.springframework.security.config.web.server.headers.*
 import org.springframework.security.web.server.header.*
 
 /**

+ 1 - 3
config/src/main/kotlin/org/springframework/security/config/web/server/headers/ServerHttpStrictTransportSecurityDsl.kt → config/src/main/kotlin/org/springframework/security/config/web/server/ServerHttpStrictTransportSecurityDsl.kt

@@ -14,10 +14,8 @@
  * limitations under the License.
  */
 
-package org.springframework.security.config.web.server.headers
+package org.springframework.security.config.web.server
 
-import org.springframework.security.config.web.server.ServerHttpSecurity
-import org.springframework.security.config.web.server.ServerSecurityMarker
 import java.time.Duration
 
 /**

+ 1 - 3
config/src/main/kotlin/org/springframework/security/config/web/server/oauth2/resourceserver/ServerJwtDsl.kt → config/src/main/kotlin/org/springframework/security/config/web/server/ServerJwtDsl.kt

@@ -14,13 +14,11 @@
  * limitations under the License.
  */
 
-package org.springframework.security.config.web.server.oauth2.resourceserver
+package org.springframework.security.config.web.server
 
 import org.springframework.core.convert.converter.Converter
 import org.springframework.security.authentication.AbstractAuthenticationToken
 import org.springframework.security.authentication.ReactiveAuthenticationManager
-import org.springframework.security.config.web.server.ServerHttpSecurity
-import org.springframework.security.config.web.server.ServerSecurityMarker
 import org.springframework.security.core.Authentication
 import org.springframework.security.oauth2.jwt.Jwt
 import org.springframework.security.oauth2.jwt.ReactiveJwtDecoder

+ 0 - 2
config/src/main/kotlin/org/springframework/security/config/web/server/ServerOAuth2ResourceServerDsl.kt

@@ -17,8 +17,6 @@
 package org.springframework.security.config.web.server
 
 import org.springframework.security.authentication.ReactiveAuthenticationManagerResolver
-import org.springframework.security.config.web.server.oauth2.resourceserver.ServerJwtDsl
-import org.springframework.security.config.web.server.oauth2.resourceserver.ServerOpaqueTokenDsl
 import org.springframework.security.web.server.ServerAuthenticationEntryPoint
 import org.springframework.security.web.server.authentication.ServerAuthenticationConverter
 import org.springframework.security.web.server.authorization.ServerAccessDeniedHandler

+ 1 - 3
config/src/main/kotlin/org/springframework/security/config/web/server/oauth2/resourceserver/ServerOpaqueTokenDsl.kt → config/src/main/kotlin/org/springframework/security/config/web/server/ServerOpaqueTokenDsl.kt

@@ -14,10 +14,8 @@
  * limitations under the License.
  */
 
-package org.springframework.security.config.web.server.oauth2.resourceserver
+package org.springframework.security.config.web.server
 
-import org.springframework.security.config.web.server.ServerHttpSecurity
-import org.springframework.security.config.web.server.ServerSecurityMarker
 import org.springframework.security.oauth2.server.resource.introspection.ReactiveOpaqueTokenIntrospector
 
 /**

+ 1 - 3
config/src/main/kotlin/org/springframework/security/config/web/server/headers/ServerReferrerPolicyDsl.kt → config/src/main/kotlin/org/springframework/security/config/web/server/ServerReferrerPolicyDsl.kt

@@ -14,10 +14,8 @@
  * limitations under the License.
  */
 
-package org.springframework.security.config.web.server.headers
+package org.springframework.security.config.web.server
 
-import org.springframework.security.config.web.server.ServerHttpSecurity
-import org.springframework.security.config.web.server.ServerSecurityMarker
 import org.springframework.security.web.server.header.ReferrerPolicyServerHttpHeadersWriter
 
 /**

+ 1 - 4
config/src/main/kotlin/org/springframework/security/config/web/server/headers/ServerXssProtectionDsl.kt → config/src/main/kotlin/org/springframework/security/config/web/server/ServerXssProtectionDsl.kt

@@ -14,10 +14,7 @@
  * limitations under the License.
  */
 
-package org.springframework.security.config.web.server.headers
-
-import org.springframework.security.config.web.server.ServerHttpSecurity
-import org.springframework.security.config.web.server.ServerSecurityMarker
+package org.springframework.security.config.web.server
 
 /**
  * A Kotlin DSL to configure the [ServerHttpSecurity] XSS protection header using

+ 1 - 3
config/src/test/kotlin/org/springframework/security/config/web/server/headers/ServerCacheControlDslTests.kt → config/src/test/kotlin/org/springframework/security/config/web/server/ServerCacheControlDslTests.kt

@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package org.springframework.security.config.web.server.headers
+package org.springframework.security.config.web.server
 
 import org.junit.Rule
 import org.junit.Test
@@ -23,9 +23,7 @@ import org.springframework.context.ApplicationContext
 import org.springframework.context.annotation.Bean
 import org.springframework.http.HttpHeaders
 import org.springframework.security.config.annotation.web.reactive.EnableWebFluxSecurity
-import org.springframework.security.config.web.server.invoke
 import org.springframework.security.config.test.SpringTestRule
-import org.springframework.security.config.web.server.ServerHttpSecurity
 import org.springframework.security.web.server.SecurityWebFilterChain
 import org.springframework.test.web.reactive.server.WebTestClient
 import org.springframework.web.reactive.config.EnableWebFlux

+ 1 - 3
config/src/test/kotlin/org/springframework/security/config/web/server/headers/ServerContentSecurityPolicyDslTests.kt → config/src/test/kotlin/org/springframework/security/config/web/server/ServerContentSecurityPolicyDslTests.kt

@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package org.springframework.security.config.web.server.headers
+package org.springframework.security.config.web.server
 
 import org.junit.Rule
 import org.junit.Test
@@ -22,9 +22,7 @@ import org.springframework.beans.factory.annotation.Autowired
 import org.springframework.context.ApplicationContext
 import org.springframework.context.annotation.Bean
 import org.springframework.security.config.annotation.web.reactive.EnableWebFluxSecurity
-import org.springframework.security.config.web.server.invoke
 import org.springframework.security.config.test.SpringTestRule
-import org.springframework.security.config.web.server.ServerHttpSecurity
 import org.springframework.security.web.server.SecurityWebFilterChain
 import org.springframework.security.web.server.header.ContentSecurityPolicyServerHttpHeadersWriter
 import org.springframework.test.web.reactive.server.WebTestClient

+ 1 - 3
config/src/test/kotlin/org/springframework/security/config/web/server/headers/ServerContentTypeOptionsDslTests.kt → config/src/test/kotlin/org/springframework/security/config/web/server/ServerContentTypeOptionsDslTests.kt

@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package org.springframework.security.config.web.server.headers
+package org.springframework.security.config.web.server
 
 import org.junit.Rule
 import org.junit.Test
@@ -22,9 +22,7 @@ import org.springframework.beans.factory.annotation.Autowired
 import org.springframework.context.ApplicationContext
 import org.springframework.context.annotation.Bean
 import org.springframework.security.config.annotation.web.reactive.EnableWebFluxSecurity
-import org.springframework.security.config.web.server.invoke
 import org.springframework.security.config.test.SpringTestRule
-import org.springframework.security.config.web.server.ServerHttpSecurity
 import org.springframework.security.web.server.SecurityWebFilterChain
 import org.springframework.security.web.server.header.ContentTypeOptionsServerHttpHeadersWriter
 import org.springframework.test.web.reactive.server.WebTestClient

+ 1 - 3
config/src/test/kotlin/org/springframework/security/config/web/server/headers/ServerFrameOptionsDslTests.kt → config/src/test/kotlin/org/springframework/security/config/web/server/ServerFrameOptionsDslTests.kt

@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package org.springframework.security.config.web.server.headers
+package org.springframework.security.config.web.server
 
 import org.junit.Rule
 import org.junit.Test
@@ -22,9 +22,7 @@ import org.springframework.beans.factory.annotation.Autowired
 import org.springframework.context.ApplicationContext
 import org.springframework.context.annotation.Bean
 import org.springframework.security.config.annotation.web.reactive.EnableWebFluxSecurity
-import org.springframework.security.config.web.server.invoke
 import org.springframework.security.config.test.SpringTestRule
-import org.springframework.security.config.web.server.ServerHttpSecurity
 import org.springframework.security.web.header.writers.frameoptions.XFrameOptionsHeaderWriter
 import org.springframework.security.web.server.SecurityWebFilterChain
 import org.springframework.security.web.server.header.XFrameOptionsServerHttpHeadersWriter

+ 0 - 0
config/src/test/kotlin/org/springframework/security/config/web/server/headers/ServerHttpStrictTransportSecurityDslTests.kt → config/src/test/kotlin/org/springframework/security/config/web/server/ServerHttpStrictTransportSecurityDslTests.kt


+ 1 - 3
config/src/test/kotlin/org/springframework/security/config/web/server/oauth2/resourceserver/ServerJwtDslTests.kt → config/src/test/kotlin/org/springframework/security/config/web/server/ServerJwtDslTests.kt

@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package org.springframework.security.config.web.server.oauth2.resourceserver
+package org.springframework.security.config.web.server
 
 import okhttp3.mockwebserver.MockResponse
 import okhttp3.mockwebserver.MockWebServer
@@ -31,8 +31,6 @@ import org.springframework.security.authentication.AbstractAuthenticationToken
 import org.springframework.security.authentication.TestingAuthenticationToken
 import org.springframework.security.config.annotation.web.reactive.EnableWebFluxSecurity
 import org.springframework.security.config.test.SpringTestRule
-import org.springframework.security.config.web.server.ServerHttpSecurity
-import org.springframework.security.config.web.server.invoke
 import org.springframework.security.oauth2.core.oidc.IdTokenClaimNames
 import org.springframework.security.oauth2.jwt.Jwt
 import org.springframework.security.oauth2.jwt.ReactiveJwtDecoder

+ 1 - 3
config/src/test/kotlin/org/springframework/security/config/web/server/oauth2/resourceserver/ServerOpaqueTokenDslTests.kt → config/src/test/kotlin/org/springframework/security/config/web/server/ServerOpaqueTokenDslTests.kt

@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package org.springframework.security.config.web.server.oauth2.resourceserver
+package org.springframework.security.config.web.server
 
 import okhttp3.mockwebserver.MockResponse
 import okhttp3.mockwebserver.MockWebServer
@@ -27,8 +27,6 @@ import org.springframework.context.annotation.Bean
 import org.springframework.http.HttpHeaders
 import org.springframework.security.config.annotation.web.reactive.EnableWebFluxSecurity
 import org.springframework.security.config.test.SpringTestRule
-import org.springframework.security.config.web.server.ServerHttpSecurity
-import org.springframework.security.config.web.server.invoke
 import org.springframework.security.oauth2.server.resource.introspection.NimbusReactiveOpaqueTokenIntrospector
 import org.springframework.security.oauth2.server.resource.introspection.ReactiveOpaqueTokenIntrospector
 import org.springframework.security.web.server.SecurityWebFilterChain

+ 1 - 3
config/src/test/kotlin/org/springframework/security/config/web/server/headers/ServerReferrerPolicyDslTests.kt → config/src/test/kotlin/org/springframework/security/config/web/server/ServerReferrerPolicyDslTests.kt

@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package org.springframework.security.config.web.server.headers
+package org.springframework.security.config.web.server
 
 import org.junit.Rule
 import org.junit.Test
@@ -22,9 +22,7 @@ import org.springframework.beans.factory.annotation.Autowired
 import org.springframework.context.ApplicationContext
 import org.springframework.context.annotation.Bean
 import org.springframework.security.config.annotation.web.reactive.EnableWebFluxSecurity
-import org.springframework.security.config.web.server.invoke
 import org.springframework.security.config.test.SpringTestRule
-import org.springframework.security.config.web.server.ServerHttpSecurity
 import org.springframework.security.web.header.writers.ReferrerPolicyHeaderWriter
 import org.springframework.security.web.server.SecurityWebFilterChain
 import org.springframework.security.web.server.header.ReferrerPolicyServerHttpHeadersWriter

+ 1 - 3
config/src/test/kotlin/org/springframework/security/config/web/server/headers/ServerXssProtectionDslTests.kt → config/src/test/kotlin/org/springframework/security/config/web/server/ServerXssProtectionDslTests.kt

@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package org.springframework.security.config.web.server.headers
+package org.springframework.security.config.web.server
 
 import org.junit.Rule
 import org.junit.Test
@@ -22,9 +22,7 @@ import org.springframework.beans.factory.annotation.Autowired
 import org.springframework.context.ApplicationContext
 import org.springframework.context.annotation.Bean
 import org.springframework.security.config.annotation.web.reactive.EnableWebFluxSecurity
-import org.springframework.security.config.web.server.invoke
 import org.springframework.security.config.test.SpringTestRule
-import org.springframework.security.config.web.server.ServerHttpSecurity
 import org.springframework.security.web.server.SecurityWebFilterChain
 import org.springframework.security.web.server.header.XXssProtectionServerHttpHeadersWriter
 import org.springframework.test.web.reactive.server.WebTestClient