SEC-1132: Moved access-control/authorization specific code to org.sf.security.access package. Created provisioning package for user management classes to remove cyclical deps. Some other moving of classes to remove code tangles. Restructuring of portlet module under org.sf.security.portlet

This commit is contained in:
Luke Taylor
2009-04-12 12:23:23 +00:00
parent 7c4d54f356
commit 9efb5a7007
288 changed files with 773 additions and 705 deletions

View File

@@ -15,7 +15,7 @@
package org.springframework.security.web;
import org.springframework.security.AccessDeniedException;
import org.springframework.security.access.AccessDeniedException;
import java.io.IOException;

View File

@@ -24,7 +24,7 @@ import javax.servlet.http.HttpServletResponse;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.security.AccessDeniedException;
import org.springframework.security.access.AccessDeniedException;
/**

View File

@@ -15,17 +15,16 @@
package org.springframework.security.web;
import org.springframework.security.AccessDeniedException;
import org.springframework.security.SpringSecurityException;
import org.springframework.security.AuthenticationException;
import org.springframework.security.AuthenticationTrustResolver;
import org.springframework.security.AuthenticationTrustResolverImpl;
import org.springframework.security.InsufficientAuthenticationException;
import org.springframework.security.access.AccessDeniedException;
import org.springframework.security.context.SecurityContextHolder;
import org.springframework.security.util.ThrowableAnalyzer;
import org.springframework.security.util.ThrowableCauseExtractor;
import org.springframework.security.web.savedrequest.SavedRequest;
import org.springframework.security.web.util.FilterChainOrder;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.util.Assert;
@@ -46,7 +45,7 @@ import javax.servlet.http.HttpServletResponse;
* <p>
* If an {@link AuthenticationException} is detected, the filter will launch the <code>authenticationEntryPoint</code>.
* This allows common handling of authentication failures originating from any subclass of
* {@link org.springframework.security.intercept.AbstractSecurityInterceptor}.
* {@link org.springframework.security.access.intercept.AbstractSecurityInterceptor}.
* <p>
* If an {@link AccessDeniedException} is detected, the filter will determine whether or not the user is an anonymous
* user. If they are an anonymous user, the <code>authenticationEntryPoint</code> will be launched. If they are not

View File

@@ -1,4 +1,4 @@
package org.springframework.security.web.util;
package org.springframework.security.web;
import org.springframework.util.Assert;

View File

@@ -36,7 +36,6 @@ import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.security.util.AntUrlPathMatcher;
import org.springframework.security.util.UrlMatcher;
import org.springframework.security.web.intercept.FilterInvocation;
import org.springframework.security.web.intercept.FilterInvocationSecurityMetadataSource;
import org.springframework.util.Assert;
import org.springframework.web.filter.DelegatingFilterProxy;

View File

@@ -13,7 +13,7 @@
* limitations under the License.
*/
package org.springframework.security.web.intercept;
package org.springframework.security.web;
import org.springframework.security.web.util.UrlUtils;

View File

@@ -15,7 +15,6 @@ import org.springframework.security.concurrent.SessionRegistry;
import org.springframework.security.context.SecurityContext;
import org.springframework.security.context.SecurityContextHolder;
import org.springframework.security.web.context.HttpSessionSecurityContextRepository;
import org.springframework.security.web.util.FilterChainOrder;
import org.springframework.security.web.util.SessionUtils;
/**

View File

@@ -22,9 +22,9 @@ import org.springframework.security.context.SecurityContextHolder;
import org.springframework.security.providers.AnonymousAuthenticationToken;
import org.springframework.security.userdetails.memory.UserAttribute;
import org.springframework.security.web.FilterChainOrder;
import org.springframework.security.web.SpringSecurityFilter;
import org.springframework.security.web.WebAuthenticationDetailsSource;
import org.springframework.security.web.util.FilterChainOrder;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.util.Assert;

View File

@@ -22,7 +22,7 @@ import org.springframework.security.AuthenticationServiceException;
import org.springframework.security.providers.UsernamePasswordAuthenticationToken;
import org.springframework.security.util.TextUtils;
import org.springframework.security.web.util.FilterChainOrder;
import org.springframework.security.web.FilterChainOrder;
import org.springframework.util.Assert;
import javax.servlet.http.HttpServletRequest;

View File

@@ -10,9 +10,9 @@ import javax.servlet.http.HttpSession;
import org.springframework.beans.BeanWrapperImpl;
import org.springframework.security.AuthenticationException;
import org.springframework.security.web.FilterChainOrder;
import org.springframework.security.web.SpringSecurityFilter;
import org.springframework.security.web.authentication.rememberme.AbstractRememberMeServices;
import org.springframework.security.web.util.FilterChainOrder;
/**
* For internal use with namespace configuration in the case where a user doesn't configure a login page.

View File

@@ -2,7 +2,7 @@ package org.springframework.security.web.authentication.preauth;
import javax.servlet.http.HttpServletRequest;
import org.springframework.security.web.util.FilterChainOrder;
import org.springframework.security.web.FilterChainOrder;
import org.springframework.util.Assert;
/**

View File

@@ -9,9 +9,9 @@ import org.apache.commons.logging.LogFactory;
import org.springframework.security.AuthenticationDetailsSourceImpl;
import org.springframework.security.GrantedAuthority;
import org.springframework.security.MutableGrantedAuthoritiesContainer;
import org.springframework.security.authoritymapping.Attributes2GrantedAuthoritiesMapper;
import org.springframework.security.authoritymapping.MappableAttributesRetriever;
import org.springframework.security.authoritymapping.SimpleAttributes2GrantedAuthoritiesMapper;
import org.springframework.security.access.authoritymapping.Attributes2GrantedAuthoritiesMapper;
import org.springframework.security.access.authoritymapping.MappableAttributesRetriever;
import org.springframework.security.access.authoritymapping.SimpleAttributes2GrantedAuthoritiesMapper;
import org.springframework.util.Assert;
/**

View File

@@ -1,7 +1,7 @@
package org.springframework.security.web.authentication.preauth.j2ee;
import org.springframework.security.web.authentication.preauth.PreAuthenticatedGrantedAuthoritiesWebAuthenticationDetails;
import org.springframework.security.authoritymapping.SimpleAttributes2GrantedAuthoritiesMapper;
import org.springframework.security.access.authoritymapping.SimpleAttributes2GrantedAuthoritiesMapper;
import java.util.ArrayList;
import java.util.Collection;

View File

@@ -2,7 +2,7 @@ package org.springframework.security.web.authentication.preauth.j2ee;
import java.io.InputStream;
import org.springframework.security.authoritymapping.XmlMappableAttributesRetriever;
import org.springframework.security.access.authoritymapping.XmlMappableAttributesRetriever;
/**
* <p>

View File

@@ -9,8 +9,8 @@ import org.springframework.beans.factory.InitializingBean;
import org.springframework.security.AuthenticationDetailsSourceImpl;
import org.springframework.security.GrantedAuthority;
import org.springframework.security.MutableGrantedAuthoritiesContainer;
import org.springframework.security.authoritymapping.Attributes2GrantedAuthoritiesMapper;
import org.springframework.security.authoritymapping.SimpleAttributes2GrantedAuthoritiesMapper;
import org.springframework.security.access.authoritymapping.Attributes2GrantedAuthoritiesMapper;
import org.springframework.security.access.authoritymapping.SimpleAttributes2GrantedAuthoritiesMapper;
import org.springframework.security.web.authentication.preauth.PreAuthenticatedGrantedAuthoritiesAuthenticationDetails;
import org.springframework.util.Assert;

View File

@@ -1,7 +1,7 @@
package org.springframework.security.web.authentication.preauth.x509;
import org.springframework.security.web.FilterChainOrder;
import org.springframework.security.web.authentication.preauth.AbstractPreAuthenticatedProcessingFilter;
import org.springframework.security.web.util.FilterChainOrder;
import javax.servlet.http.HttpServletRequest;
import java.security.cert.X509Certificate;

View File

@@ -9,12 +9,12 @@ import org.springframework.security.Authentication;
import org.springframework.security.AuthenticationDetailsSource;
import org.springframework.security.SpringSecurityMessageSource;
import org.springframework.security.AccountStatusException;
import org.springframework.security.providers.AccountStatusUserDetailsChecker;
import org.springframework.security.providers.RememberMeAuthenticationToken;
import org.springframework.security.userdetails.UserDetails;
import org.springframework.security.userdetails.UserDetailsService;
import org.springframework.security.userdetails.UsernameNotFoundException;
import org.springframework.security.userdetails.UserDetailsChecker;
import org.springframework.security.userdetails.checker.AccountStatusUserDetailsChecker;
import org.springframework.security.web.WebAuthenticationDetailsSource;
import org.springframework.security.web.logout.LogoutHandler;
import org.springframework.util.Assert;

View File

@@ -20,8 +20,8 @@ import org.springframework.security.AuthenticationException;
import org.springframework.security.AuthenticationManager;
import org.springframework.security.context.SecurityContextHolder;
import org.springframework.security.event.authentication.InteractiveAuthenticationSuccessEvent;
import org.springframework.security.web.FilterChainOrder;
import org.springframework.security.web.SpringSecurityFilter;
import org.springframework.security.web.util.FilterChainOrder;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.context.ApplicationEventPublisher;
import org.springframework.context.ApplicationEventPublisherAware;

View File

@@ -42,19 +42,19 @@ import org.springframework.security.GrantedAuthority;
import org.springframework.security.LockedException;
import org.springframework.security.SpringSecurityMessageSource;
import org.springframework.security.context.SecurityContextHolder;
import org.springframework.security.providers.AccountStatusUserDetailsChecker;
import org.springframework.security.providers.UsernamePasswordAuthenticationToken;
import org.springframework.security.userdetails.UserDetails;
import org.springframework.security.userdetails.UserDetailsChecker;
import org.springframework.security.userdetails.UserDetailsService;
import org.springframework.security.userdetails.UsernameNotFoundException;
import org.springframework.security.userdetails.checker.AccountStatusUserDetailsChecker;
import org.springframework.security.web.FilterChainOrder;
import org.springframework.security.web.SpringSecurityFilter;
import org.springframework.security.web.WebAuthenticationDetailsSource;
import org.springframework.security.web.authentication.AuthenticationFailureHandler;
import org.springframework.security.web.authentication.AuthenticationSuccessHandler;
import org.springframework.security.web.authentication.SimpleUrlAuthenticationFailureHandler;
import org.springframework.security.web.authentication.SimpleUrlAuthenticationSuccessHandler;
import org.springframework.security.web.util.FilterChainOrder;
import org.springframework.security.web.util.UrlUtils;
import org.springframework.util.Assert;
import org.springframework.util.StringUtils;

View File

@@ -32,11 +32,11 @@ import org.springframework.security.context.SecurityContextHolder;
import org.springframework.security.providers.AnonymousAuthenticationToken;
import org.springframework.security.providers.UsernamePasswordAuthenticationToken;
import org.springframework.security.web.AuthenticationEntryPoint;
import org.springframework.security.web.FilterChainOrder;
import org.springframework.security.web.SpringSecurityFilter;
import org.springframework.security.web.WebAuthenticationDetailsSource;
import org.springframework.security.web.authentication.rememberme.NullRememberMeServices;
import org.springframework.security.web.authentication.rememberme.RememberMeServices;
import org.springframework.security.web.util.FilterChainOrder;
import org.springframework.util.Assert;

View File

@@ -45,9 +45,9 @@ import org.springframework.security.userdetails.UserDetailsService;
import org.springframework.security.userdetails.UsernameNotFoundException;
import org.springframework.security.userdetails.cache.NullUserCache;
import org.springframework.security.util.StringSplitUtils;
import org.springframework.security.web.FilterChainOrder;
import org.springframework.security.web.SpringSecurityFilter;
import org.springframework.security.web.WebAuthenticationDetailsSource;
import org.springframework.security.web.util.FilterChainOrder;
import org.springframework.util.Assert;
import org.springframework.util.StringUtils;

View File

@@ -19,10 +19,10 @@ import org.springframework.security.Authentication;
import org.springframework.security.concurrent.SessionInformation;
import org.springframework.security.concurrent.SessionRegistry;
import org.springframework.security.context.SecurityContextHolder;
import org.springframework.security.web.FilterChainOrder;
import org.springframework.security.web.SpringSecurityFilter;
import org.springframework.security.web.logout.LogoutHandler;
import org.springframework.security.web.logout.SecurityContextLogoutHandler;
import org.springframework.security.web.util.FilterChainOrder;
import org.springframework.security.web.util.UrlUtils;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.util.Assert;

View File

@@ -21,7 +21,7 @@ import org.springframework.beans.factory.InitializingBean;
import org.springframework.security.context.SecurityContext;
import org.springframework.security.context.SecurityContextHolder;
import org.springframework.security.context.SecurityContextImpl;
import org.springframework.security.web.util.FilterChainOrder;
import org.springframework.security.web.FilterChainOrder;
/**
* Populates the {@link SecurityContextHolder} with information obtained from

View File

@@ -10,8 +10,8 @@ import javax.servlet.http.HttpSession;
import org.springframework.security.context.SecurityContext;
import org.springframework.security.context.SecurityContextHolder;
import org.springframework.security.web.FilterChainOrder;
import org.springframework.security.web.SpringSecurityFilter;
import org.springframework.security.web.util.FilterChainOrder;
/**
* Populates the {@link SecurityContextHolder} with information obtained from

View File

@@ -7,8 +7,8 @@ import org.springframework.expression.spel.support.StandardEvaluationContext;
import org.springframework.security.Authentication;
import org.springframework.security.AuthenticationTrustResolver;
import org.springframework.security.AuthenticationTrustResolverImpl;
import org.springframework.security.expression.support.SecurityExpressionRoot;
import org.springframework.security.web.intercept.FilterInvocation;
import org.springframework.security.access.expression.support.SecurityExpressionRoot;
import org.springframework.security.web.FilterInvocation;
/**
* Facade which isolates Spring Security's requirements for evaluating web-security expressions

View File

@@ -9,7 +9,7 @@ import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.expression.ExpressionParser;
import org.springframework.expression.ParseException;
import org.springframework.security.ConfigAttribute;
import org.springframework.security.access.ConfigAttribute;
import org.springframework.security.util.UrlMatcher;
import org.springframework.security.web.intercept.DefaultFilterInvocationSecurityMetadataSource;
import org.springframework.security.web.intercept.RequestKey;

View File

@@ -1,7 +1,7 @@
package org.springframework.security.web.expression;
import org.springframework.expression.Expression;
import org.springframework.security.ConfigAttribute;
import org.springframework.security.access.ConfigAttribute;
/**
* Simple expression configuration attribute for use in web request authorizations.

View File

@@ -4,10 +4,10 @@ import java.util.List;
import org.springframework.expression.EvaluationContext;
import org.springframework.security.Authentication;
import org.springframework.security.ConfigAttribute;
import org.springframework.security.expression.ExpressionUtils;
import org.springframework.security.vote.AccessDecisionVoter;
import org.springframework.security.web.intercept.FilterInvocation;
import org.springframework.security.access.ConfigAttribute;
import org.springframework.security.access.expression.ExpressionUtils;
import org.springframework.security.access.vote.AccessDecisionVoter;
import org.springframework.security.web.FilterInvocation;
/**
* Voter which handles web authorisation decisions.

View File

@@ -3,7 +3,7 @@ package org.springframework.security.web.expression;
import org.springframework.expression.EvaluationContext;
import org.springframework.expression.ExpressionParser;
import org.springframework.security.Authentication;
import org.springframework.security.web.intercept.FilterInvocation;
import org.springframework.security.web.FilterInvocation;
public interface WebSecurityExpressionHandler {
/**

View File

@@ -5,8 +5,8 @@ import java.net.UnknownHostException;
import java.util.Arrays;
import org.springframework.security.Authentication;
import org.springframework.security.expression.support.SecurityExpressionRoot;
import org.springframework.security.web.intercept.FilterInvocation;
import org.springframework.security.access.expression.support.SecurityExpressionRoot;
import org.springframework.security.web.FilterInvocation;
import org.springframework.util.StringUtils;
/**

View File

@@ -26,8 +26,9 @@ import java.util.Set;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.security.ConfigAttribute;
import org.springframework.security.access.ConfigAttribute;
import org.springframework.security.util.UrlMatcher;
import org.springframework.security.web.FilterInvocation;
/**

View File

@@ -15,7 +15,8 @@
package org.springframework.security.web.intercept;
import org.springframework.security.intercept.SecurityMetadataSource;
import org.springframework.security.access.intercept.SecurityMetadataSource;
import org.springframework.security.web.FilterInvocation;
/**

View File

@@ -15,10 +15,11 @@
package org.springframework.security.web.intercept;
import org.springframework.security.intercept.AbstractSecurityInterceptor;
import org.springframework.security.intercept.InterceptorStatusToken;
import org.springframework.security.intercept.SecurityMetadataSource;
import org.springframework.security.web.util.FilterChainOrder;
import org.springframework.security.access.intercept.AbstractSecurityInterceptor;
import org.springframework.security.access.intercept.InterceptorStatusToken;
import org.springframework.security.access.intercept.SecurityMetadataSource;
import org.springframework.security.web.FilterChainOrder;
import org.springframework.security.web.FilterInvocation;
import org.springframework.core.Ordered;
import java.io.IOException;

View File

@@ -20,10 +20,11 @@ import java.util.List;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.security.AccessDeniedException;
import org.springframework.security.Authentication;
import org.springframework.security.ConfigAttribute;
import org.springframework.security.intercept.AbstractSecurityInterceptor;
import org.springframework.security.access.AccessDeniedException;
import org.springframework.security.access.ConfigAttribute;
import org.springframework.security.access.intercept.AbstractSecurityInterceptor;
import org.springframework.security.web.FilterInvocation;
import org.springframework.util.Assert;

View File

@@ -26,8 +26,8 @@ import javax.servlet.http.HttpServletResponse;
import org.springframework.security.Authentication;
import org.springframework.security.context.SecurityContextHolder;
import org.springframework.security.web.FilterChainOrder;
import org.springframework.security.web.SpringSecurityFilter;
import org.springframework.security.web.util.FilterChainOrder;
import org.springframework.security.web.util.UrlUtils;
import org.springframework.util.Assert;
import org.springframework.util.StringUtils;

View File

@@ -227,7 +227,8 @@ public class SavedRequest implements java.io.Serializable {
* @return the full URL of this request
*/
public String getFullRequestUrl() {
return UrlUtils.getFullRequestUrl(this);
return UrlUtils.buildFullRequestUrl(this.getScheme(), this.getServerName(), this.getServerPort(), this.getContextPath(),
this.getRequestURL(), this.getServletPath(), this.getRequestURI(), this.getPathInfo(), this.getQueryString());
}
public Iterator<String> getHeaderNames() {
@@ -286,7 +287,8 @@ public class SavedRequest implements java.io.Serializable {
* @return the URL, excluding any server name, context path or servlet path
*/
public String getRequestUrl() {
return UrlUtils.getRequestUrl(this);
return UrlUtils.buildRequestUrl(this.getServletPath(), this.getRequestURI(), this.getContextPath(), this.getPathInfo(),
this.getQueryString());
}
public String getScheme() {

View File

@@ -15,8 +15,8 @@
package org.springframework.security.web.securechannel;
import org.springframework.security.ConfigAttribute;
import org.springframework.security.web.intercept.FilterInvocation;
import org.springframework.security.access.ConfigAttribute;
import org.springframework.security.web.FilterInvocation;
import java.io.IOException;
import java.util.List;

View File

@@ -15,9 +15,9 @@
package org.springframework.security.web.securechannel;
import org.springframework.security.ConfigAttribute;
import org.springframework.security.web.intercept.FilterInvocation;
import org.springframework.security.access.ConfigAttribute;
import org.springframework.security.web.FilterInvocation;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.util.Assert;

View File

@@ -27,11 +27,11 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.security.ConfigAttribute;
import org.springframework.security.access.ConfigAttribute;
import org.springframework.security.web.FilterChainOrder;
import org.springframework.security.web.FilterInvocation;
import org.springframework.security.web.SpringSecurityFilter;
import org.springframework.security.web.intercept.FilterInvocation;
import org.springframework.security.web.intercept.FilterInvocationSecurityMetadataSource;
import org.springframework.security.web.util.FilterChainOrder;
import org.springframework.util.Assert;

View File

@@ -15,8 +15,8 @@
package org.springframework.security.web.securechannel;
import org.springframework.security.ConfigAttribute;
import org.springframework.security.web.intercept.FilterInvocation;
import org.springframework.security.access.ConfigAttribute;
import org.springframework.security.web.FilterInvocation;
import java.io.IOException;
import java.util.List;

View File

@@ -21,8 +21,8 @@ import java.util.List;
import javax.servlet.ServletException;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.security.ConfigAttribute;
import org.springframework.security.web.intercept.FilterInvocation;
import org.springframework.security.access.ConfigAttribute;
import org.springframework.security.web.FilterInvocation;
import org.springframework.util.Assert;

View File

@@ -21,8 +21,8 @@ import java.util.List;
import javax.servlet.ServletException;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.security.ConfigAttribute;
import org.springframework.security.web.intercept.FilterInvocation;
import org.springframework.security.access.ConfigAttribute;
import org.springframework.security.web.FilterInvocation;
import org.springframework.util.Assert;

View File

@@ -24,7 +24,7 @@ import javax.servlet.ServletResponse;
import org.springframework.mock.web.MockHttpServletRequest;
import org.springframework.mock.web.MockHttpServletResponse;
import org.springframework.security.web.intercept.FilterInvocation;
import org.springframework.security.web.FilterInvocation;
import org.springframework.util.Assert;

View File

@@ -17,7 +17,7 @@ package org.springframework.security.web.util;
import javax.servlet.http.HttpServletRequest;
import org.springframework.security.web.intercept.FilterInvocation;
import org.springframework.security.web.FilterInvocation;
import org.springframework.security.web.savedrequest.SavedRequest;
@@ -42,7 +42,7 @@ public final class UrlUtils {
*
* @return the full URL
*/
private static String buildFullRequestUrl(String scheme, String serverName, int serverPort, String contextPath,
public static String buildFullRequestUrl(String scheme, String serverName, int serverPort, String contextPath,
String requestUrl, String servletPath, String requestURI, String pathInfo, String queryString) {
boolean includePort = true;
@@ -64,7 +64,7 @@ public final class UrlUtils {
*
* @return the URL, excluding any server name, context path or servlet path
*/
private static String buildRequestUrl(String servletPath, String requestURI, String contextPath, String pathInfo,
public static String buildRequestUrl(String servletPath, String requestURI, String contextPath, String pathInfo,
String queryString) {
String uri = servletPath;
@@ -84,11 +84,6 @@ public final class UrlUtils {
r.getRequestURL().toString(), r.getServletPath(), r.getRequestURI(), r.getPathInfo(), r.getQueryString());
}
public static String getFullRequestUrl(SavedRequest sr) {
return buildFullRequestUrl(sr.getScheme(), sr.getServerName(), sr.getServerPort(), sr.getContextPath(),
sr.getRequestURL(), sr.getServletPath(), sr.getRequestURI(), sr.getPathInfo(), sr.getQueryString());
}
public static String getRequestUrl(FilterInvocation fi) {
HttpServletRequest r = fi.getHttpRequest();
@@ -96,11 +91,6 @@ public final class UrlUtils {
r.getQueryString());
}
public static String getRequestUrl(SavedRequest sr) {
return buildRequestUrl(sr.getServletPath(), sr.getRequestURI(), sr.getContextPath(), sr.getPathInfo(),
sr.getQueryString());
}
/**
* Returns true if the supplied URL starts with a "/" or "http".
*/

View File

@@ -23,10 +23,10 @@ import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.security.web.FilterChainOrder;
import org.springframework.security.web.PortResolver;
import org.springframework.security.web.PortResolverImpl;
import org.springframework.security.web.SpringSecurityFilter;
import org.springframework.security.web.util.FilterChainOrder;
import org.springframework.util.Assert;
import org.springframework.util.ReflectionUtils;

View File

@@ -28,10 +28,10 @@ import junit.framework.TestCase;
import org.springframework.mock.web.MockHttpServletRequest;
import org.springframework.mock.web.MockHttpServletResponse;
import org.springframework.security.AccessDeniedException;
import org.springframework.security.BadCredentialsException;
import org.springframework.security.MockAuthenticationEntryPoint;
import org.springframework.security.MockPortResolver;
import org.springframework.security.access.AccessDeniedException;
import org.springframework.security.context.SecurityContextHolder;
import org.springframework.security.providers.AnonymousAuthenticationToken;
import org.springframework.security.util.AuthorityUtils;

View File

@@ -11,10 +11,10 @@ import org.springframework.mock.web.MockHttpServletRequest;
import org.springframework.mock.web.MockHttpServletResponse;
import org.springframework.security.Authentication;
import org.springframework.security.AuthenticationException;
import org.springframework.security.web.FilterChainOrder;
import org.springframework.security.web.authentication.AbstractProcessingFilter;
import org.springframework.security.web.authentication.AuthenticationProcessingFilter;
import org.springframework.security.web.authentication.DefaultLoginPageGeneratingFilter;
import org.springframework.security.web.util.FilterChainOrder;
/**
*

View File

@@ -2,8 +2,8 @@ package org.springframework.security.web.authentication.preauth;
import org.springframework.security.context.SecurityContextHolder;
import org.springframework.security.MockAuthenticationManager;
import org.springframework.security.web.FilterChainOrder;
import org.springframework.security.web.authentication.preauth.AbstractPreAuthenticatedProcessingFilter;
import org.springframework.security.web.util.FilterChainOrder;
import javax.servlet.http.HttpServletRequest;

View File

@@ -10,10 +10,10 @@ import javax.servlet.http.HttpServletRequest;
import junit.framework.TestCase;
import org.springframework.security.authoritymapping.MappableAttributesRetriever;
import org.springframework.security.authoritymapping.Attributes2GrantedAuthoritiesMapper;
import org.springframework.security.authoritymapping.SimpleMappableAttributesRetriever;
import org.springframework.security.authoritymapping.SimpleAttributes2GrantedAuthoritiesMapper;
import org.springframework.security.access.authoritymapping.Attributes2GrantedAuthoritiesMapper;
import org.springframework.security.access.authoritymapping.MappableAttributesRetriever;
import org.springframework.security.access.authoritymapping.SimpleAttributes2GrantedAuthoritiesMapper;
import org.springframework.security.access.authoritymapping.SimpleMappableAttributesRetriever;
import org.springframework.security.web.authentication.preauth.PreAuthenticatedGrantedAuthoritiesWebAuthenticationDetails;
import org.springframework.security.web.authentication.preauth.j2ee.J2eeBasedPreAuthenticatedWebAuthenticationDetailsSource;
import org.springframework.security.GrantedAuthority;

View File

@@ -22,10 +22,10 @@ import org.springframework.security.context.SecurityContext;
import org.springframework.security.context.SecurityContextHolder;
import org.springframework.security.context.SecurityContextImpl;
import org.springframework.security.providers.TestingAuthenticationToken;
import org.springframework.security.web.FilterChainOrder;
import org.springframework.security.web.context.HttpRequestResponseHolder;
import org.springframework.security.web.context.SecurityContextPersistenceFilter;
import org.springframework.security.web.context.SecurityContextRepository;
import org.springframework.security.web.util.FilterChainOrder;
public class SecurityContextPersistenceFilterTests {
Mockery jmock = new JUnit4Mockery();

View File

@@ -7,7 +7,7 @@ import org.jmock.integration.junit4.JUnit4Mockery;
import org.junit.Test;
import org.springframework.mock.web.MockHttpServletRequest;
import org.springframework.security.Authentication;
import org.springframework.security.web.intercept.FilterInvocation;
import org.springframework.security.web.FilterInvocation;
import org.springframework.security.web.util.FilterInvocationUtils;
/**

View File

@@ -26,11 +26,11 @@ import javax.servlet.FilterChain;
import org.junit.Test;
import org.springframework.mock.web.MockHttpServletRequest;
import org.springframework.mock.web.MockHttpServletResponse;
import org.springframework.security.ConfigAttribute;
import org.springframework.security.SecurityConfig;
import org.springframework.security.access.ConfigAttribute;
import org.springframework.security.access.SecurityConfig;
import org.springframework.security.util.AntUrlPathMatcher;
import org.springframework.security.web.FilterInvocation;
import org.springframework.security.web.intercept.DefaultFilterInvocationSecurityMetadataSource;
import org.springframework.security.web.intercept.FilterInvocation;
import org.springframework.security.web.intercept.RequestKey;
/**

View File

@@ -23,7 +23,7 @@ import javax.servlet.FilterChain;
import org.junit.Test;
import org.springframework.mock.web.MockHttpServletRequest;
import org.springframework.mock.web.MockHttpServletResponse;
import org.springframework.security.web.intercept.FilterInvocation;
import org.springframework.security.web.FilterInvocation;
/**
* Tests {@link FilterInvocation}.

View File

@@ -27,16 +27,16 @@ import org.junit.Before;
import org.junit.Test;
import org.springframework.mock.web.MockHttpServletRequest;
import org.springframework.mock.web.MockHttpServletResponse;
import org.springframework.security.AccessDecisionManager;
import org.springframework.security.Authentication;
import org.springframework.security.AuthenticationManager;
import org.springframework.security.ConfigAttribute;
import org.springframework.security.MockApplicationEventPublisher;
import org.springframework.security.RunAsManager;
import org.springframework.security.SecurityConfig;
import org.springframework.security.access.AccessDecisionManager;
import org.springframework.security.access.ConfigAttribute;
import org.springframework.security.access.SecurityConfig;
import org.springframework.security.access.intercept.RunAsManager;
import org.springframework.security.context.SecurityContextHolder;
import org.springframework.security.providers.TestingAuthenticationToken;
import org.springframework.security.web.intercept.FilterInvocation;
import org.springframework.security.web.FilterInvocation;
import org.springframework.security.web.intercept.FilterInvocationSecurityMetadataSource;
import org.springframework.security.web.intercept.FilterSecurityInterceptor;

View File

@@ -27,15 +27,15 @@ import org.jmock.integration.junit4.JUnit4Mockery;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.springframework.security.AccessDecisionManager;
import org.springframework.security.AccessDeniedException;
import org.springframework.security.Authentication;
import org.springframework.security.AuthenticationManager;
import org.springframework.security.MockApplicationEventPublisher;
import org.springframework.security.RunAsManager;
import org.springframework.security.access.AccessDecisionManager;
import org.springframework.security.access.AccessDeniedException;
import org.springframework.security.access.intercept.RunAsManager;
import org.springframework.security.context.SecurityContextHolder;
import org.springframework.security.providers.TestingAuthenticationToken;
import org.springframework.security.web.intercept.FilterInvocation;
import org.springframework.security.web.FilterInvocation;
import org.springframework.security.web.intercept.FilterInvocationSecurityMetadataSource;
import org.springframework.security.web.intercept.FilterSecurityInterceptor;
import org.springframework.security.web.intercept.WebInvocationPrivilegeEvaluator;

View File

@@ -29,9 +29,9 @@ import junit.framework.TestCase;
import org.springframework.mock.web.MockHttpServletRequest;
import org.springframework.mock.web.MockHttpServletResponse;
import org.springframework.security.ConfigAttribute;
import org.springframework.security.SecurityConfig;
import org.springframework.security.web.intercept.FilterInvocation;
import org.springframework.security.access.ConfigAttribute;
import org.springframework.security.access.SecurityConfig;
import org.springframework.security.web.FilterInvocation;
import org.springframework.security.web.securechannel.ChannelDecisionManagerImpl;
import org.springframework.security.web.securechannel.ChannelProcessor;

View File

@@ -28,9 +28,9 @@ import javax.servlet.ServletException;
import org.junit.Test;
import org.springframework.mock.web.MockHttpServletRequest;
import org.springframework.mock.web.MockHttpServletResponse;
import org.springframework.security.ConfigAttribute;
import org.springframework.security.SecurityConfig;
import org.springframework.security.web.intercept.FilterInvocation;
import org.springframework.security.access.ConfigAttribute;
import org.springframework.security.access.SecurityConfig;
import org.springframework.security.web.FilterInvocation;
import org.springframework.security.web.intercept.FilterInvocationSecurityMetadataSource;
import org.springframework.security.web.securechannel.ChannelDecisionManager;
import org.springframework.security.web.securechannel.ChannelProcessingFilter;

View File

@@ -23,8 +23,8 @@ import junit.framework.TestCase;
import org.springframework.mock.web.MockHttpServletRequest;
import org.springframework.mock.web.MockHttpServletResponse;
import org.springframework.security.SecurityConfig;
import org.springframework.security.web.intercept.FilterInvocation;
import org.springframework.security.access.SecurityConfig;
import org.springframework.security.web.FilterInvocation;
import org.springframework.security.web.securechannel.InsecureChannelProcessor;

View File

@@ -23,8 +23,8 @@ import junit.framework.TestCase;
import org.springframework.mock.web.MockHttpServletRequest;
import org.springframework.mock.web.MockHttpServletResponse;
import org.springframework.security.SecurityConfig;
import org.springframework.security.web.intercept.FilterInvocation;
import org.springframework.security.access.SecurityConfig;
import org.springframework.security.web.FilterInvocation;
import org.springframework.security.web.securechannel.SecureChannelProcessor;