SEC-1132: Moved userdetails into core and added core/authority sub-package
This commit is contained in:
@@ -34,9 +34,9 @@ import javax.servlet.ServletResponse;
|
||||
import org.apache.commons.logging.Log;
|
||||
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.FilterInvocationSecurityMetadataSource;
|
||||
import org.springframework.security.web.util.AntUrlPathMatcher;
|
||||
import org.springframework.security.web.util.UrlMatcher;
|
||||
import org.springframework.util.Assert;
|
||||
import org.springframework.web.filter.DelegatingFilterProxy;
|
||||
|
||||
|
||||
+1
-1
@@ -20,8 +20,8 @@ import org.springframework.security.authentication.AnonymousAuthenticationToken;
|
||||
import org.springframework.security.authentication.AuthenticationDetailsSource;
|
||||
import org.springframework.security.core.Authentication;
|
||||
import org.springframework.security.core.context.SecurityContextHolder;
|
||||
import org.springframework.security.core.userdetails.memory.UserAttribute;
|
||||
|
||||
import org.springframework.security.userdetails.memory.UserAttribute;
|
||||
import org.springframework.security.web.FilterChainOrder;
|
||||
import org.springframework.security.web.SpringSecurityFilter;
|
||||
import org.springframework.beans.factory.InitializingBean;
|
||||
|
||||
+3
-3
@@ -5,7 +5,7 @@ import java.util.List;
|
||||
|
||||
import org.springframework.security.authentication.AuthenticationDetails;
|
||||
import org.springframework.security.core.GrantedAuthority;
|
||||
import org.springframework.security.core.MutableGrantedAuthoritiesContainer;
|
||||
import org.springframework.security.core.authority.MutableGrantedAuthoritiesContainer;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
/**
|
||||
@@ -37,7 +37,7 @@ public class PreAuthenticatedGrantedAuthoritiesAuthenticationDetails extends Aut
|
||||
|
||||
/**
|
||||
*
|
||||
* @see org.springframework.security.core.GrantedAuthoritiesContainer#getGrantedAuthorities()
|
||||
* @see org.springframework.security.core.authority.GrantedAuthoritiesContainer#getGrantedAuthorities()
|
||||
*/
|
||||
public List<GrantedAuthority> getGrantedAuthorities() {
|
||||
Assert.notNull(preAuthenticatedGrantedAuthorities, "Pre-authenticated granted authorities have not been set");
|
||||
@@ -46,7 +46,7 @@ public class PreAuthenticatedGrantedAuthoritiesAuthenticationDetails extends Aut
|
||||
}
|
||||
|
||||
/**
|
||||
* @see org.springframework.security.core.MutableGrantedAuthoritiesContainer#setGrantedAuthorities()
|
||||
* @see org.springframework.security.core.authority.MutableGrantedAuthoritiesContainer#setGrantedAuthorities()
|
||||
*/
|
||||
public void setGrantedAuthorities(List<GrantedAuthority> aJ2eeBasedGrantedAuthorities) {
|
||||
this.preAuthenticatedGrantedAuthorities = Collections.unmodifiableList(aJ2eeBasedGrantedAuthorities);
|
||||
|
||||
+2
-2
@@ -4,9 +4,9 @@ import java.util.List;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import org.springframework.security.core.GrantedAuthoritiesContainerImpl;
|
||||
import org.springframework.security.core.GrantedAuthority;
|
||||
import org.springframework.security.core.MutableGrantedAuthoritiesContainer;
|
||||
import org.springframework.security.core.authority.GrantedAuthoritiesContainerImpl;
|
||||
import org.springframework.security.core.authority.MutableGrantedAuthoritiesContainer;
|
||||
import org.springframework.security.web.authentication.WebAuthenticationDetails;
|
||||
|
||||
/**
|
||||
|
||||
+4
-4
@@ -8,10 +8,10 @@ import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.springframework.security.authentication.AuthenticationDetailsSourceImpl;
|
||||
import org.springframework.security.core.GrantedAuthority;
|
||||
import org.springframework.security.core.MutableGrantedAuthoritiesContainer;
|
||||
import org.springframework.security.core.authoritymapping.Attributes2GrantedAuthoritiesMapper;
|
||||
import org.springframework.security.core.authoritymapping.MappableAttributesRetriever;
|
||||
import org.springframework.security.core.authoritymapping.SimpleAttributes2GrantedAuthoritiesMapper;
|
||||
import org.springframework.security.core.authority.MutableGrantedAuthoritiesContainer;
|
||||
import org.springframework.security.core.authority.mapping.Attributes2GrantedAuthoritiesMapper;
|
||||
import org.springframework.security.core.authority.mapping.MappableAttributesRetriever;
|
||||
import org.springframework.security.core.authority.mapping.SimpleAttributes2GrantedAuthoritiesMapper;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
/**
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
package org.springframework.security.web.authentication.preauth.j2ee;
|
||||
|
||||
import org.springframework.security.web.authentication.preauth.PreAuthenticatedGrantedAuthoritiesWebAuthenticationDetails;
|
||||
import org.springframework.security.core.authoritymapping.SimpleAttributes2GrantedAuthoritiesMapper;
|
||||
import org.springframework.security.core.authority.mapping.SimpleAttributes2GrantedAuthoritiesMapper;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@ package org.springframework.security.web.authentication.preauth.j2ee;
|
||||
|
||||
import java.io.InputStream;
|
||||
|
||||
import org.springframework.security.core.authoritymapping.XmlMappableAttributesRetriever;
|
||||
import org.springframework.security.core.authority.mapping.XmlMappableAttributesRetriever;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
|
||||
+3
-3
@@ -8,9 +8,9 @@ import org.apache.commons.logging.LogFactory;
|
||||
import org.springframework.beans.factory.InitializingBean;
|
||||
import org.springframework.security.authentication.AuthenticationDetailsSourceImpl;
|
||||
import org.springframework.security.core.GrantedAuthority;
|
||||
import org.springframework.security.core.MutableGrantedAuthoritiesContainer;
|
||||
import org.springframework.security.core.authoritymapping.Attributes2GrantedAuthoritiesMapper;
|
||||
import org.springframework.security.core.authoritymapping.SimpleAttributes2GrantedAuthoritiesMapper;
|
||||
import org.springframework.security.core.authority.MutableGrantedAuthoritiesContainer;
|
||||
import org.springframework.security.core.authority.mapping.Attributes2GrantedAuthoritiesMapper;
|
||||
import org.springframework.security.core.authority.mapping.SimpleAttributes2GrantedAuthoritiesMapper;
|
||||
import org.springframework.security.web.authentication.preauth.PreAuthenticatedGrantedAuthoritiesAuthenticationDetails;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
|
||||
+4
-4
@@ -11,10 +11,10 @@ import org.springframework.security.authentication.AuthenticationDetailsSource;
|
||||
import org.springframework.security.authentication.RememberMeAuthenticationToken;
|
||||
import org.springframework.security.core.Authentication;
|
||||
import org.springframework.security.core.SpringSecurityMessageSource;
|
||||
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.core.userdetails.UserDetails;
|
||||
import org.springframework.security.core.userdetails.UserDetailsChecker;
|
||||
import org.springframework.security.core.userdetails.UserDetailsService;
|
||||
import org.springframework.security.core.userdetails.UsernameNotFoundException;
|
||||
import org.springframework.security.web.authentication.RememberMeServices;
|
||||
import org.springframework.security.web.authentication.WebAuthenticationDetailsSource;
|
||||
import org.springframework.security.web.logout.LogoutHandler;
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@ import javax.servlet.http.HttpServletResponse;
|
||||
import org.apache.commons.codec.binary.Base64;
|
||||
import org.springframework.dao.DataAccessException;
|
||||
import org.springframework.security.core.Authentication;
|
||||
import org.springframework.security.userdetails.UserDetails;
|
||||
import org.springframework.security.core.userdetails.UserDetails;
|
||||
import org.springframework.security.web.authentication.RememberMeServices;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
|
||||
+3
-3
@@ -16,7 +16,7 @@
|
||||
package org.springframework.security.web.authentication.rememberme;
|
||||
|
||||
import org.springframework.security.core.Authentication;
|
||||
import org.springframework.security.userdetails.UserDetails;
|
||||
import org.springframework.security.core.userdetails.UserDetails;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import org.apache.commons.codec.digest.DigestUtils;
|
||||
@@ -40,9 +40,9 @@ import java.util.Date;
|
||||
* implementation will only send a remember-me token if the parameter defined by
|
||||
* {@link #setParameter(String)} is present.
|
||||
* <p>
|
||||
* An {@link org.springframework.security.userdetails.UserDetailsService} is required by
|
||||
* An {@link org.springframework.security.core.userdetails.UserDetailsService} is required by
|
||||
* this implementation, so that it can construct a valid
|
||||
* <code>Authentication</code> from the returned {@link org.springframework.security.userdetails.UserDetails}.
|
||||
* <code>Authentication</code> from the returned {@link org.springframework.security.core.userdetails.UserDetails}.
|
||||
* This is also necessary so that the user's password is available and can be checked as part of the encoded cookie.
|
||||
* <p>
|
||||
* The cookie encoded by this implementation adopts the following form:
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@ package org.springframework.security.web.authentication.switchuser;
|
||||
|
||||
import org.springframework.security.authentication.event.AbstractAuthenticationEvent;
|
||||
import org.springframework.security.core.Authentication;
|
||||
import org.springframework.security.userdetails.UserDetails;
|
||||
import org.springframework.security.core.userdetails.UserDetails;
|
||||
|
||||
|
||||
/**
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ import java.util.List;
|
||||
|
||||
import org.springframework.security.core.Authentication;
|
||||
import org.springframework.security.core.GrantedAuthority;
|
||||
import org.springframework.security.userdetails.UserDetails;
|
||||
import org.springframework.security.core.userdetails.UserDetails;
|
||||
|
||||
/**
|
||||
* Allows subclasses to modify the {@link GrantedAuthority} list that will be assigned to the principal
|
||||
|
||||
+1
-1
@@ -16,7 +16,7 @@
|
||||
package org.springframework.security.web.authentication.switchuser;
|
||||
|
||||
import org.springframework.security.core.Authentication;
|
||||
import org.springframework.security.core.GrantedAuthorityImpl;
|
||||
import org.springframework.security.core.authority.GrantedAuthorityImpl;
|
||||
|
||||
|
||||
/**
|
||||
|
||||
+4
-4
@@ -44,10 +44,10 @@ import org.springframework.security.core.AuthenticationException;
|
||||
import org.springframework.security.core.GrantedAuthority;
|
||||
import org.springframework.security.core.SpringSecurityMessageSource;
|
||||
import org.springframework.security.core.context.SecurityContextHolder;
|
||||
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.core.userdetails.UserDetails;
|
||||
import org.springframework.security.core.userdetails.UserDetailsChecker;
|
||||
import org.springframework.security.core.userdetails.UserDetailsService;
|
||||
import org.springframework.security.core.userdetails.UsernameNotFoundException;
|
||||
import org.springframework.security.web.FilterChainOrder;
|
||||
import org.springframework.security.web.SpringSecurityFilter;
|
||||
import org.springframework.security.web.authentication.AuthenticationFailureHandler;
|
||||
|
||||
+5
-5
@@ -39,11 +39,11 @@ import org.springframework.security.authentication.UsernamePasswordAuthenticatio
|
||||
import org.springframework.security.core.AuthenticationException;
|
||||
import org.springframework.security.core.SpringSecurityMessageSource;
|
||||
import org.springframework.security.core.context.SecurityContextHolder;
|
||||
import org.springframework.security.userdetails.UserCache;
|
||||
import org.springframework.security.userdetails.UserDetails;
|
||||
import org.springframework.security.userdetails.UserDetailsService;
|
||||
import org.springframework.security.userdetails.UsernameNotFoundException;
|
||||
import org.springframework.security.userdetails.cache.NullUserCache;
|
||||
import org.springframework.security.core.userdetails.UserCache;
|
||||
import org.springframework.security.core.userdetails.UserDetails;
|
||||
import org.springframework.security.core.userdetails.UserDetailsService;
|
||||
import org.springframework.security.core.userdetails.UsernameNotFoundException;
|
||||
import org.springframework.security.core.userdetails.cache.NullUserCache;
|
||||
import org.springframework.security.util.StringSplitUtils;
|
||||
import org.springframework.security.web.FilterChainOrder;
|
||||
import org.springframework.security.web.SpringSecurityFilter;
|
||||
|
||||
+1
-1
@@ -10,9 +10,9 @@ import org.apache.commons.logging.LogFactory;
|
||||
import org.springframework.expression.ExpressionParser;
|
||||
import org.springframework.expression.ParseException;
|
||||
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;
|
||||
import org.springframework.security.web.util.UrlMatcher;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
/**
|
||||
|
||||
+1
-1
@@ -27,8 +27,8 @@ import java.util.Set;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.springframework.security.access.ConfigAttribute;
|
||||
import org.springframework.security.util.UrlMatcher;
|
||||
import org.springframework.security.web.FilterInvocation;
|
||||
import org.springframework.security.web.util.UrlMatcher;
|
||||
|
||||
|
||||
/**
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@ package org.springframework.security.web.session;
|
||||
|
||||
import javax.servlet.http.HttpSession;
|
||||
|
||||
import org.springframework.security.core.SessionCreationEvent;
|
||||
import org.springframework.security.core.session.SessionCreationEvent;
|
||||
|
||||
/**
|
||||
* Published by the {@link HttpSessionEventPublisher} when a HttpSession is destroyed by the container
|
||||
|
||||
+1
-1
@@ -17,8 +17,8 @@ package org.springframework.security.web.session;
|
||||
|
||||
import javax.servlet.http.HttpSession;
|
||||
|
||||
import org.springframework.security.core.SessionDestroyedEvent;
|
||||
import org.springframework.security.core.context.SecurityContext;
|
||||
import org.springframework.security.core.session.SessionDestroyedEvent;
|
||||
import org.springframework.security.web.context.HttpSessionSecurityContextRepository;
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
package org.springframework.security.web.util;
|
||||
|
||||
import org.springframework.util.PathMatcher;
|
||||
import org.springframework.util.AntPathMatcher;
|
||||
|
||||
/**
|
||||
* Ant path strategy for URL matching.
|
||||
*
|
||||
* @author Luke Taylor
|
||||
* @version $Id$
|
||||
*/
|
||||
public class AntUrlPathMatcher implements UrlMatcher {
|
||||
private boolean requiresLowerCaseUrl = true;
|
||||
private PathMatcher pathMatcher = new AntPathMatcher();
|
||||
|
||||
public AntUrlPathMatcher() {
|
||||
this(true);
|
||||
}
|
||||
|
||||
public AntUrlPathMatcher(boolean requiresLowerCaseUrl) {
|
||||
this.requiresLowerCaseUrl = requiresLowerCaseUrl;
|
||||
}
|
||||
|
||||
public Object compile(String path) {
|
||||
if (requiresLowerCaseUrl) {
|
||||
return path.toLowerCase();
|
||||
}
|
||||
|
||||
return path;
|
||||
}
|
||||
|
||||
public void setRequiresLowerCaseUrl(boolean requiresLowerCaseUrl) {
|
||||
this.requiresLowerCaseUrl = requiresLowerCaseUrl;
|
||||
}
|
||||
|
||||
public boolean pathMatchesUrl(Object path, String url) {
|
||||
return pathMatcher.match((String)path, url);
|
||||
}
|
||||
|
||||
public String getUniversalMatchPattern() {
|
||||
return "/**";
|
||||
}
|
||||
|
||||
public boolean requiresLowerCaseUrl() {
|
||||
return requiresLowerCaseUrl;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return getClass().getName() + "[requiresLowerCase='" + requiresLowerCaseUrl + "']";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package org.springframework.security.web.util;
|
||||
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
/**
|
||||
* @author Luke Taylor
|
||||
* @version $Id$
|
||||
*/
|
||||
public class RegexUrlPathMatcher implements UrlMatcher {
|
||||
private boolean requiresLowerCaseUrl = false;
|
||||
|
||||
public Object compile(String path) {
|
||||
return Pattern.compile(path);
|
||||
}
|
||||
|
||||
public void setRequiresLowerCaseUrl(boolean requiresLowerCaseUrl) {
|
||||
this.requiresLowerCaseUrl = requiresLowerCaseUrl;
|
||||
}
|
||||
|
||||
public boolean pathMatchesUrl(Object compiledPath, String url) {
|
||||
Pattern pattern = (Pattern)compiledPath;
|
||||
|
||||
return pattern.matcher(url).matches();
|
||||
}
|
||||
|
||||
public String getUniversalMatchPattern() {
|
||||
return "/.*";
|
||||
}
|
||||
|
||||
public boolean requiresLowerCaseUrl() {
|
||||
return requiresLowerCaseUrl;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package org.springframework.security.web.util;
|
||||
|
||||
/**
|
||||
* Strategy for deciding whether configured path matches a submitted candidate URL.
|
||||
*
|
||||
* @author Luke Taylor
|
||||
* @version $Id$
|
||||
* @since 2.0
|
||||
*/
|
||||
public interface UrlMatcher {
|
||||
|
||||
Object compile(String urlPattern);
|
||||
|
||||
boolean pathMatchesUrl(Object compiledUrlPattern, String url);
|
||||
|
||||
/** Returns the path which matches every URL */
|
||||
String getUniversalMatchPattern();
|
||||
|
||||
/**
|
||||
* Returns true if the matcher expects the URL to be converted to lower case before
|
||||
* calling {@link #pathMatchesUrl(Object, String)}.
|
||||
*/
|
||||
boolean requiresLowerCaseUrl();
|
||||
}
|
||||
+1
-1
@@ -21,8 +21,8 @@ import org.springframework.security.authentication.AuthenticationTrustResolverIm
|
||||
import org.springframework.security.core.Authentication;
|
||||
import org.springframework.security.core.GrantedAuthority;
|
||||
import org.springframework.security.core.context.SecurityContextHolder;
|
||||
import org.springframework.security.core.userdetails.UserDetails;
|
||||
|
||||
import org.springframework.security.userdetails.UserDetails;
|
||||
import org.springframework.security.web.PortResolver;
|
||||
|
||||
import java.security.Principal;
|
||||
|
||||
+1
-1
@@ -33,7 +33,7 @@ import org.springframework.security.MockPortResolver;
|
||||
import org.springframework.security.access.AccessDeniedException;
|
||||
import org.springframework.security.authentication.AnonymousAuthenticationToken;
|
||||
import org.springframework.security.authentication.BadCredentialsException;
|
||||
import org.springframework.security.core.AuthorityUtils;
|
||||
import org.springframework.security.core.authority.AuthorityUtils;
|
||||
import org.springframework.security.core.context.SecurityContextHolder;
|
||||
import org.springframework.security.web.AccessDeniedHandlerImpl;
|
||||
import org.springframework.security.web.ExceptionTranslationFilter;
|
||||
|
||||
+1
-1
@@ -39,7 +39,7 @@ import org.springframework.security.authentication.BadCredentialsException;
|
||||
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
|
||||
import org.springframework.security.core.Authentication;
|
||||
import org.springframework.security.core.AuthenticationException;
|
||||
import org.springframework.security.core.AuthorityUtils;
|
||||
import org.springframework.security.core.authority.AuthorityUtils;
|
||||
import org.springframework.security.core.context.SecurityContextHolder;
|
||||
import org.springframework.security.web.PortResolverImpl;
|
||||
import org.springframework.security.web.authentication.AbstractProcessingFilter;
|
||||
|
||||
+2
-2
@@ -22,11 +22,11 @@ import org.springframework.security.MockFilterConfig;
|
||||
import org.springframework.security.authentication.TestingAuthenticationToken;
|
||||
import org.springframework.security.core.Authentication;
|
||||
import org.springframework.security.core.GrantedAuthority;
|
||||
import org.springframework.security.core.GrantedAuthorityImpl;
|
||||
import org.springframework.security.core.authority.GrantedAuthorityImpl;
|
||||
import org.springframework.security.core.context.SecurityContextHolder;
|
||||
import org.springframework.security.core.userdetails.memory.UserAttribute;
|
||||
|
||||
|
||||
import org.springframework.security.userdetails.memory.UserAttribute;
|
||||
import org.springframework.security.web.authentication.AnonymousProcessingFilter;
|
||||
|
||||
import org.springframework.mock.web.MockHttpServletRequest;
|
||||
|
||||
+1
-1
@@ -11,8 +11,8 @@ import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.springframework.mock.web.MockHttpServletRequest;
|
||||
import org.springframework.security.core.AuthorityUtils;
|
||||
import org.springframework.security.core.GrantedAuthority;
|
||||
import org.springframework.security.core.authority.AuthorityUtils;
|
||||
import org.springframework.security.web.authentication.preauth.PreAuthenticatedGrantedAuthoritiesWebAuthenticationDetails;
|
||||
|
||||
/**
|
||||
|
||||
+4
-4
@@ -11,10 +11,10 @@ import javax.servlet.http.HttpServletRequest;
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import org.springframework.security.core.GrantedAuthority;
|
||||
import org.springframework.security.core.authoritymapping.Attributes2GrantedAuthoritiesMapper;
|
||||
import org.springframework.security.core.authoritymapping.MappableAttributesRetriever;
|
||||
import org.springframework.security.core.authoritymapping.SimpleAttributes2GrantedAuthoritiesMapper;
|
||||
import org.springframework.security.core.authoritymapping.SimpleMappableAttributesRetriever;
|
||||
import org.springframework.security.core.authority.mapping.Attributes2GrantedAuthoritiesMapper;
|
||||
import org.springframework.security.core.authority.mapping.MappableAttributesRetriever;
|
||||
import org.springframework.security.core.authority.mapping.SimpleAttributes2GrantedAuthoritiesMapper;
|
||||
import org.springframework.security.core.authority.mapping.SimpleMappableAttributesRetriever;
|
||||
import org.springframework.security.web.authentication.preauth.PreAuthenticatedGrantedAuthoritiesWebAuthenticationDetails;
|
||||
import org.springframework.security.web.authentication.preauth.j2ee.J2eeBasedPreAuthenticatedWebAuthenticationDetailsSource;
|
||||
|
||||
|
||||
+5
-5
@@ -11,11 +11,11 @@ import org.springframework.mock.web.MockHttpServletRequest;
|
||||
import org.springframework.mock.web.MockHttpServletResponse;
|
||||
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
|
||||
import org.springframework.security.core.Authentication;
|
||||
import org.springframework.security.core.AuthorityUtils;
|
||||
import org.springframework.security.userdetails.User;
|
||||
import org.springframework.security.userdetails.UserDetails;
|
||||
import org.springframework.security.userdetails.UserDetailsService;
|
||||
import org.springframework.security.userdetails.UsernameNotFoundException;
|
||||
import org.springframework.security.core.authority.AuthorityUtils;
|
||||
import org.springframework.security.core.userdetails.User;
|
||||
import org.springframework.security.core.userdetails.UserDetails;
|
||||
import org.springframework.security.core.userdetails.UserDetailsService;
|
||||
import org.springframework.security.core.userdetails.UsernameNotFoundException;
|
||||
import org.springframework.security.web.authentication.rememberme.AbstractRememberMeServices;
|
||||
import org.springframework.security.web.authentication.rememberme.CookieTheftException;
|
||||
import org.springframework.security.web.authentication.rememberme.InvalidCookieException;
|
||||
|
||||
+5
-5
@@ -33,11 +33,11 @@ import org.springframework.mock.web.MockHttpServletRequest;
|
||||
import org.springframework.mock.web.MockHttpServletResponse;
|
||||
import org.springframework.security.authentication.TestingAuthenticationToken;
|
||||
import org.springframework.security.core.Authentication;
|
||||
import org.springframework.security.core.AuthorityUtils;
|
||||
import org.springframework.security.userdetails.User;
|
||||
import org.springframework.security.userdetails.UserDetails;
|
||||
import org.springframework.security.userdetails.UserDetailsService;
|
||||
import org.springframework.security.userdetails.UsernameNotFoundException;
|
||||
import org.springframework.security.core.authority.AuthorityUtils;
|
||||
import org.springframework.security.core.userdetails.User;
|
||||
import org.springframework.security.core.userdetails.UserDetails;
|
||||
import org.springframework.security.core.userdetails.UserDetailsService;
|
||||
import org.springframework.security.core.userdetails.UsernameNotFoundException;
|
||||
import org.springframework.security.web.authentication.rememberme.TokenBasedRememberMeServices;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
|
||||
+6
-6
@@ -34,14 +34,14 @@ import org.springframework.security.authentication.DisabledException;
|
||||
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
|
||||
import org.springframework.security.core.Authentication;
|
||||
import org.springframework.security.core.AuthenticationException;
|
||||
import org.springframework.security.core.AuthorityUtils;
|
||||
import org.springframework.security.core.GrantedAuthority;
|
||||
import org.springframework.security.core.GrantedAuthorityImpl;
|
||||
import org.springframework.security.core.authority.AuthorityUtils;
|
||||
import org.springframework.security.core.authority.GrantedAuthorityImpl;
|
||||
import org.springframework.security.core.context.SecurityContextHolder;
|
||||
import org.springframework.security.userdetails.User;
|
||||
import org.springframework.security.userdetails.UserDetails;
|
||||
import org.springframework.security.userdetails.UserDetailsService;
|
||||
import org.springframework.security.userdetails.UsernameNotFoundException;
|
||||
import org.springframework.security.core.userdetails.User;
|
||||
import org.springframework.security.core.userdetails.UserDetails;
|
||||
import org.springframework.security.core.userdetails.UserDetailsService;
|
||||
import org.springframework.security.core.userdetails.UsernameNotFoundException;
|
||||
import org.springframework.security.util.FieldUtils;
|
||||
import org.springframework.security.web.authentication.SimpleUrlAuthenticationSuccessHandler;
|
||||
import org.springframework.security.web.authentication.switchuser.SwitchUserAuthorityChanger;
|
||||
|
||||
+1
-1
@@ -47,7 +47,7 @@ import org.springframework.security.authentication.AuthenticationManager;
|
||||
import org.springframework.security.authentication.BadCredentialsException;
|
||||
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
|
||||
import org.springframework.security.core.Authentication;
|
||||
import org.springframework.security.core.AuthorityUtils;
|
||||
import org.springframework.security.core.authority.AuthorityUtils;
|
||||
import org.springframework.security.core.context.SecurityContextHolder;
|
||||
import org.springframework.security.web.authentication.www.BasicProcessingFilter;
|
||||
import org.springframework.security.web.authentication.www.BasicProcessingFilterEntryPoint;
|
||||
|
||||
+5
-5
@@ -26,13 +26,13 @@ import org.junit.Test;
|
||||
import org.springframework.security.MockFilterConfig;
|
||||
|
||||
import org.springframework.security.core.context.SecurityContextHolder;
|
||||
import org.springframework.security.core.userdetails.UserDetails;
|
||||
import org.springframework.security.core.userdetails.cache.NullUserCache;
|
||||
import org.springframework.security.core.userdetails.memory.InMemoryDaoImpl;
|
||||
import org.springframework.security.core.userdetails.memory.UserMap;
|
||||
import org.springframework.security.core.userdetails.memory.UserMapEditor;
|
||||
|
||||
|
||||
import org.springframework.security.userdetails.UserDetails;
|
||||
import org.springframework.security.userdetails.cache.NullUserCache;
|
||||
import org.springframework.security.userdetails.memory.InMemoryDaoImpl;
|
||||
import org.springframework.security.userdetails.memory.UserMap;
|
||||
import org.springframework.security.userdetails.memory.UserMapEditor;
|
||||
|
||||
import org.springframework.security.util.StringSplitUtils;
|
||||
import org.springframework.security.web.authentication.www.DigestProcessingFilter;
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@ import junit.framework.TestCase;
|
||||
import org.springframework.security.MockFilterConfig;
|
||||
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
|
||||
import org.springframework.security.core.Authentication;
|
||||
import org.springframework.security.core.AuthorityUtils;
|
||||
import org.springframework.security.core.authority.AuthorityUtils;
|
||||
import org.springframework.security.core.context.SecurityContext;
|
||||
import org.springframework.security.core.context.SecurityContextHolder;
|
||||
import org.springframework.security.core.context.SecurityContextImpl;
|
||||
|
||||
+1
-1
@@ -28,10 +28,10 @@ import org.springframework.mock.web.MockHttpServletRequest;
|
||||
import org.springframework.mock.web.MockHttpServletResponse;
|
||||
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.RequestKey;
|
||||
import org.springframework.security.web.util.AntUrlPathMatcher;
|
||||
|
||||
/**
|
||||
* Tests parts of {@link DefaultFilterInvocationSecurityMetadataSource} not tested by {@link
|
||||
|
||||
+2
-2
@@ -20,9 +20,9 @@ import junit.framework.TestCase;
|
||||
import org.springframework.mock.web.MockHttpServletRequest;
|
||||
import org.springframework.security.authentication.TestingAuthenticationToken;
|
||||
import org.springframework.security.core.Authentication;
|
||||
import org.springframework.security.core.AuthorityUtils;
|
||||
import org.springframework.security.core.authority.AuthorityUtils;
|
||||
import org.springframework.security.core.context.SecurityContextHolder;
|
||||
import org.springframework.security.userdetails.User;
|
||||
import org.springframework.security.core.userdetails.User;
|
||||
import org.springframework.security.web.PortResolverImpl;
|
||||
import org.springframework.security.web.wrapper.SecurityContextHolderAwareRequestWrapper;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user