1
0
mirror of synced 2026-08-05 01:36:56 +00:00

SEC-2357: Move *RequestMatcher to .matcher package

This commit is contained in:
Rob Winch
2013-10-14 11:55:56 -05:00
parent 45ad74a0bd
commit 51171efa7a
93 changed files with 239 additions and 182 deletions
@@ -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;
@@ -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;
@@ -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;
/**
@@ -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;
/**
*
@@ -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;
/**
@@ -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;
@@ -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;
/**
@@ -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;
@@ -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();
@@ -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;
/**
@@ -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;
/**
@@ -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.
@@ -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 {
@@ -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 {
@@ -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 {
@@ -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
*/
@@ -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
@@ -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 {
@@ -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));
}
}
@@ -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;
@@ -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
@@ -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
@@ -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
@@ -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;
@@ -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;
/**
@@ -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;
@@ -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;
/**
@@ -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;
@@ -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;
/**
@@ -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;
/**
@@ -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);
}
@@ -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));
}
}
@@ -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;
@@ -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;
@@ -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}.
@@ -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}
@@ -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
@@ -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
@@ -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
@@ -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;
/**
*
@@ -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;
/**
*
@@ -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
@@ -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
@@ -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;
/**
@@ -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;
@@ -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;
@@ -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;
/**
*
@@ -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;
/**
*
@@ -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
@@ -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;
/**
*