Bladeren bron

SEC-2357: Move *RequestMatcher to .matcher package

Rob Winch 12 jaren geleden
bovenliggende
commit
51171efa7a
93 gewijzigde bestanden met toevoegingen van 239 en 182 verwijderingen
  1. 1 0
      buildSrc/build.gradle
  2. 13 13
      config/src/main/java/org/springframework/security/config/annotation/web/AbstractRequestMatcherConfigurer.java
  3. 5 5
      config/src/main/java/org/springframework/security/config/annotation/web/builders/HttpSecurity.java
  4. 1 1
      config/src/main/java/org/springframework/security/config/annotation/web/builders/WebSecurity.java
  5. 2 2
      config/src/main/java/org/springframework/security/config/annotation/web/configurers/AbstractAuthenticationFilterConfigurer.java
  6. 1 1
      config/src/main/java/org/springframework/security/config/annotation/web/configurers/AbstractRequestMatcherMappingConfigurer.java
  7. 1 1
      config/src/main/java/org/springframework/security/config/annotation/web/configurers/ChannelSecurityConfigurer.java
  8. 1 1
      config/src/main/java/org/springframework/security/config/annotation/web/configurers/CsrfConfigurer.java
  9. 1 1
      config/src/main/java/org/springframework/security/config/annotation/web/configurers/ExceptionHandlingConfigurer.java
  10. 1 1
      config/src/main/java/org/springframework/security/config/annotation/web/configurers/ExpressionUrlAuthorizationConfigurer.java
  11. 2 2
      config/src/main/java/org/springframework/security/config/annotation/web/configurers/FormLoginConfigurer.java
  12. 3 3
      config/src/main/java/org/springframework/security/config/annotation/web/configurers/HttpBasicConfigurer.java
  13. 2 2
      config/src/main/java/org/springframework/security/config/annotation/web/configurers/LogoutConfigurer.java
  14. 1 1
      config/src/main/java/org/springframework/security/config/annotation/web/configurers/PermitAllSupport.java
  15. 6 6
      config/src/main/java/org/springframework/security/config/annotation/web/configurers/RequestCacheConfigurer.java
  16. 1 1
      config/src/main/java/org/springframework/security/config/annotation/web/configurers/UrlAuthorizationConfigurer.java
  17. 2 2
      config/src/main/java/org/springframework/security/config/annotation/web/configurers/openid/OpenIDLoginConfigurer.java
  18. 2 2
      config/src/main/java/org/springframework/security/config/http/DefaultFilterChainValidator.java
  19. 1 1
      config/src/main/java/org/springframework/security/config/http/HttpConfigurationBuilder.java
  20. 1 1
      config/src/main/java/org/springframework/security/config/http/HttpSecurityBeanDefinitionParser.java
  21. 4 4
      config/src/main/java/org/springframework/security/config/http/MatcherType.java
  22. 2 2
      config/src/test/groovy/org/springframework/security/config/annotation/web/RequestMatchersTests.groovy
  23. 2 2
      config/src/test/groovy/org/springframework/security/config/annotation/web/builders/NamespaceHttpTests.groovy
  24. 1 1
      config/src/test/groovy/org/springframework/security/config/annotation/web/configuration/WebSecurityConfigurationTests.groovy
  25. 3 3
      config/src/test/groovy/org/springframework/security/config/annotation/web/configurers/AbstractRequestMatcherMappingConfigurerTests.groovy
  26. 1 1
      config/src/test/groovy/org/springframework/security/config/annotation/web/configurers/CsrfConfigurerTests.groovy
  27. 1 1
      config/src/test/groovy/org/springframework/security/config/annotation/web/configurers/DefaultFiltersTests.groovy
  28. 1 1
      config/src/test/groovy/org/springframework/security/config/annotation/web/configurers/FormLoginConfigurerTests.groovy
  29. 1 1
      config/src/test/groovy/org/springframework/security/config/annotation/web/configurers/HeadersConfigurerTests.groovy
  30. 3 3
      config/src/test/groovy/org/springframework/security/config/annotation/web/configurers/NamespaceDebugTests.groovy
  31. 3 3
      config/src/test/groovy/org/springframework/security/config/annotation/web/configurers/NamespaceHttpCustomFilterTests.groovy
  32. 1 1
      config/src/test/groovy/org/springframework/security/config/annotation/web/configurers/NamespaceHttpHeadersTests.groovy
  33. 3 3
      config/src/test/groovy/org/springframework/security/config/annotation/web/configurers/NamespaceHttpJeeTests.groovy
  34. 3 3
      config/src/test/groovy/org/springframework/security/config/annotation/web/configurers/NamespaceHttpLogoutTests.groovy
  35. 1 1
      config/src/test/groovy/org/springframework/security/config/annotation/web/configurers/PermitAllSupportTests.groovy
  36. 1 1
      config/src/test/groovy/org/springframework/security/config/http/CsrfConfigTests.groovy
  37. 1 1
      config/src/test/groovy/org/springframework/security/config/http/HttpHeadersConfigTests.groovy
  38. 1 1
      config/src/test/groovy/org/springframework/security/config/http/InterceptUrlConfigTests.groovy
  39. 1 1
      config/src/test/groovy/org/springframework/security/config/http/MiscHttpConfigTests.groovy
  40. 3 3
      config/src/test/java/org/springframework/security/config/FilterChainProxyConfigTests.java
  41. 1 1
      config/src/test/java/org/springframework/security/config/http/DefaultFilterChainValidatorTests.java
  42. 5 5
      config/src/test/resources/org/springframework/security/util/filtertest-valid.xml
  43. 1 1
      docs/manual/src/asciidoctor/index.adoc
  44. 1 1
      web/src/main/java/org/springframework/security/web/DefaultSecurityFilterChain.java
  45. 1 1
      web/src/main/java/org/springframework/security/web/FilterChainProxy.java
  46. 1 1
      web/src/main/java/org/springframework/security/web/access/expression/ExpressionBasedFilterInvocationSecurityMetadataSource.java
  47. 1 1
      web/src/main/java/org/springframework/security/web/access/expression/WebSecurityExpressionRoot.java
  48. 1 1
      web/src/main/java/org/springframework/security/web/access/intercept/DefaultFilterInvocationSecurityMetadataSource.java
  49. 1 1
      web/src/main/java/org/springframework/security/web/authentication/AbstractAuthenticationProcessingFilter.java
  50. 3 3
      web/src/main/java/org/springframework/security/web/authentication/DelegatingAuthenticationEntryPoint.java
  51. 1 1
      web/src/main/java/org/springframework/security/web/authentication/logout/LogoutFilter.java
  52. 2 2
      web/src/main/java/org/springframework/security/web/csrf/CsrfFilter.java
  53. 1 1
      web/src/main/java/org/springframework/security/web/header/writers/DelegatingRequestMatcherHeaderWriter.java
  54. 1 1
      web/src/main/java/org/springframework/security/web/header/writers/HstsHeaderWriter.java
  55. 2 2
      web/src/main/java/org/springframework/security/web/savedrequest/HttpSessionRequestCache.java
  56. 1 1
      web/src/main/java/org/springframework/security/web/util/AntPathRequestMatcher.java
  57. 1 1
      web/src/main/java/org/springframework/security/web/util/AnyRequestMatcher.java
  58. 1 1
      web/src/main/java/org/springframework/security/web/util/ELRequestMatcher.java
  59. 1 1
      web/src/main/java/org/springframework/security/web/util/IpAddressMatcher.java
  60. 1 1
      web/src/main/java/org/springframework/security/web/util/RegexRequestMatcher.java
  61. 1 0
      web/src/main/java/org/springframework/security/web/util/RequestMatcher.java
  62. 2 1
      web/src/main/java/org/springframework/security/web/util/RequestMatcherEditor.java
  63. 2 2
      web/src/main/java/org/springframework/security/web/util/matcher/AndRequestMatcher.java
  64. 9 15
      web/src/main/java/org/springframework/security/web/util/matcher/AntPathRequestMatcher.java
  65. 3 3
      web/src/main/java/org/springframework/security/web/util/matcher/AnyRequestMatcher.java
  66. 2 2
      web/src/main/java/org/springframework/security/web/util/matcher/ELRequestMatcher.java
  67. 1 1
      web/src/main/java/org/springframework/security/web/util/matcher/ELRequestMatcherContext.java
  68. 2 2
      web/src/main/java/org/springframework/security/web/util/matcher/IpAddressMatcher.java
  69. 2 2
      web/src/main/java/org/springframework/security/web/util/matcher/MediaTypeRequestMatcher.java
  70. 2 2
      web/src/main/java/org/springframework/security/web/util/matcher/NegatedRequestMatcher.java
  71. 2 2
      web/src/main/java/org/springframework/security/web/util/matcher/OrRequestMatcher.java
  72. 2 2
      web/src/main/java/org/springframework/security/web/util/matcher/RegexRequestMatcher.java
  73. 2 2
      web/src/main/java/org/springframework/security/web/util/matcher/RequestHeaderRequestMatcher.java
  74. 21 0
      web/src/main/java/org/springframework/security/web/util/matcher/RequestMatcher.java
  75. 39 0
      web/src/main/java/org/springframework/security/web/util/matcher/RequestMatcherEditor.java
  76. 1 1
      web/src/test/java/org/springframework/security/web/FilterChainProxyTests.java
  77. 2 2
      web/src/test/java/org/springframework/security/web/access/expression/ExpressionBasedFilterInvocationSecurityMetadataSourceTests.java
  78. 2 2
      web/src/test/java/org/springframework/security/web/access/intercept/DefaultFilterInvocationSecurityMetadataSourceTests.java
  79. 1 1
      web/src/test/java/org/springframework/security/web/authentication/DelegatingAuthenticationEntryPointTests.java
  80. 1 1
      web/src/test/java/org/springframework/security/web/csrf/CsrfFilterTests.java
  81. 1 1
      web/src/test/java/org/springframework/security/web/header/writers/DelegatingRequestMatcherHeaderWriterTests.java
  82. 1 1
      web/src/test/java/org/springframework/security/web/header/writers/HstsHeaderWriterTests.java
  83. 1 1
      web/src/test/java/org/springframework/security/web/savedrequest/HttpSessionRequestCacheTests.java
  84. 3 3
      web/src/test/java/org/springframework/security/web/util/matcher/AndRequestMatcherTests.java
  85. 3 3
      web/src/test/java/org/springframework/security/web/util/matcher/AntPathRequestMatcherTests.java
  86. 2 2
      web/src/test/java/org/springframework/security/web/util/matcher/ELRequestMatcherTests.java
  87. 2 2
      web/src/test/java/org/springframework/security/web/util/matcher/IpAddressMatcherTests.java
  88. 2 2
      web/src/test/java/org/springframework/security/web/util/matcher/MediaTypeRequestMatcherRequestHCNSTests.java
  89. 2 2
      web/src/test/java/org/springframework/security/web/util/matcher/MediaTypeRequestMatcherTests.java
  90. 3 3
      web/src/test/java/org/springframework/security/web/util/matcher/NegatedRequestMatcherTests.java
  91. 3 3
      web/src/test/java/org/springframework/security/web/util/matcher/OrRequestMatcherTests.java
  92. 2 2
      web/src/test/java/org/springframework/security/web/util/matcher/RegexRequestMatcherTests.java
  93. 2 2
      web/src/test/java/org/springframework/security/web/util/matcher/RequestHeaderRequestMatcherTests.java

+ 1 - 0
buildSrc/build.gradle

@@ -40,6 +40,7 @@ dependencies {
         exclude group: 'rubygems', module :'erubis'
         exclude group: 'rubygems', module :'slim'
     }
+    compile 'net.alchim31:livereload-jvm:0.1.0'
     compile 'org.apache.avalon.framework:avalon-framework-api:4.3.1'
     compile 'org.apache.avalon.framework:avalon-framework-impl:4.3.1'
     compile 'org.apache.xmlgraphics:fop:1.1'

+ 13 - 13
config/src/main/java/org/springframework/security/config/annotation/web/AbstractRequestMatcherConfigurer.java

@@ -23,10 +23,10 @@ import org.springframework.http.HttpMethod;
 import org.springframework.security.config.annotation.SecurityBuilder;
 import org.springframework.security.config.annotation.SecurityConfigurerAdapter;
 import org.springframework.security.config.annotation.web.configurers.AbstractRequestMatcherMappingConfigurer;
-import org.springframework.security.web.util.matchers.AntPathRequestMatcher;
-import org.springframework.security.web.util.matchers.AnyRequestMatcher;
-import org.springframework.security.web.util.matchers.RegexRequestMatcher;
-import org.springframework.security.web.util.RequestMatcher;
+import org.springframework.security.web.util.matcher.AntPathRequestMatcher;
+import org.springframework.security.web.util.matcher.AnyRequestMatcher;
+import org.springframework.security.web.util.matcher.RegexRequestMatcher;
+import org.springframework.security.web.util.matcher.RequestMatcher;
 
 /**
  * A base class for registering {@link RequestMatcher}'s. For example, it might allow for specifying which
@@ -46,7 +46,7 @@ public abstract class AbstractRequestMatcherConfigurer<B extends SecurityBuilder
      * Maps any request.
      *
      * @param method the {@link HttpMethod} to use or {@code null} for any {@link HttpMethod}.
-     * @param antPatterns the ant patterns to create {@link org.springframework.security.web.util.matchers.AntPathRequestMatcher}
+     * @param antPatterns the ant patterns to create {@link org.springframework.security.web.util.matcher.AntPathRequestMatcher}
      *                    from
      *
      * @return the object that is chained after creating the {@link RequestMatcher}
@@ -56,10 +56,10 @@ public abstract class AbstractRequestMatcherConfigurer<B extends SecurityBuilder
     }
 
     /**
-     * Maps a {@link List} of {@link org.springframework.security.web.util.matchers.AntPathRequestMatcher} instances.
+     * Maps a {@link List} of {@link org.springframework.security.web.util.matcher.AntPathRequestMatcher} instances.
      *
      * @param method the {@link HttpMethod} to use or {@code null} for any {@link HttpMethod}.
-     * @param antPatterns the ant patterns to create {@link org.springframework.security.web.util.matchers.AntPathRequestMatcher}
+     * @param antPatterns the ant patterns to create {@link org.springframework.security.web.util.matcher.AntPathRequestMatcher}
      *                    from
      *
      * @return the object that is chained after creating the {@link RequestMatcher}
@@ -69,10 +69,10 @@ public abstract class AbstractRequestMatcherConfigurer<B extends SecurityBuilder
     }
 
     /**
-     * Maps a {@link List} of {@link org.springframework.security.web.util.matchers.AntPathRequestMatcher} instances that do
+     * Maps a {@link List} of {@link org.springframework.security.web.util.matcher.AntPathRequestMatcher} instances that do
      * not care which {@link HttpMethod} is used.
      *
-     * @param antPatterns the ant patterns to create {@link org.springframework.security.web.util.matchers.AntPathRequestMatcher}
+     * @param antPatterns the ant patterns to create {@link org.springframework.security.web.util.matcher.AntPathRequestMatcher}
      *                    from
      *
      * @return the object that is chained after creating the {@link RequestMatcher}
@@ -82,11 +82,11 @@ public abstract class AbstractRequestMatcherConfigurer<B extends SecurityBuilder
     }
 
     /**
-     * Maps a {@link List} of {@link org.springframework.security.web.util.matchers.RegexRequestMatcher} instances.
+     * Maps a {@link List} of {@link org.springframework.security.web.util.matcher.RegexRequestMatcher} instances.
      *
      * @param method the {@link HttpMethod} to use or {@code null} for any {@link HttpMethod}.
      * @param regexPatterns the regular expressions to create
-     *                      {@link org.springframework.security.web.util.matchers.RegexRequestMatcher} from
+     *                      {@link org.springframework.security.web.util.matcher.RegexRequestMatcher} from
      *
      * @return the object that is chained after creating the {@link RequestMatcher}
      */
@@ -96,11 +96,11 @@ public abstract class AbstractRequestMatcherConfigurer<B extends SecurityBuilder
     }
 
     /**
-     * Create a {@link List} of {@link org.springframework.security.web.util.matchers.RegexRequestMatcher} instances that do not
+     * Create a {@link List} of {@link org.springframework.security.web.util.matcher.RegexRequestMatcher} instances that do not
      * specify an {@link HttpMethod}.
      *
      * @param regexPatterns the regular expressions to create
-     *                      {@link org.springframework.security.web.util.matchers.RegexRequestMatcher} from
+     *                      {@link org.springframework.security.web.util.matcher.RegexRequestMatcher} from
      *
      * @return the object that is chained after creating the {@link RequestMatcher}
      */

+ 5 - 5
config/src/main/java/org/springframework/security/config/annotation/web/builders/HttpSecurity.java

@@ -63,11 +63,11 @@ import org.springframework.security.web.PortMapper;
 import org.springframework.security.web.PortMapperImpl;
 import org.springframework.security.web.context.AbstractSecurityWebApplicationInitializer;
 import org.springframework.security.web.session.HttpSessionEventPublisher;
-import org.springframework.security.web.util.matchers.AntPathRequestMatcher;
-import org.springframework.security.web.util.matchers.AnyRequestMatcher;
-import org.springframework.security.web.util.matchers.RegexRequestMatcher;
-import org.springframework.security.web.util.RequestMatcher;
-import org.springframework.security.web.util.matchers.OrRequestMatcher;
+import org.springframework.security.web.util.matcher.AntPathRequestMatcher;
+import org.springframework.security.web.util.matcher.AnyRequestMatcher;
+import org.springframework.security.web.util.matcher.OrRequestMatcher;
+import org.springframework.security.web.util.matcher.RegexRequestMatcher;
+import org.springframework.security.web.util.matcher.RequestMatcher;
 import org.springframework.util.Assert;
 
 /**

+ 1 - 1
config/src/main/java/org/springframework/security/config/annotation/web/builders/WebSecurity.java

@@ -46,7 +46,7 @@ import org.springframework.security.web.access.intercept.FilterSecurityIntercept
 import org.springframework.security.web.debug.DebugFilter;
 import org.springframework.security.web.firewall.DefaultHttpFirewall;
 import org.springframework.security.web.firewall.HttpFirewall;
-import org.springframework.security.web.util.RequestMatcher;
+import org.springframework.security.web.util.matcher.RequestMatcher;
 import org.springframework.util.Assert;
 import org.springframework.web.filter.DelegatingFilterProxy;
 

+ 2 - 2
config/src/main/java/org/springframework/security/config/annotation/web/configurers/AbstractAuthenticationFilterConfigurer.java

@@ -36,8 +36,8 @@ import org.springframework.security.web.authentication.SavedRequestAwareAuthenti
 import org.springframework.security.web.authentication.SimpleUrlAuthenticationFailureHandler;
 import org.springframework.security.web.authentication.WebAuthenticationDetailsSource;
 import org.springframework.security.web.authentication.session.SessionAuthenticationStrategy;
-import org.springframework.security.web.util.RequestMatcher;
-import org.springframework.security.web.util.matchers.MediaTypeRequestMatcher;
+import org.springframework.security.web.util.matcher.RequestMatcher;
+import org.springframework.security.web.util.matcher.MediaTypeRequestMatcher;
 import org.springframework.web.accept.ContentNegotiationStrategy;
 import org.springframework.web.accept.HeaderContentNegotiationStrategy;
 

+ 1 - 1
config/src/main/java/org/springframework/security/config/annotation/web/configurers/AbstractRequestMatcherMappingConfigurer.java

@@ -23,7 +23,7 @@ import java.util.List;
 import org.springframework.security.access.ConfigAttribute;
 import org.springframework.security.config.annotation.SecurityBuilder;
 import org.springframework.security.config.annotation.web.AbstractRequestMatcherConfigurer;
-import org.springframework.security.web.util.RequestMatcher;
+import org.springframework.security.web.util.matcher.RequestMatcher;
 
 /**
  * A base class for registering {@link RequestMatcher}'s. For example, it might allow for specifying which

+ 1 - 1
config/src/main/java/org/springframework/security/config/annotation/web/configurers/ChannelSecurityConfigurer.java

@@ -35,7 +35,7 @@ import org.springframework.security.web.access.channel.RetryWithHttpEntryPoint;
 import org.springframework.security.web.access.channel.RetryWithHttpsEntryPoint;
 import org.springframework.security.web.access.channel.SecureChannelProcessor;
 import org.springframework.security.web.access.intercept.DefaultFilterInvocationSecurityMetadataSource;
-import org.springframework.security.web.util.RequestMatcher;
+import org.springframework.security.web.util.matcher.RequestMatcher;
 
 /**
  * Adds channel security (i.e. requires HTTPS or HTTP) to an application. In order for

+ 1 - 1
config/src/main/java/org/springframework/security/config/annotation/web/configurers/CsrfConfigurer.java

@@ -23,7 +23,7 @@ import org.springframework.security.web.csrf.CsrfFilter;
 import org.springframework.security.web.csrf.CsrfLogoutHandler;
 import org.springframework.security.web.csrf.CsrfTokenRepository;
 import org.springframework.security.web.csrf.HttpSessionCsrfTokenRepository;
-import org.springframework.security.web.util.RequestMatcher;
+import org.springframework.security.web.util.matcher.RequestMatcher;
 import org.springframework.util.Assert;
 
 /**

+ 1 - 1
config/src/main/java/org/springframework/security/config/annotation/web/configurers/ExceptionHandlingConfigurer.java

@@ -27,7 +27,7 @@ import org.springframework.security.web.authentication.DelegatingAuthenticationE
 import org.springframework.security.web.authentication.Http403ForbiddenEntryPoint;
 import org.springframework.security.web.savedrequest.HttpSessionRequestCache;
 import org.springframework.security.web.savedrequest.RequestCache;
-import org.springframework.security.web.util.RequestMatcher;
+import org.springframework.security.web.util.matcher.RequestMatcher;
 
 /**
  * Adds exception handling for Spring Security related exceptions to an application. All properties have reasonable

+ 1 - 1
config/src/main/java/org/springframework/security/config/annotation/web/configurers/ExpressionUrlAuthorizationConfigurer.java

@@ -32,7 +32,7 @@ import org.springframework.security.web.FilterInvocation;
 import org.springframework.security.web.access.expression.DefaultWebSecurityExpressionHandler;
 import org.springframework.security.web.access.expression.ExpressionBasedFilterInvocationSecurityMetadataSource;
 import org.springframework.security.web.access.expression.WebExpressionVoter;
-import org.springframework.security.web.util.RequestMatcher;
+import org.springframework.security.web.util.matcher.RequestMatcher;
 import org.springframework.util.Assert;
 import org.springframework.util.StringUtils;
 

+ 2 - 2
config/src/main/java/org/springframework/security/config/annotation/web/configurers/FormLoginConfigurer.java

@@ -23,8 +23,8 @@ import org.springframework.security.web.authentication.RememberMeServices;
 import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter;
 import org.springframework.security.web.authentication.session.SessionAuthenticationStrategy;
 import org.springframework.security.web.authentication.ui.DefaultLoginPageViewFilter;
-import org.springframework.security.web.util.matchers.AntPathRequestMatcher;
-import org.springframework.security.web.util.RequestMatcher;
+import org.springframework.security.web.util.matcher.AntPathRequestMatcher;
+import org.springframework.security.web.util.matcher.RequestMatcher;
 
 /**
  * Adds form based authentication. All attributes have reasonable defaults

+ 3 - 3
config/src/main/java/org/springframework/security/config/annotation/web/configurers/HttpBasicConfigurer.java

@@ -35,9 +35,9 @@ import org.springframework.security.web.authentication.DelegatingAuthenticationE
 import org.springframework.security.web.authentication.WebAuthenticationDetailsSource;
 import org.springframework.security.web.authentication.www.BasicAuthenticationEntryPoint;
 import org.springframework.security.web.authentication.www.BasicAuthenticationFilter;
-import org.springframework.security.web.util.RequestMatcher;
-import org.springframework.security.web.util.matchers.MediaTypeRequestMatcher;
-import org.springframework.security.web.util.matchers.RequestHeaderRequestMatcher;
+import org.springframework.security.web.util.matcher.RequestMatcher;
+import org.springframework.security.web.util.matcher.MediaTypeRequestMatcher;
+import org.springframework.security.web.util.matcher.RequestHeaderRequestMatcher;
 import org.springframework.web.accept.ContentNegotiationStrategy;
 import org.springframework.web.accept.HeaderContentNegotiationStrategy;
 

+ 2 - 2
config/src/main/java/org/springframework/security/config/annotation/web/configurers/LogoutConfigurer.java

@@ -30,8 +30,8 @@ import org.springframework.security.web.authentication.logout.LogoutSuccessHandl
 import org.springframework.security.web.authentication.logout.SecurityContextLogoutHandler;
 import org.springframework.security.web.authentication.logout.SimpleUrlLogoutSuccessHandler;
 import org.springframework.security.web.authentication.ui.DefaultLoginPageViewFilter;
-import org.springframework.security.web.util.matchers.AntPathRequestMatcher;
-import org.springframework.security.web.util.RequestMatcher;
+import org.springframework.security.web.util.matcher.AntPathRequestMatcher;
+import org.springframework.security.web.util.matcher.RequestMatcher;
 
 /**
  * Adds logout support. Other {@link SecurityConfigurer} instances may invoke

+ 1 - 1
config/src/main/java/org/springframework/security/config/annotation/web/configurers/PermitAllSupport.java

@@ -21,7 +21,7 @@ import javax.servlet.http.HttpServletRequest;
 import org.springframework.security.access.SecurityConfig;
 import org.springframework.security.config.annotation.web.HttpSecurityBuilder;
 import org.springframework.security.config.annotation.web.configurers.AbstractRequestMatcherMappingConfigurer.UrlMapping;
-import org.springframework.security.web.util.RequestMatcher;
+import org.springframework.security.web.util.matcher.RequestMatcher;
 
 
 /**

+ 6 - 6
config/src/main/java/org/springframework/security/config/annotation/web/configurers/RequestCacheConfigurer.java

@@ -23,12 +23,12 @@ import org.springframework.security.config.annotation.web.builders.HttpSecurity;
 import org.springframework.security.web.savedrequest.HttpSessionRequestCache;
 import org.springframework.security.web.savedrequest.RequestCache;
 import org.springframework.security.web.savedrequest.RequestCacheAwareFilter;
-import org.springframework.security.web.util.matchers.AntPathRequestMatcher;
-import org.springframework.security.web.util.RequestMatcher;
-import org.springframework.security.web.util.matchers.AndRequestMatcher;
-import org.springframework.security.web.util.matchers.MediaTypeRequestMatcher;
-import org.springframework.security.web.util.matchers.NegatedRequestMatcher;
-import org.springframework.security.web.util.matchers.RequestHeaderRequestMatcher;
+import org.springframework.security.web.util.matcher.AndRequestMatcher;
+import org.springframework.security.web.util.matcher.AntPathRequestMatcher;
+import org.springframework.security.web.util.matcher.MediaTypeRequestMatcher;
+import org.springframework.security.web.util.matcher.NegatedRequestMatcher;
+import org.springframework.security.web.util.matcher.RequestHeaderRequestMatcher;
+import org.springframework.security.web.util.matcher.RequestMatcher;
 import org.springframework.web.accept.ContentNegotiationStrategy;
 import org.springframework.web.accept.HeaderContentNegotiationStrategy;
 

+ 1 - 1
config/src/main/java/org/springframework/security/config/annotation/web/configurers/UrlAuthorizationConfigurer.java

@@ -29,7 +29,7 @@ import org.springframework.security.config.annotation.ObjectPostProcessor;
 import org.springframework.security.config.annotation.web.HttpSecurityBuilder;
 import org.springframework.security.web.access.intercept.DefaultFilterInvocationSecurityMetadataSource;
 import org.springframework.security.web.access.intercept.FilterInvocationSecurityMetadataSource;
-import org.springframework.security.web.util.RequestMatcher;
+import org.springframework.security.web.util.matcher.RequestMatcher;
 import org.springframework.util.Assert;
 
 

+ 2 - 2
config/src/main/java/org/springframework/security/config/annotation/web/configurers/openid/OpenIDLoginConfigurer.java

@@ -50,8 +50,8 @@ import org.springframework.security.web.authentication.LoginUrlAuthenticationEnt
 import org.springframework.security.web.authentication.RememberMeServices;
 import org.springframework.security.web.authentication.session.SessionAuthenticationStrategy;
 import org.springframework.security.web.authentication.ui.DefaultLoginPageViewFilter;
-import org.springframework.security.web.util.matchers.AntPathRequestMatcher;
-import org.springframework.security.web.util.RequestMatcher;
+import org.springframework.security.web.util.matcher.AntPathRequestMatcher;
+import org.springframework.security.web.util.matcher.RequestMatcher;
 
 /**
  * Adds support for OpenID based authentication.

+ 2 - 2
config/src/main/java/org/springframework/security/config/http/DefaultFilterChainValidator.java

@@ -25,8 +25,8 @@ import org.springframework.security.web.context.SecurityContextPersistenceFilter
 import org.springframework.security.web.jaasapi.JaasApiIntegrationFilter;
 import org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter;
 import org.springframework.security.web.session.SessionManagementFilter;
-import org.springframework.security.web.util.RequestMatcher;
-import org.springframework.security.web.util.matchers.AnyRequestMatcher;
+import org.springframework.security.web.util.matcher.RequestMatcher;
+import org.springframework.security.web.util.matcher.AnyRequestMatcher;
 
 public class DefaultFilterChainValidator implements FilterChainProxy.FilterChainValidator {
     private final Log logger = LogFactory.getLog(getClass());

+ 1 - 1
config/src/main/java/org/springframework/security/config/http/HttpConfigurationBuilder.java

@@ -70,7 +70,7 @@ import org.springframework.security.web.servletapi.SecurityContextHolderAwareReq
 import org.springframework.security.web.session.ConcurrentSessionFilter;
 import org.springframework.security.web.session.SessionManagementFilter;
 import org.springframework.security.web.session.SimpleRedirectInvalidSessionStrategy;
-import org.springframework.security.web.util.matchers.AntPathRequestMatcher;
+import org.springframework.security.web.util.matcher.AntPathRequestMatcher;
 import org.springframework.util.ClassUtils;
 import org.springframework.util.ReflectionUtils;
 import org.springframework.util.StringUtils;

+ 1 - 1
config/src/main/java/org/springframework/security/config/http/HttpSecurityBeanDefinitionParser.java

@@ -40,7 +40,7 @@ import org.springframework.security.config.authentication.AuthenticationManagerF
 import org.springframework.security.web.DefaultSecurityFilterChain;
 import org.springframework.security.web.FilterChainProxy;
 import org.springframework.security.web.PortResolverImpl;
-import org.springframework.security.web.util.matchers.AnyRequestMatcher;
+import org.springframework.security.web.util.matcher.AnyRequestMatcher;
 import org.springframework.util.StringUtils;
 import org.springframework.util.xml.DomUtils;
 import org.w3c.dom.Element;

+ 4 - 4
config/src/main/java/org/springframework/security/config/http/MatcherType.java

@@ -5,10 +5,10 @@ import org.apache.commons.logging.LogFactory;
 import org.springframework.beans.factory.config.BeanDefinition;
 import org.springframework.beans.factory.support.BeanDefinitionBuilder;
 import org.springframework.beans.factory.support.RootBeanDefinition;
-import org.springframework.security.web.util.matchers.AntPathRequestMatcher;
-import org.springframework.security.web.util.matchers.AnyRequestMatcher;
-import org.springframework.security.web.util.matchers.RegexRequestMatcher;
-import org.springframework.security.web.util.RequestMatcher;
+import org.springframework.security.web.util.matcher.AntPathRequestMatcher;
+import org.springframework.security.web.util.matcher.AnyRequestMatcher;
+import org.springframework.security.web.util.matcher.RegexRequestMatcher;
+import org.springframework.security.web.util.matcher.RequestMatcher;
 import org.springframework.util.StringUtils;
 import org.w3c.dom.Element;
 

+ 2 - 2
config/src/test/groovy/org/springframework/security/config/annotation/web/RequestMatchersTests.groovy

@@ -18,8 +18,8 @@ package org.springframework.security.config.annotation.web;
 import static org.springframework.security.config.annotation.web.AbstractRequestMatcherConfigurer.RequestMatchers.*
 
 import org.springframework.http.HttpMethod;
-import org.springframework.security.web.util.matchers.AntPathRequestMatcher;
-import org.springframework.security.web.util.matchers.RegexRequestMatcher;
+import org.springframework.security.web.util.matcher.AntPathRequestMatcher;
+import org.springframework.security.web.util.matcher.RegexRequestMatcher;
 
 import spock.lang.Specification;
 

+ 2 - 2
config/src/test/groovy/org/springframework/security/config/annotation/web/builders/NamespaceHttpTests.groovy

@@ -50,8 +50,8 @@ import org.springframework.security.web.savedrequest.NullRequestCache
 import org.springframework.security.web.savedrequest.RequestCacheAwareFilter
 import org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter
 import org.springframework.security.web.session.SessionManagementFilter
-import org.springframework.security.web.util.matchers.RegexRequestMatcher
-import org.springframework.security.web.util.RequestMatcher
+import org.springframework.security.web.util.matcher.RegexRequestMatcher
+import org.springframework.security.web.util.matcher.RequestMatcher
 
 /**
  * Tests to verify that all the functionality of <http> attributes is present

+ 1 - 1
config/src/test/groovy/org/springframework/security/config/annotation/web/configuration/WebSecurityConfigurationTests.groovy

@@ -40,7 +40,7 @@ import org.springframework.security.web.access.WebInvocationPrivilegeEvaluator;
 import org.springframework.security.web.access.expression.DefaultWebSecurityExpressionHandler;
 import org.springframework.security.web.access.expression.WebSecurityExpressionHandler;
 import org.springframework.security.web.access.intercept.FilterSecurityInterceptor;
-import org.springframework.security.web.util.matchers.AnyRequestMatcher
+import org.springframework.security.web.util.matcher.AnyRequestMatcher
 import org.springframework.test.util.ReflectionTestUtils;
 
 /**

+ 3 - 3
config/src/test/groovy/org/springframework/security/config/annotation/web/configurers/AbstractRequestMatcherMappingConfigurerTests.groovy

@@ -23,9 +23,9 @@ import org.springframework.security.config.annotation.web.builders.HttpSecurity;
 import org.springframework.security.config.annotation.web.configurers.AbstractRequestMatcherMappingConfigurer;
 import org.springframework.security.web.DefaultSecurityFilterChain;
 import org.springframework.security.web.access.intercept.FilterInvocationSecurityMetadataSource;
-import org.springframework.security.web.util.matchers.AntPathRequestMatcher;
-import org.springframework.security.web.util.matchers.RegexRequestMatcher;
-import org.springframework.security.web.util.RequestMatcher;
+import org.springframework.security.web.util.matcher.AntPathRequestMatcher;
+import org.springframework.security.web.util.matcher.RegexRequestMatcher;
+import org.springframework.security.web.util.matcher.RequestMatcher;
 
 import spock.lang.Specification;
 

+ 1 - 1
config/src/test/groovy/org/springframework/security/config/annotation/web/configurers/CsrfConfigurerTests.groovy

@@ -27,7 +27,7 @@ import org.springframework.security.web.access.AccessDeniedHandler
 import org.springframework.security.web.csrf.CsrfFilter;
 import org.springframework.security.web.csrf.CsrfTokenRepository;
 import org.springframework.security.web.servlet.support.csrf.CsrfRequestDataValueProcessor;
-import org.springframework.security.web.util.RequestMatcher;
+import org.springframework.security.web.util.matcher.RequestMatcher;
 import org.springframework.web.servlet.support.RequestDataValueProcessor;
 
 import spock.lang.Unroll;

+ 1 - 1
config/src/test/groovy/org/springframework/security/config/annotation/web/configurers/DefaultFiltersTests.groovy

@@ -43,7 +43,7 @@ import org.springframework.security.web.header.HeaderWriterFilter
 import org.springframework.security.web.savedrequest.RequestCacheAwareFilter
 import org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter
 import org.springframework.security.web.session.SessionManagementFilter
-import org.springframework.security.web.util.matchers.AnyRequestMatcher
+import org.springframework.security.web.util.matcher.AnyRequestMatcher
 
 /**
  *

+ 1 - 1
config/src/test/groovy/org/springframework/security/config/annotation/web/configurers/FormLoginConfigurerTests.groovy

@@ -46,7 +46,7 @@ import org.springframework.security.web.header.HeaderWriterFilter
 import org.springframework.security.web.savedrequest.RequestCacheAwareFilter
 import org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter
 import org.springframework.security.web.session.SessionManagementFilter
-import org.springframework.security.web.util.matchers.AnyRequestMatcher
+import org.springframework.security.web.util.matcher.AnyRequestMatcher
 import org.springframework.test.util.ReflectionTestUtils
 
 import spock.lang.Unroll

+ 1 - 1
config/src/test/groovy/org/springframework/security/config/annotation/web/configurers/HeadersConfigurerTests.groovy

@@ -27,7 +27,7 @@ import org.springframework.security.web.access.AccessDeniedHandler
 import org.springframework.security.web.csrf.CsrfFilter;
 import org.springframework.security.web.csrf.CsrfTokenRepository;
 import org.springframework.security.web.servlet.support.csrf.CsrfRequestDataValueProcessor;
-import org.springframework.security.web.util.RequestMatcher;
+import org.springframework.security.web.util.matcher.RequestMatcher;
 import org.springframework.web.servlet.support.RequestDataValueProcessor;
 
 import spock.lang.Unroll;

+ 3 - 3
config/src/test/groovy/org/springframework/security/config/annotation/web/configurers/NamespaceDebugTests.groovy

@@ -51,9 +51,9 @@ import org.springframework.security.web.context.SecurityContextPersistenceFilter
 import org.springframework.security.web.debug.DebugFilter;
 import org.springframework.security.web.jaasapi.JaasApiIntegrationFilter;
 import org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter;
-import org.springframework.security.web.util.matchers.AntPathRequestMatcher
-import org.springframework.security.web.util.matchers.AnyRequestMatcher;
-import org.springframework.security.web.util.RequestMatcher
+import org.springframework.security.web.util.matcher.AntPathRequestMatcher
+import org.springframework.security.web.util.matcher.AnyRequestMatcher;
+import org.springframework.security.web.util.matcher.RequestMatcher
 
 import spock.lang.Ignore;
 

+ 3 - 3
config/src/test/groovy/org/springframework/security/config/annotation/web/configurers/NamespaceHttpCustomFilterTests.groovy

@@ -52,9 +52,9 @@ import org.springframework.security.web.context.NullSecurityContextRepository;
 import org.springframework.security.web.context.SecurityContextPersistenceFilter
 import org.springframework.security.web.jaasapi.JaasApiIntegrationFilter;
 import org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter;
-import org.springframework.security.web.util.matchers.AntPathRequestMatcher
-import org.springframework.security.web.util.matchers.AnyRequestMatcher;
-import org.springframework.security.web.util.RequestMatcher
+import org.springframework.security.web.util.matcher.AntPathRequestMatcher
+import org.springframework.security.web.util.matcher.AnyRequestMatcher;
+import org.springframework.security.web.util.matcher.RequestMatcher
 
 import spock.lang.Ignore;
 

+ 1 - 1
config/src/test/groovy/org/springframework/security/config/annotation/web/configurers/NamespaceHttpHeadersTests.groovy

@@ -27,7 +27,7 @@ import org.springframework.security.web.header.writers.XXssProtectionHeaderWrite
 import org.springframework.security.web.header.writers.frameoptions.StaticAllowFromStrategy
 import org.springframework.security.web.header.writers.frameoptions.XFrameOptionsHeaderWriter
 import org.springframework.security.web.header.writers.frameoptions.XFrameOptionsHeaderWriter.XFrameOptionsMode
-import org.springframework.security.web.util.matchers.AnyRequestMatcher
+import org.springframework.security.web.util.matcher.AnyRequestMatcher
 
 /**
  * Tests to verify that all the functionality of <headers> attributes is present

+ 3 - 3
config/src/test/groovy/org/springframework/security/config/annotation/web/configurers/NamespaceHttpJeeTests.groovy

@@ -67,9 +67,9 @@ import org.springframework.security.web.context.NullSecurityContextRepository;
 import org.springframework.security.web.context.SecurityContextPersistenceFilter
 import org.springframework.security.web.jaasapi.JaasApiIntegrationFilter;
 import org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter;
-import org.springframework.security.web.util.matchers.AntPathRequestMatcher
-import org.springframework.security.web.util.matchers.AnyRequestMatcher;
-import org.springframework.security.web.util.RequestMatcher
+import org.springframework.security.web.util.matcher.AntPathRequestMatcher
+import org.springframework.security.web.util.matcher.AnyRequestMatcher;
+import org.springframework.security.web.util.matcher.RequestMatcher
 import org.springframework.test.util.ReflectionTestUtils;
 
 /**

+ 3 - 3
config/src/test/groovy/org/springframework/security/config/annotation/web/configurers/NamespaceHttpLogoutTests.groovy

@@ -60,9 +60,9 @@ import org.springframework.security.web.context.NullSecurityContextRepository;
 import org.springframework.security.web.context.SecurityContextPersistenceFilter
 import org.springframework.security.web.jaasapi.JaasApiIntegrationFilter;
 import org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter;
-import org.springframework.security.web.util.matchers.AntPathRequestMatcher
-import org.springframework.security.web.util.matchers.AnyRequestMatcher;
-import org.springframework.security.web.util.RequestMatcher
+import org.springframework.security.web.util.matcher.AntPathRequestMatcher
+import org.springframework.security.web.util.matcher.AnyRequestMatcher;
+import org.springframework.security.web.util.matcher.RequestMatcher
 
 /**
  * Tests to verify that all the functionality of <logout> attributes is present

+ 1 - 1
config/src/test/groovy/org/springframework/security/config/annotation/web/configurers/PermitAllSupportTests.groovy

@@ -23,7 +23,7 @@ import org.springframework.security.config.annotation.authentication.builders.Au
 import org.springframework.security.config.annotation.web.builders.HttpSecurity;
 import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
 import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
-import org.springframework.security.web.util.RequestMatcher
+import org.springframework.security.web.util.matcher.RequestMatcher
 
 /**
  * @author Rob Winch

+ 1 - 1
config/src/test/groovy/org/springframework/security/config/http/CsrfConfigTests.groovy

@@ -31,7 +31,7 @@ import org.springframework.security.web.csrf.CsrfToken;
 import org.springframework.security.web.csrf.CsrfTokenRepository;
 import org.springframework.security.web.csrf.DefaultCsrfToken;
 import org.springframework.security.web.servlet.support.csrf.CsrfRequestDataValueProcessor
-import org.springframework.security.web.util.RequestMatcher
+import org.springframework.security.web.util.matcher.RequestMatcher
 import org.springframework.web.servlet.support.RequestDataValueProcessor;
 
 import spock.lang.Unroll

+ 1 - 1
config/src/test/groovy/org/springframework/security/config/http/HttpHeadersConfigTests.groovy

@@ -20,7 +20,7 @@ import org.springframework.mock.web.MockHttpServletResponse
 import org.springframework.security.web.FilterChainProxy
 import org.springframework.security.web.header.HeaderWriterFilter
 import org.springframework.security.web.header.writers.StaticHeadersWriter
-import org.springframework.security.web.util.matchers.AnyRequestMatcher
+import org.springframework.security.web.util.matcher.AnyRequestMatcher
 
 /**
  *

+ 1 - 1
config/src/test/groovy/org/springframework/security/config/http/InterceptUrlConfigTests.groovy

@@ -70,7 +70,7 @@ import org.springframework.security.access.vote.AffirmativeBased
 import org.springframework.security.access.PermissionEvaluator
 import org.springframework.security.core.Authentication
 import org.springframework.security.web.access.expression.DefaultWebSecurityExpressionHandler
-import org.springframework.security.web.util.matchers.AntPathRequestMatcher
+import org.springframework.security.web.util.matcher.AntPathRequestMatcher
 import org.springframework.security.authentication.AuthenticationManager
 
 

+ 1 - 1
config/src/test/groovy/org/springframework/security/config/http/MiscHttpConfigTests.groovy

@@ -71,7 +71,7 @@ import org.springframework.security.access.vote.AffirmativeBased
 import org.springframework.security.access.PermissionEvaluator
 import org.springframework.security.core.Authentication
 import org.springframework.security.web.access.expression.DefaultWebSecurityExpressionHandler
-import org.springframework.security.web.util.matchers.AntPathRequestMatcher
+import org.springframework.security.web.util.matcher.AntPathRequestMatcher
 import org.springframework.security.authentication.AuthenticationManager
 
 

+ 3 - 3
config/src/test/java/org/springframework/security/config/FilterChainProxyConfigTests.java

@@ -39,9 +39,9 @@ import org.springframework.security.web.SecurityFilterChain;
 import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter;
 import org.springframework.security.web.context.SecurityContextPersistenceFilter;
 import org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter;
-import org.springframework.security.web.util.matchers.AntPathRequestMatcher;
-import org.springframework.security.web.util.matchers.AnyRequestMatcher;
-import org.springframework.security.web.util.RequestMatcher;
+import org.springframework.security.web.util.matcher.AntPathRequestMatcher;
+import org.springframework.security.web.util.matcher.AnyRequestMatcher;
+import org.springframework.security.web.util.matcher.RequestMatcher;
 
 /**
  * Tests {@link FilterChainProxy}.

+ 1 - 1
config/src/test/java/org/springframework/security/config/http/DefaultFilterChainValidatorTests.java

@@ -38,7 +38,7 @@ import org.springframework.security.web.access.intercept.FilterInvocationSecurit
 import org.springframework.security.web.access.intercept.FilterSecurityInterceptor;
 import org.springframework.security.web.authentication.AnonymousAuthenticationFilter;
 import org.springframework.security.web.authentication.LoginUrlAuthenticationEntryPoint;
-import org.springframework.security.web.util.matchers.AnyRequestMatcher;
+import org.springframework.security.web.util.matcher.AnyRequestMatcher;
 
 /**
  *

+ 5 - 5
config/src/test/resources/org/springframework/security/util/filtertest-valid.xml

@@ -45,9 +45,9 @@
         </sec:authentication-provider>
     </sec:authentication-manager>
 
-    <bean id="mockNotAFilter" class="org.springframework.security.web.util.matchers.AnyRequestMatcher"/>
+    <bean id="mockNotAFilter" class="org.springframework.security.web.util.matcher.AnyRequestMatcher"/>
 
-    <bean id="fooMatcher" class="org.springframework.security.web.util.matchers.AntPathRequestMatcher">
+    <bean id="fooMatcher" class="org.springframework.security.web.util.matcher.AntPathRequestMatcher">
         <constructor-arg value="/foo/**"/>
     </bean>
 
@@ -137,7 +137,7 @@
                 </bean>
                 <bean class="org.springframework.security.web.DefaultSecurityFilterChain">
                     <constructor-arg>
-                        <bean class="org.springframework.security.web.util.matchers.AntPathRequestMatcher">
+                        <bean class="org.springframework.security.web.util.matcher.AntPathRequestMatcher">
                             <constructor-arg value="/some/other/path/**"/>
                         </bean>
                     </constructor-arg>
@@ -151,7 +151,7 @@
                 </bean>
                 <bean class="org.springframework.security.web.DefaultSecurityFilterChain">
                     <constructor-arg>
-                        <bean class="org.springframework.security.web.util.matchers.AntPathRequestMatcher">
+                        <bean class="org.springframework.security.web.util.matcher.AntPathRequestMatcher">
                             <constructor-arg value="/do/not/filter*"/>
                         </bean>
                     </constructor-arg>
@@ -161,7 +161,7 @@
                 </bean>
                 <bean class="org.springframework.security.web.DefaultSecurityFilterChain">
                     <constructor-arg>
-                        <bean class="org.springframework.security.web.util.matchers.AntPathRequestMatcher">
+                        <bean class="org.springframework.security.web.util.matcher.AntPathRequestMatcher">
                             <constructor-arg value="/**"/>
                         </bean>
                     </constructor-arg>

+ 1 - 1
docs/manual/src/asciidoctor/index.adoc

@@ -3086,7 +3086,7 @@ At times you may want to only write a header for certain requests. For example,
 <beans:bean id="headerWriter"
     class="org.springframework.security.web.header.writers.DelegatingRequestMatcherHeaderWriter">
     <beans:constructor-arg>
-        <bean class="org.springframework.security.web.util.matchers.AntPathRequestMatcher"
+        <bean class="org.springframework.security.web.util.matcher.AntPathRequestMatcher"
             c:pattern="/login"/>
     </beans:constructor-arg>
     <beans:constructor-arg>

+ 1 - 1
web/src/main/java/org/springframework/security/web/DefaultSecurityFilterChain.java

@@ -2,7 +2,7 @@ package org.springframework.security.web;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.springframework.security.web.util.RequestMatcher;
+import org.springframework.security.web.util.matcher.RequestMatcher;
 
 import javax.servlet.Filter;
 import javax.servlet.http.HttpServletRequest;

+ 1 - 1
web/src/main/java/org/springframework/security/web/FilterChainProxy.java

@@ -21,7 +21,7 @@ import org.springframework.security.core.context.SecurityContextHolder;
 import org.springframework.security.web.firewall.DefaultHttpFirewall;
 import org.springframework.security.web.firewall.FirewalledRequest;
 import org.springframework.security.web.firewall.HttpFirewall;
-import org.springframework.security.web.util.RequestMatcher;
+import org.springframework.security.web.util.matcher.RequestMatcher;
 import org.springframework.security.web.util.UrlUtils;
 import org.springframework.web.filter.DelegatingFilterProxy;
 import org.springframework.web.filter.GenericFilterBean;

+ 1 - 1
web/src/main/java/org/springframework/security/web/access/expression/ExpressionBasedFilterInvocationSecurityMetadataSource.java

@@ -13,7 +13,7 @@ import org.springframework.security.access.ConfigAttribute;
 import org.springframework.security.access.expression.SecurityExpressionHandler;
 import org.springframework.security.web.FilterInvocation;
 import org.springframework.security.web.access.intercept.DefaultFilterInvocationSecurityMetadataSource;
-import org.springframework.security.web.util.RequestMatcher;
+import org.springframework.security.web.util.matcher.RequestMatcher;
 import org.springframework.util.Assert;
 
 /**

+ 1 - 1
web/src/main/java/org/springframework/security/web/access/expression/WebSecurityExpressionRoot.java

@@ -5,7 +5,7 @@ import javax.servlet.http.HttpServletRequest;
 import org.springframework.security.access.expression.SecurityExpressionRoot;
 import org.springframework.security.core.Authentication;
 import org.springframework.security.web.FilterInvocation;
-import org.springframework.security.web.util.matchers.IpAddressMatcher;
+import org.springframework.security.web.util.matcher.IpAddressMatcher;
 
 /**
  *

+ 1 - 1
web/src/main/java/org/springframework/security/web/access/intercept/DefaultFilterInvocationSecurityMetadataSource.java

@@ -27,7 +27,7 @@ import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.springframework.security.access.ConfigAttribute;
 import org.springframework.security.web.FilterInvocation;
-import org.springframework.security.web.util.RequestMatcher;
+import org.springframework.security.web.util.matcher.RequestMatcher;
 
 
 /**

+ 1 - 1
web/src/main/java/org/springframework/security/web/authentication/AbstractAuthenticationProcessingFilter.java

@@ -40,7 +40,7 @@ import org.springframework.security.core.context.SecurityContextHolder;
 import org.springframework.security.web.WebAttributes;
 import org.springframework.security.web.authentication.session.NullAuthenticatedSessionStrategy;
 import org.springframework.security.web.authentication.session.SessionAuthenticationStrategy;
-import org.springframework.security.web.util.RequestMatcher;
+import org.springframework.security.web.util.matcher.RequestMatcher;
 import org.springframework.security.web.util.UrlUtils;
 import org.springframework.util.Assert;
 import org.springframework.web.filter.GenericFilterBean;

+ 3 - 3
web/src/main/java/org/springframework/security/web/authentication/DelegatingAuthenticationEntryPoint.java

@@ -27,9 +27,9 @@ import org.apache.commons.logging.LogFactory;
 import org.springframework.beans.factory.InitializingBean;
 import org.springframework.security.core.AuthenticationException;
 import org.springframework.security.web.AuthenticationEntryPoint;
-import org.springframework.security.web.util.matchers.ELRequestMatcher;
-import org.springframework.security.web.util.RequestMatcher;
-import org.springframework.security.web.util.RequestMatcherEditor;
+import org.springframework.security.web.util.matcher.ELRequestMatcher;
+import org.springframework.security.web.util.matcher.RequestMatcher;
+import org.springframework.security.web.util.matcher.RequestMatcherEditor;
 import org.springframework.util.Assert;
 
 /**

+ 1 - 1
web/src/main/java/org/springframework/security/web/authentication/logout/LogoutFilter.java

@@ -28,7 +28,7 @@ import javax.servlet.http.HttpServletResponse;
 
 import org.springframework.security.core.Authentication;
 import org.springframework.security.core.context.SecurityContextHolder;
-import org.springframework.security.web.util.RequestMatcher;
+import org.springframework.security.web.util.matcher.RequestMatcher;
 import org.springframework.security.web.util.UrlUtils;
 import org.springframework.util.Assert;
 import org.springframework.util.StringUtils;

+ 2 - 2
web/src/main/java/org/springframework/security/web/csrf/CsrfFilter.java

@@ -28,7 +28,7 @@ import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.springframework.security.web.access.AccessDeniedHandler;
 import org.springframework.security.web.access.AccessDeniedHandlerImpl;
-import org.springframework.security.web.util.RequestMatcher;
+import org.springframework.security.web.util.matcher.RequestMatcher;
 import org.springframework.security.web.util.UrlUtils;
 import org.springframework.util.Assert;
 import org.springframework.web.filter.OncePerRequestFilter;
@@ -218,7 +218,7 @@ public final class CsrfFilter extends OncePerRequestFilter {
         private Pattern allowedMethods = Pattern.compile("^(GET|HEAD|TRACE|OPTIONS)$");
 
         /* (non-Javadoc)
-         * @see org.springframework.security.web.util.RequestMatcher#matches(javax.servlet.http.HttpServletRequest)
+         * @see org.springframework.security.web.util.matcher.RequestMatcher#matches(javax.servlet.http.HttpServletRequest)
          */
         public boolean matches(HttpServletRequest request) {
             return !allowedMethods.matcher(request.getMethod()).matches();

+ 1 - 1
web/src/main/java/org/springframework/security/web/header/writers/DelegatingRequestMatcherHeaderWriter.java

@@ -19,7 +19,7 @@ import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
 import org.springframework.security.web.header.HeaderWriter;
-import org.springframework.security.web.util.RequestMatcher;
+import org.springframework.security.web.util.matcher.RequestMatcher;
 import org.springframework.util.Assert;
 
 /**

+ 1 - 1
web/src/main/java/org/springframework/security/web/header/writers/HstsHeaderWriter.java

@@ -21,7 +21,7 @@ import javax.servlet.http.HttpServletResponse;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.springframework.security.web.header.HeaderWriter;
-import org.springframework.security.web.util.RequestMatcher;
+import org.springframework.security.web.util.matcher.RequestMatcher;
 import org.springframework.util.Assert;
 
 /**

+ 2 - 2
web/src/main/java/org/springframework/security/web/savedrequest/HttpSessionRequestCache.java

@@ -8,8 +8,8 @@ import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.springframework.security.web.PortResolver;
 import org.springframework.security.web.PortResolverImpl;
-import org.springframework.security.web.util.matchers.AnyRequestMatcher;
-import org.springframework.security.web.util.RequestMatcher;
+import org.springframework.security.web.util.matcher.AnyRequestMatcher;
+import org.springframework.security.web.util.matcher.RequestMatcher;
 
 /**
  * {@code RequestCache} which stores the {@code SavedRequest} in the HttpSession.

+ 1 - 1
web/src/main/java/org/springframework/security/web/util/AntPathRequestMatcher.java

@@ -40,7 +40,7 @@ import org.springframework.util.StringUtils;
  * @author Luke Taylor
  * @author Rob Winch
  * @since 3.1
- * @deprecated use {@link org.springframework.security.web.util.matchers.AntPathRequestMatcher}
+ * @deprecated use {@link org.springframework.security.web.util.matcher.AntPathRequestMatcher}
  * @see org.springframework.util.AntPathMatcher
  */
 public final class AntPathRequestMatcher implements RequestMatcher {

+ 1 - 1
web/src/main/java/org/springframework/security/web/util/AnyRequestMatcher.java

@@ -7,7 +7,7 @@ import javax.servlet.http.HttpServletRequest;
  *
  * @author Luke Taylor
  * @since 3.1
- * @deprecated use org.springframework.security.web.util.matchers.AnyRequestMatcher.INSTANCE instead
+ * @deprecated use org.springframework.security.web.util.matcher.AnyRequestMatcher.INSTANCE instead
  */
 public final class AnyRequestMatcher implements RequestMatcher {
 

+ 1 - 1
web/src/main/java/org/springframework/security/web/util/ELRequestMatcher.java

@@ -35,7 +35,7 @@ import org.springframework.security.web.authentication.DelegatingAuthenticationE
  *
  * @author Mike Wiesner
  * @since 3.0.2
- * @deprecated Use org.springframework.security.web.util.matchers.ELRequestMatcher
+ * @deprecated Use org.springframework.security.web.util.matcher.ELRequestMatcher
  */
 public class ELRequestMatcher implements RequestMatcher {
 

+ 1 - 1
web/src/main/java/org/springframework/security/web/util/IpAddressMatcher.java

@@ -14,7 +14,7 @@ import org.springframework.util.StringUtils;
  * Both IPv6 and IPv4 addresses are supported, but a matcher which is configured with an IPv4 address will
  * never match a request which returns an IPv6 address, and vice-versa.
  *
- * @deprecated use {@link org.springframework.security.web.util.matchers.IpAddressMatcher}
+ * @deprecated use {@link org.springframework.security.web.util.matcher.IpAddressMatcher}
  * @author Luke Taylor
  * @since 3.0.2
  */

+ 1 - 1
web/src/main/java/org/springframework/security/web/util/RegexRequestMatcher.java

@@ -30,7 +30,7 @@ import org.springframework.util.StringUtils;
  * by default. Case-insensitive matching can be used by using the constructor which takes the {@code caseInsensitive}
  * argument.
  *
- * @deprecated use {@link org.springframework.security.web.util.matchers.RegexRequestMatcher}
+ * @deprecated use {@link org.springframework.security.web.util.matcher.RegexRequestMatcher}
  *
  * @author Luke Taylor
  * @author Rob Winch

+ 1 - 0
web/src/main/java/org/springframework/security/web/util/RequestMatcher.java

@@ -7,6 +7,7 @@ import javax.servlet.http.HttpServletRequest;
  *
  * @author Luke Taylor
  * @since 3.0.2
+ * @deprecated use {@link org.springframework.security.web.util.matcher.RequestMatcher}
  */
 public interface RequestMatcher {
 

+ 2 - 1
web/src/main/java/org/springframework/security/web/util/RequestMatcherEditor.java

@@ -28,12 +28,13 @@ import org.springframework.security.web.authentication.DelegatingAuthenticationE
  *
  * @author Mike Wiesner
  * @since 3.0.2
+ * @deprecated use {@link org.springframework.security.web.util.matcher.RequestMatcherEditor}
  */
 public class RequestMatcherEditor extends PropertyEditorSupport {
 
     @Override
     public void setAsText(String text) throws IllegalArgumentException {
-        setValue(new org.springframework.security.web.util.matchers.ELRequestMatcher(text));
+        setValue(new ELRequestMatcher(text));
     }
 
 }

+ 2 - 2
web/src/main/java/org/springframework/security/web/util/matchers/AndRequestMatcher.java → web/src/main/java/org/springframework/security/web/util/matcher/AndRequestMatcher.java

@@ -13,7 +13,7 @@
  * License for the specific language governing permissions and limitations under
  * the License.
  */
-package org.springframework.security.web.util.matchers;
+package org.springframework.security.web.util.matcher;
 
 import java.util.Arrays;
 import java.util.List;
@@ -22,7 +22,7 @@ import javax.servlet.http.HttpServletRequest;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.springframework.security.web.util.RequestMatcher;
+import org.springframework.security.web.util.matcher.RequestMatcher;
 import org.springframework.util.Assert;
 
 

+ 9 - 15
web/src/main/java/org/springframework/security/web/util/matchers/AntPathRequestMatcher.java → web/src/main/java/org/springframework/security/web/util/matcher/AntPathRequestMatcher.java

@@ -10,14 +10,14 @@
  * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations under the License.
  */
-package org.springframework.security.web.util.matchers;
+package org.springframework.security.web.util.matcher;
 
 import javax.servlet.http.HttpServletRequest;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.springframework.http.HttpMethod;
-import org.springframework.security.web.util.RequestMatcher;
+import org.springframework.security.web.util.matcher.RequestMatcher;
 import org.springframework.util.AntPathMatcher;
 import org.springframework.util.Assert;
 import org.springframework.util.StringUtils;
@@ -166,22 +166,16 @@ public final class AntPathRequestMatcher implements RequestMatcher {
         return pattern;
     }
 
-    @SuppressWarnings("deprecation")
     @Override
     public boolean equals(Object obj) {
-
-        if (obj instanceof org.springframework.security.web.util.AntPathRequestMatcher) {
-            org.springframework.security.web.util.AntPathRequestMatcher other = (org.springframework.security.web.util.AntPathRequestMatcher) obj;
-            return this.pattern.equals(other.getPattern()) &&
-                    this.httpMethod == other.getHttpMethod() &&
-                    this.caseSensitive == other.isCaseSensitive();
-        } else if(obj instanceof AntPathRequestMatcher) {
-            org.springframework.security.web.util.matchers.AntPathRequestMatcher other = (AntPathRequestMatcher) obj;
-            return this.pattern.equals(other.pattern) &&
-                    this.httpMethod == other.httpMethod &&
-                    this.caseSensitive == other.caseSensitive;
+        if (!(obj instanceof AntPathRequestMatcher)) {
+            return false;
         }
-        return false;
+
+        AntPathRequestMatcher other = (AntPathRequestMatcher) obj;
+        return this.pattern.equals(other.pattern) &&
+                this.httpMethod == other.httpMethod &&
+                this.caseSensitive == other.caseSensitive;
     }
 
     @Override

+ 3 - 3
web/src/main/java/org/springframework/security/web/util/matchers/AnyRequestMatcher.java → web/src/main/java/org/springframework/security/web/util/matcher/AnyRequestMatcher.java

@@ -13,11 +13,11 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.springframework.security.web.util.matchers;
+package org.springframework.security.web.util.matcher;
 
 import javax.servlet.http.HttpServletRequest;
 
-import org.springframework.security.web.util.RequestMatcher;
+import org.springframework.security.web.util.matcher.RequestMatcher;
 
 /**
  * Matches any supplied request.
@@ -35,7 +35,7 @@ public final class AnyRequestMatcher implements RequestMatcher {
     @Override
     @SuppressWarnings("deprecation")
     public boolean equals(Object obj) {
-        return obj instanceof AnyRequestMatcher || obj instanceof org.springframework.security.web.util.AnyRequestMatcher;
+        return obj instanceof AnyRequestMatcher || obj instanceof org.springframework.security.web.util.matcher.AnyRequestMatcher;
     }
 
     @Override

+ 2 - 2
web/src/main/java/org/springframework/security/web/util/matchers/ELRequestMatcher.java → web/src/main/java/org/springframework/security/web/util/matcher/ELRequestMatcher.java

@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package org.springframework.security.web.util.matchers;
+package org.springframework.security.web.util.matcher;
 
 import javax.servlet.http.HttpServletRequest;
 
@@ -23,7 +23,7 @@ import org.springframework.expression.Expression;
 import org.springframework.expression.spel.standard.SpelExpressionParser;
 import org.springframework.expression.spel.support.StandardEvaluationContext;
 import org.springframework.security.web.authentication.DelegatingAuthenticationEntryPoint;
-import org.springframework.security.web.util.RequestMatcher;
+import org.springframework.security.web.util.matcher.RequestMatcher;
 
 /**
  * A RequestMatcher implementation which uses a SpEL expression

+ 1 - 1
web/src/main/java/org/springframework/security/web/util/matchers/ELRequestMatcherContext.java → web/src/main/java/org/springframework/security/web/util/matcher/ELRequestMatcherContext.java

@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.springframework.security.web.util.matchers;
+package org.springframework.security.web.util.matcher;
 
 
 import javax.servlet.http.HttpServletRequest;

+ 2 - 2
web/src/main/java/org/springframework/security/web/util/matchers/IpAddressMatcher.java → web/src/main/java/org/springframework/security/web/util/matcher/IpAddressMatcher.java

@@ -1,4 +1,4 @@
-package org.springframework.security.web.util.matchers;
+package org.springframework.security.web.util.matcher;
 
 import java.net.InetAddress;
 import java.net.UnknownHostException;
@@ -6,7 +6,7 @@ import java.util.Arrays;
 
 import javax.servlet.http.HttpServletRequest;
 
-import org.springframework.security.web.util.RequestMatcher;
+import org.springframework.security.web.util.matcher.RequestMatcher;
 import org.springframework.util.StringUtils;
 
 /**

+ 2 - 2
web/src/main/java/org/springframework/security/web/util/matchers/MediaTypeRequestMatcher.java → web/src/main/java/org/springframework/security/web/util/matcher/MediaTypeRequestMatcher.java

@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.springframework.security.web.util.matchers;
+package org.springframework.security.web.util.matcher;
 
 import java.util.Arrays;
 import java.util.Collection;
@@ -26,7 +26,7 @@ import javax.servlet.http.HttpServletRequest;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.springframework.http.MediaType;
-import org.springframework.security.web.util.RequestMatcher;
+import org.springframework.security.web.util.matcher.RequestMatcher;
 import org.springframework.util.Assert;
 import org.springframework.web.HttpMediaTypeNotAcceptableException;
 import org.springframework.web.accept.ContentNegotiationStrategy;

+ 2 - 2
web/src/main/java/org/springframework/security/web/util/matchers/NegatedRequestMatcher.java → web/src/main/java/org/springframework/security/web/util/matcher/NegatedRequestMatcher.java

@@ -13,13 +13,13 @@
  * License for the specific language governing permissions and limitations under
  * the License.
  */
-package org.springframework.security.web.util.matchers;
+package org.springframework.security.web.util.matcher;
 
 import javax.servlet.http.HttpServletRequest;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.springframework.security.web.util.RequestMatcher;
+import org.springframework.security.web.util.matcher.RequestMatcher;
 import org.springframework.util.Assert;
 
 /**

+ 2 - 2
web/src/main/java/org/springframework/security/web/util/matchers/OrRequestMatcher.java → web/src/main/java/org/springframework/security/web/util/matcher/OrRequestMatcher.java

@@ -13,7 +13,7 @@
  * License for the specific language governing permissions and limitations under
  * the License.
  */
-package org.springframework.security.web.util.matchers;
+package org.springframework.security.web.util.matcher;
 
 import java.util.Arrays;
 import java.util.List;
@@ -22,7 +22,7 @@ import javax.servlet.http.HttpServletRequest;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.springframework.security.web.util.RequestMatcher;
+import org.springframework.security.web.util.matcher.RequestMatcher;
 import org.springframework.util.Assert;
 
 

+ 2 - 2
web/src/main/java/org/springframework/security/web/util/matchers/RegexRequestMatcher.java → web/src/main/java/org/springframework/security/web/util/matcher/RegexRequestMatcher.java

@@ -10,7 +10,7 @@
  * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations under the License.
  */
-package org.springframework.security.web.util.matchers;
+package org.springframework.security.web.util.matcher;
 
 import java.util.regex.Pattern;
 
@@ -19,7 +19,7 @@ import javax.servlet.http.HttpServletRequest;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.springframework.http.HttpMethod;
-import org.springframework.security.web.util.RequestMatcher;
+import org.springframework.security.web.util.matcher.RequestMatcher;
 import org.springframework.util.StringUtils;
 
 /**

+ 2 - 2
web/src/main/java/org/springframework/security/web/util/matchers/RequestHeaderRequestMatcher.java → web/src/main/java/org/springframework/security/web/util/matcher/RequestHeaderRequestMatcher.java

@@ -13,11 +13,11 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.springframework.security.web.util.matchers;
+package org.springframework.security.web.util.matcher;
 
 import javax.servlet.http.HttpServletRequest;
 
-import org.springframework.security.web.util.RequestMatcher;
+import org.springframework.security.web.util.matcher.RequestMatcher;
 import org.springframework.util.Assert;
 
 /**

+ 21 - 0
web/src/main/java/org/springframework/security/web/util/matcher/RequestMatcher.java

@@ -0,0 +1,21 @@
+package org.springframework.security.web.util.matcher;
+
+import javax.servlet.http.HttpServletRequest;
+
+/**
+ * Simple strategy to match an <tt>HttpServletRequest</tt>.
+ *
+ * @author Luke Taylor
+ * @since 3.0.2
+ */
+public interface RequestMatcher {
+
+    /**
+     * Decides whether the rule implemented by the strategy matches the supplied request.
+     *
+     * @param request the request to check for a match
+     * @return true if the request matches, false otherwise
+     */
+    boolean matches(HttpServletRequest request);
+
+}

+ 39 - 0
web/src/main/java/org/springframework/security/web/util/matcher/RequestMatcherEditor.java

@@ -0,0 +1,39 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.springframework.security.web.util.matcher;
+
+import java.beans.PropertyEditorSupport;
+
+import org.springframework.security.web.authentication.DelegatingAuthenticationEntryPoint;
+
+/**
+ * PropertyEditor which creates ELRequestMatcher instances from Strings
+ *
+ * This allows to use a String in a BeanDefinition instead of an (inner) bean
+ * if a RequestMatcher is required, e.g. in {@link DelegatingAuthenticationEntryPoint}
+ *
+ * @author Mike Wiesner
+ * @since 3.0.2
+ */
+public class RequestMatcherEditor extends PropertyEditorSupport {
+
+    @Override
+    public void setAsText(String text) throws IllegalArgumentException {
+        setValue(new ELRequestMatcher(text));
+    }
+
+}

+ 1 - 1
web/src/test/java/org/springframework/security/web/FilterChainProxyTests.java

@@ -14,7 +14,7 @@ import org.springframework.security.authentication.TestingAuthenticationToken;
 import org.springframework.security.core.context.SecurityContextHolder;
 import org.springframework.security.web.firewall.FirewalledRequest;
 import org.springframework.security.web.firewall.HttpFirewall;
-import org.springframework.security.web.util.RequestMatcher;
+import org.springframework.security.web.util.matcher.RequestMatcher;
 
 import javax.servlet.Filter;
 import javax.servlet.FilterChain;

+ 2 - 2
web/src/test/java/org/springframework/security/web/access/expression/ExpressionBasedFilterInvocationSecurityMetadataSourceTests.java

@@ -7,8 +7,8 @@ import org.junit.Test;
 import org.springframework.security.access.ConfigAttribute;
 import org.springframework.security.access.SecurityConfig;
 import org.springframework.security.web.FilterInvocation;
-import org.springframework.security.web.util.matchers.AnyRequestMatcher;
-import org.springframework.security.web.util.RequestMatcher;
+import org.springframework.security.web.util.matcher.AnyRequestMatcher;
+import org.springframework.security.web.util.matcher.RequestMatcher;
 
 import java.util.Collection;
 import java.util.LinkedHashMap;

+ 2 - 2
web/src/test/java/org/springframework/security/web/access/intercept/DefaultFilterInvocationSecurityMetadataSourceTests.java

@@ -29,8 +29,8 @@ import org.springframework.mock.web.MockHttpServletResponse;
 import org.springframework.security.access.ConfigAttribute;
 import org.springframework.security.access.SecurityConfig;
 import org.springframework.security.web.FilterInvocation;
-import org.springframework.security.web.util.matchers.AntPathRequestMatcher;
-import org.springframework.security.web.util.RequestMatcher;
+import org.springframework.security.web.util.matcher.AntPathRequestMatcher;
+import org.springframework.security.web.util.matcher.RequestMatcher;
 
 /**
  * Tests {@link DefaultFilterInvocationSecurityMetadataSource}.

+ 1 - 1
web/src/test/java/org/springframework/security/web/authentication/DelegatingAuthenticationEntryPointTests.java

@@ -25,7 +25,7 @@ import org.junit.Before;
 import org.junit.Test;
 import org.springframework.mock.web.MockHttpServletRequest;
 import org.springframework.security.web.AuthenticationEntryPoint;
-import org.springframework.security.web.util.RequestMatcher;
+import org.springframework.security.web.util.matcher.RequestMatcher;
 
 /**
  * Test class for {@link DelegatingAuthenticationEntryPoint}

+ 1 - 1
web/src/test/java/org/springframework/security/web/csrf/CsrfFilterTests.java

@@ -41,7 +41,7 @@ import org.mockito.runners.MockitoJUnitRunner;
 import org.springframework.mock.web.MockHttpServletRequest;
 import org.springframework.mock.web.MockHttpServletResponse;
 import org.springframework.security.web.access.AccessDeniedHandler;
-import org.springframework.security.web.util.RequestMatcher;
+import org.springframework.security.web.util.matcher.RequestMatcher;
 
 /**
  * @author Rob Winch

+ 1 - 1
web/src/test/java/org/springframework/security/web/header/writers/DelegatingRequestMatcherHeaderWriterTests.java

@@ -27,7 +27,7 @@ import org.mockito.runners.MockitoJUnitRunner;
 import org.springframework.mock.web.MockHttpServletRequest;
 import org.springframework.mock.web.MockHttpServletResponse;
 import org.springframework.security.web.header.HeaderWriter;
-import org.springframework.security.web.util.RequestMatcher;
+import org.springframework.security.web.util.matcher.RequestMatcher;
 
 /**
  * @author Rob Winch

+ 1 - 1
web/src/test/java/org/springframework/security/web/header/writers/HstsHeaderWriterTests.java

@@ -22,7 +22,7 @@ import org.junit.Test;
 import org.springframework.mock.web.MockHttpServletRequest;
 import org.springframework.mock.web.MockHttpServletResponse;
 import org.springframework.security.web.header.writers.HstsHeaderWriter;
-import org.springframework.security.web.util.matchers.AnyRequestMatcher;
+import org.springframework.security.web.util.matcher.AnyRequestMatcher;
 
 /**
  * @author Rob Winch

+ 1 - 1
web/src/test/java/org/springframework/security/web/savedrequest/HttpSessionRequestCacheTests.java

@@ -17,7 +17,7 @@ import org.junit.Test;
 import org.springframework.mock.web.MockHttpServletRequest;
 import org.springframework.mock.web.MockHttpServletResponse;
 import org.springframework.security.web.PortResolverImpl;
-import org.springframework.security.web.util.RequestMatcher;
+import org.springframework.security.web.util.matcher.RequestMatcher;
 
 /**
  *

+ 3 - 3
web/src/test/java/org/springframework/security/web/util/matchers/AndRequestMatcherTests.java → web/src/test/java/org/springframework/security/web/util/matcher/AndRequestMatcherTests.java

@@ -13,7 +13,7 @@
  * License for the specific language governing permissions and limitations under
  * the License.
  */
-package org.springframework.security.web.util.matchers;
+package org.springframework.security.web.util.matcher;
 
 import static org.fest.assertions.Assertions.assertThat;
 import static org.mockito.Mockito.when;
@@ -28,8 +28,8 @@ import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mockito.Mock;
 import org.mockito.runners.MockitoJUnitRunner;
-import org.springframework.security.web.util.RequestMatcher;
-import org.springframework.security.web.util.matchers.AndRequestMatcher;
+import org.springframework.security.web.util.matcher.RequestMatcher;
+import org.springframework.security.web.util.matcher.AndRequestMatcher;
 
 /**
  *

+ 3 - 3
web/src/test/java/org/springframework/security/web/util/matchers/AntPathRequestMatcherTests.java → web/src/test/java/org/springframework/security/web/util/matcher/AntPathRequestMatcherTests.java

@@ -10,7 +10,7 @@
  * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations under the License.
  */
-package org.springframework.security.web.util.matchers;
+package org.springframework.security.web.util.matcher;
 
 import static org.fest.assertions.Assertions.assertThat;
 import static org.junit.Assert.assertEquals;
@@ -25,8 +25,8 @@ import org.junit.runner.RunWith;
 import org.mockito.Mock;
 import org.mockito.runners.MockitoJUnitRunner;
 import org.springframework.mock.web.MockHttpServletRequest;
-import org.springframework.security.web.util.matchers.AntPathRequestMatcher;
-import org.springframework.security.web.util.matchers.AnyRequestMatcher;
+import org.springframework.security.web.util.matcher.AntPathRequestMatcher;
+import org.springframework.security.web.util.matcher.AnyRequestMatcher;
 
 /**
  * @author Luke Taylor

+ 2 - 2
web/src/test/java/org/springframework/security/web/util/matchers/ELRequestMatcherTests.java → web/src/test/java/org/springframework/security/web/util/matcher/ELRequestMatcherTests.java

@@ -13,13 +13,13 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.springframework.security.web.util.matchers;
+package org.springframework.security.web.util.matcher;
 
 import static org.junit.Assert.*;
 
 import org.junit.Test;
 import org.springframework.mock.web.MockHttpServletRequest;
-import org.springframework.security.web.util.matchers.ELRequestMatcher;
+import org.springframework.security.web.util.matcher.ELRequestMatcher;
 
 /**
  * @author Mike Wiesner

+ 2 - 2
web/src/test/java/org/springframework/security/web/util/matchers/IpAddressMatcherTests.java → web/src/test/java/org/springframework/security/web/util/matcher/IpAddressMatcherTests.java

@@ -1,4 +1,4 @@
-package org.springframework.security.web.util.matchers;
+package org.springframework.security.web.util.matcher;
 
 
 import static org.junit.Assert.*;
@@ -6,7 +6,7 @@ import static org.junit.Assert.*;
 import org.junit.Before;
 import org.junit.Test;
 import org.springframework.mock.web.MockHttpServletRequest;
-import org.springframework.security.web.util.matchers.IpAddressMatcher;
+import org.springframework.security.web.util.matcher.IpAddressMatcher;
 
 
 /**

+ 2 - 2
web/src/test/java/org/springframework/security/web/util/matchers/MediaTypeRequestMatcherRequestHCNSTests.java → web/src/test/java/org/springframework/security/web/util/matcher/MediaTypeRequestMatcherRequestHCNSTests.java

@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.springframework.security.web.util.matchers;
+package org.springframework.security.web.util.matcher;
 
 import static org.fest.assertions.Assertions.assertThat;
 
@@ -23,7 +23,7 @@ import org.junit.Before;
 import org.junit.Test;
 import org.springframework.http.MediaType;
 import org.springframework.mock.web.MockHttpServletRequest;
-import org.springframework.security.web.util.matchers.MediaTypeRequestMatcher;
+import org.springframework.security.web.util.matcher.MediaTypeRequestMatcher;
 import org.springframework.web.accept.ContentNegotiationStrategy;
 import org.springframework.web.accept.HeaderContentNegotiationStrategy;
 

+ 2 - 2
web/src/test/java/org/springframework/security/web/util/matchers/MediaTypeRequestMatcherTests.java → web/src/test/java/org/springframework/security/web/util/matcher/MediaTypeRequestMatcherTests.java

@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.springframework.security.web.util.matchers;
+package org.springframework.security.web.util.matcher;
 
 import static org.fest.assertions.Assertions.assertThat;
 import static org.mockito.Matchers.any;
@@ -30,7 +30,7 @@ import org.mockito.Mock;
 import org.mockito.runners.MockitoJUnitRunner;
 import org.springframework.http.MediaType;
 import org.springframework.mock.web.MockHttpServletRequest;
-import org.springframework.security.web.util.matchers.MediaTypeRequestMatcher;
+import org.springframework.security.web.util.matcher.MediaTypeRequestMatcher;
 import org.springframework.web.HttpMediaTypeNotAcceptableException;
 import org.springframework.web.accept.ContentNegotiationStrategy;
 import org.springframework.web.context.request.NativeWebRequest;

+ 3 - 3
web/src/test/java/org/springframework/security/web/util/matchers/NegatedRequestMatcherTests.java → web/src/test/java/org/springframework/security/web/util/matcher/NegatedRequestMatcherTests.java

@@ -13,7 +13,7 @@
  * License for the specific language governing permissions and limitations under
  * the License.
  */
-package org.springframework.security.web.util.matchers;
+package org.springframework.security.web.util.matcher;
 
 import static org.fest.assertions.Assertions.assertThat;
 import static org.mockito.Mockito.when;
@@ -24,8 +24,8 @@ import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mockito.Mock;
 import org.mockito.runners.MockitoJUnitRunner;
-import org.springframework.security.web.util.RequestMatcher;
-import org.springframework.security.web.util.matchers.NegatedRequestMatcher;
+import org.springframework.security.web.util.matcher.RequestMatcher;
+import org.springframework.security.web.util.matcher.NegatedRequestMatcher;
 
 /**
  *

+ 3 - 3
web/src/test/java/org/springframework/security/web/util/matchers/OrRequestMatcherTests.java → web/src/test/java/org/springframework/security/web/util/matcher/OrRequestMatcherTests.java

@@ -13,7 +13,7 @@
  * License for the specific language governing permissions and limitations under
  * the License.
  */
-package org.springframework.security.web.util.matchers;
+package org.springframework.security.web.util.matcher;
 
 import static org.fest.assertions.Assertions.assertThat;
 import static org.mockito.Mockito.when;
@@ -28,8 +28,8 @@ import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mockito.Mock;
 import org.mockito.runners.MockitoJUnitRunner;
-import org.springframework.security.web.util.RequestMatcher;
-import org.springframework.security.web.util.matchers.OrRequestMatcher;
+import org.springframework.security.web.util.matcher.RequestMatcher;
+import org.springframework.security.web.util.matcher.OrRequestMatcher;
 
 /**
  *

+ 2 - 2
web/src/test/java/org/springframework/security/web/util/matchers/RegexRequestMatcherTests.java → web/src/test/java/org/springframework/security/web/util/matcher/RegexRequestMatcherTests.java

@@ -10,7 +10,7 @@
  * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations under the License.
  */
-package org.springframework.security.web.util.matchers;
+package org.springframework.security.web.util.matcher;
 
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
@@ -23,7 +23,7 @@ import org.junit.runner.RunWith;
 import org.mockito.Mock;
 import org.mockito.runners.MockitoJUnitRunner;
 import org.springframework.mock.web.MockHttpServletRequest;
-import org.springframework.security.web.util.matchers.RegexRequestMatcher;
+import org.springframework.security.web.util.matcher.RegexRequestMatcher;
 
 /**
  * @author Luke Taylor

+ 2 - 2
web/src/test/java/org/springframework/security/web/util/matchers/RequestHeaderRequestMatcherTests.java → web/src/test/java/org/springframework/security/web/util/matcher/RequestHeaderRequestMatcherTests.java

@@ -13,14 +13,14 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.springframework.security.web.util.matchers;
+package org.springframework.security.web.util.matcher;
 
 import static org.fest.assertions.Assertions.assertThat;
 
 import org.junit.Before;
 import org.junit.Test;
 import org.springframework.mock.web.MockHttpServletRequest;
-import org.springframework.security.web.util.matchers.RequestHeaderRequestMatcher;
+import org.springframework.security.web.util.matcher.RequestHeaderRequestMatcher;
 
 /**
  *