mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-02-28 18:39:06 +00:00
SEC-562: Repackaging of config module in sandbox (currently tests will fail because of assumptions it makes about core that ave been rolled back, so still omitted from build).
This commit is contained in:
parent
56847d0af6
commit
d1c866e477
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0"?>
|
||||
<project>
|
||||
<parent>
|
||||
<artifactId>acegi-security-sandbox</artifactId>
|
||||
<artifactId>spring-security-sandbox</artifactId>
|
||||
<groupId>org.springframework.security</groupId>
|
||||
<version>2.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
@ -9,13 +9,13 @@
|
||||
<groupId>org.springframework.security</groupId>
|
||||
<artifactId>spring-security-config</artifactId>
|
||||
<name>spring-security-config</name>
|
||||
<version>2.0.0-SNAPSHOT</version>
|
||||
<version>2.0-SNAPSHOT</version>
|
||||
<url>http://maven.apache.org</url>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework.security</groupId>
|
||||
<artifactId>acegi-security-tiger</artifactId>
|
||||
<version>1.0.6-SNAPSHOT</version>
|
||||
<artifactId>spring-security-core-tiger</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
@ -52,21 +52,6 @@
|
||||
<artifactId>commons-lang</artifactId>
|
||||
<version>2.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-logging</groupId>
|
||||
<artifactId>commons-logging</artifactId>
|
||||
<version>1.0.4</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-codec</groupId>
|
||||
<artifactId>commons-codec</artifactId>
|
||||
<version>1.3</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>oro</groupId>
|
||||
<artifactId>oro</artifactId>
|
||||
<version>2.0.8</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-collections</groupId>
|
||||
<artifactId>commons-collections</artifactId>
|
||||
|
@ -1,4 +1,4 @@
|
||||
package org.acegisecurity;
|
||||
package org.springframework.security;
|
||||
|
||||
/**
|
||||
* Hello world!
|
@ -13,9 +13,9 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.acegisecurity;
|
||||
package org.springframework.security;
|
||||
|
||||
import org.acegisecurity.annotation.Secured;
|
||||
import org.springframework.security.annotation.Secured;
|
||||
|
||||
|
||||
/**
|
||||
@ -24,7 +24,7 @@ import org.acegisecurity.annotation.Secured;
|
||||
* @author Mark St.Godard
|
||||
* @version $Id: BankService.java 1496 2006-05-23 13:38:33Z benalex $
|
||||
*
|
||||
* @see org.acegisecurity.annotation.Secured
|
||||
* @see org.springframework.security.annotation.Secured
|
||||
*/
|
||||
@Secured({"ROLE_TELLER"})
|
||||
public interface BankService {
|
@ -13,7 +13,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.acegisecurity;
|
||||
package org.springframework.security;
|
||||
|
||||
/**
|
||||
* <code>BankService</code> sample implementation.
|
@ -13,16 +13,16 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.acegisecurity;
|
||||
package org.springframework.security;
|
||||
|
||||
import org.acegisecurity.AccessDeniedException;
|
||||
import org.acegisecurity.GrantedAuthority;
|
||||
import org.acegisecurity.GrantedAuthorityImpl;
|
||||
import org.springframework.security.AccessDeniedException;
|
||||
import org.springframework.security.GrantedAuthority;
|
||||
import org.springframework.security.GrantedAuthorityImpl;
|
||||
|
||||
import org.acegisecurity.context.SecurityContextHolder;
|
||||
import org.acegisecurity.context.SecurityContextImpl;
|
||||
import org.springframework.security.context.SecurityContextHolder;
|
||||
import org.springframework.security.context.SecurityContextImpl;
|
||||
|
||||
import org.acegisecurity.providers.TestingAuthenticationToken;
|
||||
import org.springframework.security.providers.TestingAuthenticationToken;
|
||||
|
||||
import org.springframework.context.support.ClassPathXmlApplicationContext;
|
||||
|
||||
@ -57,7 +57,7 @@ public class Main {
|
||||
createSecureContext();
|
||||
|
||||
ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(
|
||||
"org/acegisecurity/config/auto-config.xml");
|
||||
"org/security/config/auto-config.xml");
|
||||
BankService service = (BankService) context.getBean("bankService");
|
||||
|
||||
// will succeed
|
@ -12,14 +12,14 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.acegisecurity.config;
|
||||
package org.springframework.security.config;
|
||||
|
||||
import org.acegisecurity.ldap.DefaultInitialDirContextFactory;
|
||||
import org.acegisecurity.providers.ProviderManager;
|
||||
import org.acegisecurity.providers.ldap.LdapAuthenticationProvider;
|
||||
import org.acegisecurity.providers.ldap.authenticator.BindAuthenticator;
|
||||
import org.acegisecurity.providers.ldap.populator.DefaultLdapAuthoritiesPopulator;
|
||||
import org.acegisecurity.util.BeanDefinitionParserUtils;
|
||||
import org.springframework.security.ldap.DefaultInitialDirContextFactory;
|
||||
import org.springframework.security.providers.ProviderManager;
|
||||
import org.springframework.security.providers.ldap.LdapAuthenticationProvider;
|
||||
import org.springframework.security.providers.ldap.authenticator.BindAuthenticator;
|
||||
import org.springframework.security.providers.ldap.populator.DefaultLdapAuthoritiesPopulator;
|
||||
import org.springframework.security.util.BeanDefinitionParserUtils;
|
||||
import org.springframework.beans.factory.config.RuntimeBeanReference;
|
||||
import org.springframework.beans.factory.support.AbstractBeanDefinition;
|
||||
import org.springframework.beans.factory.support.ManagedList;
|
||||
@ -36,11 +36,11 @@ import org.w3c.dom.NodeList;
|
||||
|
||||
/**
|
||||
* * {@link BeanDefinitionParser} for the <code>authentication-mechanism</code>
|
||||
* tag, resolves to {@link org.acegisecurity.providers.ProviderManager} </br>
|
||||
* tag, resolves to {@link org.springframework.security.providers.ProviderManager} </br>
|
||||
*
|
||||
* @author vpuri
|
||||
* @see {@link org.springframework.beans.factory.BeanFactory}
|
||||
* @see {@link org.acegisecurity.providers.ProviderManager}
|
||||
* @see {@link org.springframework.security.providers.ProviderManager}
|
||||
*
|
||||
*/
|
||||
public class AuthenticationMechanismBeanDefinitionParser extends AbstractBeanDefinitionParser implements
|
@ -1,11 +1,9 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package org.acegisecurity.config;
|
||||
package org.springframework.security.config;
|
||||
|
||||
import org.acegisecurity.ui.rememberme.TokenBasedRememberMeServices;
|
||||
import org.acegisecurity.ui.webapp.AuthenticationProcessingFilter;
|
||||
import org.springframework.beans.factory.config.BeanDefinitionHolder;
|
||||
import org.springframework.security.ui.webapp.AuthenticationProcessingFilter;
|
||||
import org.springframework.beans.factory.support.AbstractBeanDefinition;
|
||||
import org.springframework.beans.factory.support.RootBeanDefinition;
|
||||
import org.springframework.beans.factory.xml.AbstractBeanDefinitionParser;
|
@ -1,9 +1,9 @@
|
||||
package org.acegisecurity.config;
|
||||
package org.springframework.security.config;
|
||||
|
||||
import java.util.Collections;
|
||||
|
||||
import org.acegisecurity.AuthenticationManager;
|
||||
import org.acegisecurity.providers.AuthenticationProvider;
|
||||
import org.springframework.security.AuthenticationManager;
|
||||
import org.springframework.security.providers.AuthenticationProvider;
|
||||
import org.springframework.beans.BeansException;
|
||||
import org.springframework.beans.factory.config.BeanFactoryPostProcessor;
|
||||
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
|
@ -1,16 +1,14 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package org.acegisecurity.config;
|
||||
package org.springframework.security.config;
|
||||
|
||||
import org.acegisecurity.providers.dao.DaoAuthenticationProvider;
|
||||
import org.acegisecurity.providers.dao.salt.ReflectionSaltSource;
|
||||
import org.acegisecurity.providers.dao.salt.SystemWideSaltSource;
|
||||
import org.acegisecurity.providers.encoding.Md5PasswordEncoder;
|
||||
import org.springframework.beans.factory.config.BeanDefinitionHolder;
|
||||
import org.springframework.security.providers.dao.DaoAuthenticationProvider;
|
||||
import org.springframework.security.providers.dao.salt.ReflectionSaltSource;
|
||||
import org.springframework.security.providers.dao.salt.SystemWideSaltSource;
|
||||
import org.springframework.security.providers.encoding.Md5PasswordEncoder;
|
||||
import org.springframework.beans.factory.config.RuntimeBeanReference;
|
||||
import org.springframework.beans.factory.support.AbstractBeanDefinition;
|
||||
import org.springframework.beans.factory.support.ManagedList;
|
||||
import org.springframework.beans.factory.support.RootBeanDefinition;
|
||||
import org.springframework.beans.factory.xml.AbstractBeanDefinitionParser;
|
||||
import org.springframework.beans.factory.xml.ParserContext;
|
@ -1,11 +1,10 @@
|
||||
package org.acegisecurity.config;
|
||||
package org.springframework.security.config;
|
||||
|
||||
import org.acegisecurity.AccessDecisionManager;
|
||||
import org.acegisecurity.vote.AffirmativeBased;
|
||||
import org.acegisecurity.vote.AuthenticatedVoter;
|
||||
import org.acegisecurity.vote.ConsensusBased;
|
||||
import org.acegisecurity.vote.RoleVoter;
|
||||
import org.acegisecurity.vote.UnanimousBased;
|
||||
import org.springframework.security.vote.AffirmativeBased;
|
||||
import org.springframework.security.vote.AuthenticatedVoter;
|
||||
import org.springframework.security.vote.ConsensusBased;
|
||||
import org.springframework.security.vote.RoleVoter;
|
||||
import org.springframework.security.vote.UnanimousBased;
|
||||
import org.springframework.beans.factory.support.AbstractBeanDefinition;
|
||||
import org.springframework.beans.factory.support.ManagedList;
|
||||
import org.springframework.beans.factory.support.RootBeanDefinition;
|
||||
@ -15,8 +14,6 @@ import org.springframework.beans.factory.xml.ParserContext;
|
||||
import org.springframework.util.StringUtils;
|
||||
import org.springframework.util.xml.DomUtils;
|
||||
import org.w3c.dom.Element;
|
||||
import org.w3c.dom.Node;
|
||||
import org.w3c.dom.NodeList;
|
||||
|
||||
public class AuthorizationManagerBeanDefinitionParser extends AbstractBeanDefinitionParser implements
|
||||
BeanDefinitionParser {
|
@ -1,19 +1,19 @@
|
||||
package org.acegisecurity.config;
|
||||
package org.springframework.security.config;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
import org.acegisecurity.annotation.SecurityAnnotationAttributes;
|
||||
import org.acegisecurity.intercept.method.MethodDefinitionAttributes;
|
||||
import org.acegisecurity.intercept.method.MethodDefinitionMap;
|
||||
import org.acegisecurity.intercept.method.MethodDefinitionSource;
|
||||
import org.acegisecurity.intercept.method.MethodDefinitionSourceMapping;
|
||||
import org.acegisecurity.intercept.method.aopalliance.MethodDefinitionSourceAdvisor;
|
||||
import org.acegisecurity.intercept.method.aopalliance.MethodSecurityInterceptor;
|
||||
import org.acegisecurity.intercept.method.aspectj.AspectJSecurityInterceptor;
|
||||
import org.acegisecurity.runas.RunAsManagerImpl;
|
||||
import org.acegisecurity.util.BeanDefinitionParserUtils;
|
||||
import org.springframework.security.annotation.SecurityAnnotationAttributes;
|
||||
import org.springframework.security.intercept.method.MethodDefinitionAttributes;
|
||||
import org.springframework.security.intercept.method.MethodDefinitionMap;
|
||||
import org.springframework.security.intercept.method.MethodDefinitionSource;
|
||||
import org.springframework.security.intercept.method.MethodDefinitionSourceMapping;
|
||||
import org.springframework.security.intercept.method.aopalliance.MethodDefinitionSourceAdvisor;
|
||||
import org.springframework.security.intercept.method.aopalliance.MethodSecurityInterceptor;
|
||||
import org.springframework.security.intercept.method.aspectj.AspectJSecurityInterceptor;
|
||||
import org.springframework.security.runas.RunAsManagerImpl;
|
||||
import org.springframework.security.util.BeanDefinitionParserUtils;
|
||||
import org.springframework.aop.framework.autoproxy.DefaultAdvisorAutoProxyCreator;
|
||||
import org.springframework.beans.factory.BeanDefinitionStoreException;
|
||||
import org.springframework.beans.factory.config.RuntimeBeanReference;
|
@ -1,36 +1,32 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package org.acegisecurity.config;
|
||||
package org.springframework.security.config;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.acegisecurity.annotation.SecurityAnnotationAttributes;
|
||||
import org.acegisecurity.intercept.method.MethodDefinitionAttributes;
|
||||
import org.acegisecurity.intercept.method.aopalliance.MethodDefinitionSourceAdvisor;
|
||||
import org.acegisecurity.intercept.method.aopalliance.MethodSecurityInterceptor;
|
||||
import org.acegisecurity.intercept.web.FilterInvocationDefinitionDecorator;
|
||||
import org.acegisecurity.intercept.web.FilterInvocationDefinitionSourceMapping;
|
||||
import org.acegisecurity.intercept.web.FilterSecurityInterceptor;
|
||||
import org.acegisecurity.intercept.web.PathBasedFilterInvocationDefinitionMap;
|
||||
import org.acegisecurity.runas.RunAsManagerImpl;
|
||||
import org.acegisecurity.userdetails.memory.InMemoryDaoImpl;
|
||||
import org.acegisecurity.util.BeanDefinitionParserUtils;
|
||||
import org.acegisecurity.vote.AffirmativeBased;
|
||||
import org.acegisecurity.vote.AuthenticatedVoter;
|
||||
import org.acegisecurity.vote.RoleVoter;
|
||||
import org.acegisecurity.vote.UnanimousBased;
|
||||
import org.acegisecurity.wrapper.SecurityContextHolderAwareRequestFilter;
|
||||
import org.springframework.security.annotation.SecurityAnnotationAttributes;
|
||||
import org.springframework.security.intercept.method.MethodDefinitionAttributes;
|
||||
import org.springframework.security.intercept.method.aopalliance.MethodDefinitionSourceAdvisor;
|
||||
import org.springframework.security.intercept.method.aopalliance.MethodSecurityInterceptor;
|
||||
import org.springframework.security.intercept.web.FilterInvocationDefinitionDecorator;
|
||||
import org.springframework.security.intercept.web.FilterInvocationDefinitionSourceMapping;
|
||||
import org.springframework.security.intercept.web.FilterSecurityInterceptor;
|
||||
import org.springframework.security.intercept.web.PathBasedFilterInvocationDefinitionMap;
|
||||
import org.springframework.security.runas.RunAsManagerImpl;
|
||||
import org.springframework.security.util.BeanDefinitionParserUtils;
|
||||
import org.springframework.security.vote.AffirmativeBased;
|
||||
import org.springframework.security.vote.AuthenticatedVoter;
|
||||
import org.springframework.security.vote.RoleVoter;
|
||||
import org.springframework.security.vote.UnanimousBased;
|
||||
import org.springframework.security.wrapper.SecurityContextHolderAwareRequestFilter;
|
||||
import org.springframework.aop.framework.autoproxy.DefaultAdvisorAutoProxyCreator;
|
||||
import org.springframework.beans.factory.config.BeanDefinition;
|
||||
import org.springframework.beans.factory.support.ManagedList;
|
||||
import org.springframework.beans.factory.support.RootBeanDefinition;
|
||||
import org.springframework.beans.factory.xml.BeanDefinitionParser;
|
||||
import org.springframework.beans.factory.xml.ParserContext;
|
||||
import org.springframework.util.xml.DomUtils;
|
||||
import org.w3c.dom.Element;
|
||||
|
||||
/**
|
@ -1,10 +1,9 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package org.acegisecurity.config;
|
||||
package org.springframework.security.config;
|
||||
|
||||
import org.acegisecurity.context.HttpSessionContextIntegrationFilter;
|
||||
import org.springframework.beans.factory.config.BeanDefinition;
|
||||
import org.springframework.security.context.HttpSessionContextIntegrationFilter;
|
||||
import org.springframework.beans.factory.support.BeanDefinitionBuilder;
|
||||
import org.springframework.beans.factory.support.RootBeanDefinition;
|
||||
import org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser;
|
@ -1,11 +1,11 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package org.acegisecurity.config;
|
||||
package org.springframework.security.config;
|
||||
|
||||
import org.acegisecurity.ui.AccessDeniedHandlerImpl;
|
||||
import org.acegisecurity.ui.ExceptionTranslationFilter;
|
||||
import org.acegisecurity.ui.webapp.AuthenticationProcessingFilterEntryPoint;
|
||||
import org.springframework.security.ui.AccessDeniedHandlerImpl;
|
||||
import org.springframework.security.ui.ExceptionTranslationFilter;
|
||||
import org.springframework.security.ui.webapp.AuthenticationProcessingFilterEntryPoint;
|
||||
import org.springframework.beans.factory.config.RuntimeBeanReference;
|
||||
import org.springframework.beans.factory.support.AbstractBeanDefinition;
|
||||
import org.springframework.beans.factory.support.RootBeanDefinition;
|
||||
@ -48,8 +48,8 @@ import org.w3c.dom.Element;
|
||||
*
|
||||
* @author Vishal Puri
|
||||
* @version
|
||||
* @see {@link org.acegisecurity.ui.ExceptionTranslationFilter}
|
||||
* @see {@link org.acegisecurity.ui.AccessDeniedHandler}
|
||||
* @see {@link org.springframework.security.ui.ExceptionTranslationFilter}
|
||||
* @see {@link org.springframework.security.ui.AccessDeniedHandler}
|
||||
*/
|
||||
public class ExceptionTranslationFilterBeanDefinitionParser extends AbstractBeanDefinitionParser {
|
||||
|
@ -1,16 +1,15 @@
|
||||
package org.acegisecurity.config;
|
||||
package org.springframework.security.config;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
import org.acegisecurity.AccessDecisionManager;
|
||||
import org.acegisecurity.intercept.web.FilterInvocationDefinitionDecorator;
|
||||
import org.acegisecurity.intercept.web.FilterInvocationDefinitionSourceMapping;
|
||||
import org.acegisecurity.intercept.web.FilterSecurityInterceptor;
|
||||
import org.acegisecurity.intercept.web.PathBasedFilterInvocationDefinitionMap;
|
||||
import org.acegisecurity.intercept.web.RegExpBasedFilterInvocationDefinitionMap;
|
||||
import org.acegisecurity.util.BeanDefinitionParserUtils;
|
||||
import org.springframework.security.intercept.web.FilterInvocationDefinitionDecorator;
|
||||
import org.springframework.security.intercept.web.FilterInvocationDefinitionSourceMapping;
|
||||
import org.springframework.security.intercept.web.FilterSecurityInterceptor;
|
||||
import org.springframework.security.intercept.web.PathBasedFilterInvocationDefinitionMap;
|
||||
import org.springframework.security.intercept.web.RegExpBasedFilterInvocationDefinitionMap;
|
||||
import org.springframework.security.util.BeanDefinitionParserUtils;
|
||||
import org.springframework.beans.factory.support.AbstractBeanDefinition;
|
||||
import org.springframework.beans.factory.support.RootBeanDefinition;
|
||||
import org.springframework.beans.factory.xml.AbstractBeanDefinitionParser;
|
@ -1,12 +1,10 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package org.acegisecurity.config;
|
||||
package org.springframework.security.config;
|
||||
|
||||
import org.acegisecurity.ui.logout.LogoutFilter;
|
||||
import org.acegisecurity.ui.logout.SecurityContextLogoutHandler;
|
||||
import org.acegisecurity.ui.rememberme.TokenBasedRememberMeServices;
|
||||
import org.springframework.beans.factory.config.BeanDefinition;
|
||||
import org.springframework.security.ui.logout.LogoutFilter;
|
||||
import org.springframework.security.ui.logout.SecurityContextLogoutHandler;
|
||||
import org.springframework.beans.factory.support.AbstractBeanDefinition;
|
||||
import org.springframework.beans.factory.support.ManagedList;
|
||||
import org.springframework.beans.factory.support.RootBeanDefinition;
|
@ -1,15 +1,15 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package org.acegisecurity.config;
|
||||
package org.springframework.security.config;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import org.acegisecurity.ui.logout.LogoutFilter;
|
||||
import org.acegisecurity.ui.logout.LogoutHandler;
|
||||
import org.acegisecurity.ui.logout.SecurityContextLogoutHandler;
|
||||
import org.acegisecurity.ui.rememberme.TokenBasedRememberMeServices;
|
||||
import org.springframework.security.ui.logout.LogoutFilter;
|
||||
import org.springframework.security.ui.logout.LogoutHandler;
|
||||
import org.springframework.security.ui.logout.SecurityContextLogoutHandler;
|
||||
import org.springframework.security.ui.rememberme.TokenBasedRememberMeServices;
|
||||
import org.springframework.beans.BeansException;
|
||||
import org.springframework.beans.factory.config.BeanFactoryPostProcessor;
|
||||
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
|
@ -1,22 +1,17 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package org.acegisecurity.config;
|
||||
package org.springframework.security.config;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Properties;
|
||||
|
||||
import org.acegisecurity.GrantedAuthority;
|
||||
import org.acegisecurity.GrantedAuthorityImpl;
|
||||
import org.acegisecurity.userdetails.User;
|
||||
import org.acegisecurity.userdetails.UserDetails;
|
||||
import org.acegisecurity.userdetails.jdbc.JdbcDaoImpl;
|
||||
import org.acegisecurity.userdetails.memory.InMemoryDaoImpl;
|
||||
import org.acegisecurity.userdetails.memory.UserAttribute;
|
||||
import org.acegisecurity.userdetails.memory.UserMap;
|
||||
import org.springframework.security.GrantedAuthorityImpl;
|
||||
import org.springframework.security.userdetails.User;
|
||||
import org.springframework.security.userdetails.UserDetails;
|
||||
import org.springframework.security.userdetails.jdbc.JdbcDaoImpl;
|
||||
import org.springframework.security.userdetails.memory.InMemoryDaoImpl;
|
||||
import org.springframework.security.userdetails.memory.UserAttribute;
|
||||
import org.springframework.security.userdetails.memory.UserMap;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.springframework.beans.factory.config.PropertiesFactoryBean;
|
||||
@ -151,7 +146,7 @@ public class PrincipalRepositoryBeanDefinitionParser extends AbstractBeanDefinit
|
||||
protected static RootBeanDefinition createSampleUsersUsingProperties() {
|
||||
// properties element
|
||||
RootBeanDefinition defintion = new RootBeanDefinition(PropertiesFactoryBean.class);
|
||||
String location = "classpath:org/acegisecurity/config/user.properties";
|
||||
String location = "classpath:org/security/config/user.properties";
|
||||
defintion.getPropertyValues().addPropertyValue("location", location);
|
||||
return defintion;
|
||||
}
|
@ -1,9 +1,9 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package org.acegisecurity.config;
|
||||
package org.springframework.security.config;
|
||||
|
||||
import org.acegisecurity.ui.rememberme.RememberMeProcessingFilter;
|
||||
import org.springframework.security.ui.rememberme.RememberMeProcessingFilter;
|
||||
import org.springframework.beans.factory.config.RuntimeBeanReference;
|
||||
import org.springframework.beans.factory.support.AbstractBeanDefinition;
|
||||
import org.springframework.beans.factory.support.RootBeanDefinition;
|
@ -1,9 +1,9 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package org.acegisecurity.config;
|
||||
package org.springframework.security.config;
|
||||
|
||||
import org.acegisecurity.ui.rememberme.TokenBasedRememberMeServices;
|
||||
import org.springframework.security.ui.rememberme.TokenBasedRememberMeServices;
|
||||
import org.springframework.beans.factory.config.RuntimeBeanReference;
|
||||
import org.springframework.beans.factory.support.AbstractBeanDefinition;
|
||||
import org.springframework.beans.factory.support.RootBeanDefinition;
|
@ -1,7 +1,7 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package org.acegisecurity.config;
|
||||
package org.springframework.security.config;
|
||||
|
||||
import org.springframework.beans.factory.xml.NamespaceHandlerSupport;
|
||||
|
@ -1,7 +1,7 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package org.acegisecurity.config;
|
||||
package org.springframework.security.config;
|
||||
|
||||
import org.springframework.beans.factory.xml.BeanDefinitionParser;
|
||||
import org.springframework.beans.factory.xml.NamespaceHandlerSupport;
|
@ -13,7 +13,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.acegisecurity.ui.basicauth;
|
||||
package org.springframework.security.ui.basicauth;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
@ -26,15 +26,15 @@ import javax.servlet.ServletResponse;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.acegisecurity.Authentication;
|
||||
import org.acegisecurity.AuthenticationException;
|
||||
import org.acegisecurity.AuthenticationManager;
|
||||
import org.acegisecurity.context.SecurityContextHolder;
|
||||
import org.acegisecurity.providers.UsernamePasswordAuthenticationToken;
|
||||
import org.acegisecurity.ui.AuthenticationDetailsSource;
|
||||
import org.acegisecurity.ui.AuthenticationDetailsSourceImpl;
|
||||
import org.acegisecurity.ui.AuthenticationEntryPoint;
|
||||
import org.acegisecurity.ui.rememberme.RememberMeServices;
|
||||
import org.springframework.security.Authentication;
|
||||
import org.springframework.security.AuthenticationException;
|
||||
import org.springframework.security.AuthenticationManager;
|
||||
import org.springframework.security.context.SecurityContextHolder;
|
||||
import org.springframework.security.providers.UsernamePasswordAuthenticationToken;
|
||||
import org.springframework.security.ui.AuthenticationDetailsSource;
|
||||
import org.springframework.security.ui.AuthenticationDetailsSourceImpl;
|
||||
import org.springframework.security.ui.AuthenticationEntryPoint;
|
||||
import org.springframework.security.ui.rememberme.RememberMeServices;
|
||||
import org.apache.commons.codec.binary.Base64;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
@ -63,12 +63,12 @@ import org.springframework.util.Assert;
|
||||
* <p>Basic authentication is an attractive protocol because it is simple and widely deployed. However, it still
|
||||
* transmits a password in clear text and as such is undesirable in many situations. Digest authentication is also
|
||||
* provided by Acegi Security and should be used instead of Basic authentication wherever possible. See {@link
|
||||
* org.acegisecurity.ui.digestauth.DigestProcessingFilter}.</p>
|
||||
* org.springframework.security.ui.digestauth.DigestProcessingFilter}.</p>
|
||||
* <p>Note that if a {@link #rememberMeServices} is set, this filter will automatically send back remember-me
|
||||
* details to the client. Therefore, subsequent requests will not need to present a BASIC authentication header as
|
||||
* they will be authenticated using the remember-me mechanism.</p>
|
||||
* <p><b>Do not use this class directly.</b> Instead configure <code>web.xml</code> to use the {@link
|
||||
* org.acegisecurity.util.FilterToBeanProxy}.</p>
|
||||
* org.springframework.security.util.FilterToBeanProxy}.</p>
|
||||
*
|
||||
* @author Ben Alex
|
||||
* @version $Id: BasicProcessingFilter.java 1783 2007-02-23 19:21:44Z luke_t $
|
@ -13,19 +13,18 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.acegisecurity.ui.basicauth;
|
||||
package org.springframework.security.ui.basicauth;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.ServletRequest;
|
||||
import javax.servlet.ServletResponse;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.acegisecurity.AuthenticationException;
|
||||
import org.acegisecurity.ui.AuthenticationEntryPoint;
|
||||
import org.acegisecurity.util.OrderedUtils;
|
||||
import org.springframework.security.AuthenticationException;
|
||||
import org.springframework.security.ui.AuthenticationEntryPoint;
|
||||
import org.springframework.security.util.OrderedUtils;
|
||||
import org.springframework.beans.factory.InitializingBean;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.context.ApplicationContextAware;
|
@ -1,7 +1,7 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package org.acegisecurity.util;
|
||||
package org.springframework.security.util;
|
||||
|
||||
import org.springframework.beans.factory.config.RuntimeBeanNameReference;
|
||||
import org.springframework.beans.factory.config.RuntimeBeanReference;
|
@ -1,4 +1,4 @@
|
||||
package org.acegisecurity.util;
|
||||
package org.springframework.security.util;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.Map;
|
@ -1,4 +1,4 @@
|
||||
package org.acegisecurity;
|
||||
package org.springframework.security;
|
||||
|
||||
import junit.framework.Test;
|
||||
import junit.framework.TestCase;
|
@ -13,19 +13,18 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.acegisecurity;
|
||||
package org.springframework.security;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import org.acegisecurity.AccessDeniedException;
|
||||
import org.acegisecurity.GrantedAuthority;
|
||||
import org.acegisecurity.GrantedAuthorityImpl;
|
||||
import org.springframework.security.AccessDeniedException;
|
||||
import org.springframework.security.GrantedAuthority;
|
||||
import org.springframework.security.GrantedAuthorityImpl;
|
||||
|
||||
import org.acegisecurity.context.SecurityContextHolder;
|
||||
import org.acegisecurity.context.SecurityContextImpl;
|
||||
import org.springframework.security.context.SecurityContextHolder;
|
||||
import org.springframework.security.context.SecurityContextImpl;
|
||||
|
||||
import org.acegisecurity.providers.TestingAuthenticationToken;
|
||||
import org.acegisecurity.providers.UsernamePasswordAuthenticationToken;
|
||||
import org.springframework.security.providers.UsernamePasswordAuthenticationToken;
|
||||
|
||||
import org.springframework.context.support.ClassPathXmlApplicationContext;
|
||||
|
||||
@ -75,7 +74,7 @@ public class BankTests extends TestCase {
|
||||
|
||||
public final void setUp() throws Exception {
|
||||
super.setUp();
|
||||
ctx = new ClassPathXmlApplicationContext("org/acegisecurity/config/auto-config.xml");
|
||||
ctx = new ClassPathXmlApplicationContext("org/security/config/auto-config.xml");
|
||||
service = (BankService) ctx.getBean("bankService");
|
||||
}
|
||||
|
@ -1,10 +1,10 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package org.acegisecurity.config;
|
||||
package org.springframework.security.config;
|
||||
|
||||
import org.acegisecurity.providers.ProviderManager;
|
||||
import org.acegisecurity.providers.dao.DaoAuthenticationProvider;
|
||||
import org.springframework.security.providers.ProviderManager;
|
||||
import org.springframework.security.providers.dao.DaoAuthenticationProvider;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.context.support.ClassPathXmlApplicationContext;
|
||||
|
||||
@ -17,7 +17,7 @@ import junit.framework.TestCase;
|
||||
public class AuthenticationMechanismNamespaceTests extends TestCase {
|
||||
public void testParserDefaults() {
|
||||
ApplicationContext context = new ClassPathXmlApplicationContext(
|
||||
"org/acegisecurity/config/remember-me-defaults.xml");
|
||||
"org/springframework/security/config/remember-me-defaults.xml");
|
||||
ProviderManager mgr = (ProviderManager) context.getBean("authenticationManager");
|
||||
assertEquals(1, mgr.getProviders().size());
|
||||
assertTrue(mgr.getProviders().get(0) instanceof DaoAuthenticationProvider);
|
@ -1,7 +1,7 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package org.acegisecurity.config;
|
||||
package org.springframework.security.config;
|
||||
|
||||
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
@ -17,7 +17,7 @@ public class AuthenticationProcessingFilterNamespaceTests extends TestCase {
|
||||
|
||||
public void testAuthenticationFilterBeanDefinition() {
|
||||
ApplicationContext context = new ClassPathXmlApplicationContext(
|
||||
"org/acegisecurity/config/authentication-form-filter.xml");
|
||||
"org/springframework/security/config/authentication-form-filter.xml");
|
||||
ConfigurableListableBeanFactory factory = (ConfigurableListableBeanFactory) context
|
||||
.getAutowireCapableBeanFactory();
|
||||
}
|
@ -1,17 +1,17 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package org.acegisecurity.config;
|
||||
package org.springframework.security.config;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import org.acegisecurity.providers.AuthenticationProvider;
|
||||
import org.acegisecurity.providers.dao.DaoAuthenticationProvider;
|
||||
import org.acegisecurity.providers.dao.SaltSource;
|
||||
import org.acegisecurity.providers.encoding.Md5PasswordEncoder;
|
||||
import org.acegisecurity.providers.encoding.PasswordEncoder;
|
||||
import org.acegisecurity.providers.encoding.PlaintextPasswordEncoder;
|
||||
import org.acegisecurity.userdetails.jdbc.JdbcDaoImpl;
|
||||
import org.springframework.security.providers.AuthenticationProvider;
|
||||
import org.springframework.security.providers.dao.DaoAuthenticationProvider;
|
||||
import org.springframework.security.providers.dao.SaltSource;
|
||||
import org.springframework.security.providers.encoding.Md5PasswordEncoder;
|
||||
import org.springframework.security.providers.encoding.PasswordEncoder;
|
||||
import org.springframework.security.providers.encoding.PlaintextPasswordEncoder;
|
||||
import org.springframework.security.userdetails.jdbc.JdbcDaoImpl;
|
||||
import org.springframework.beans.PropertyValue;
|
||||
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
|
||||
import org.springframework.beans.factory.config.RuntimeBeanReference;
|
||||
@ -28,7 +28,7 @@ public class AuthenticationRepositoryParserTest extends TestCase {
|
||||
|
||||
public void testAuthenticationRepositoryDefaultWithAutoUserdetails() {
|
||||
ApplicationContext context = new ClassPathXmlApplicationContext(
|
||||
"org/acegisecurity/config/authentication-dao-defaults.xml");
|
||||
"org/springframework/security/config/authentication-dao-defaults.xml");
|
||||
ConfigurableListableBeanFactory clbf = (ConfigurableListableBeanFactory) context
|
||||
.getAutowireCapableBeanFactory();
|
||||
|
||||
@ -46,7 +46,7 @@ public class AuthenticationRepositoryParserTest extends TestCase {
|
||||
|
||||
public void testCollaboratorsAsInnerBeans() {
|
||||
ApplicationContext context = new ClassPathXmlApplicationContext(
|
||||
"org/acegisecurity/config/authentication-innerbeans.xml");
|
||||
"org/springframework/security/config/authentication-innerbeans.xml");
|
||||
ConfigurableListableBeanFactory clbf = (ConfigurableListableBeanFactory) context
|
||||
.getAutowireCapableBeanFactory();
|
||||
// get the main bean definition, there should be only one
|
||||
@ -75,7 +75,7 @@ public class AuthenticationRepositoryParserTest extends TestCase {
|
||||
|
||||
public void testCollaboratorsAsBeanRef() {
|
||||
ApplicationContext context = new ClassPathXmlApplicationContext(
|
||||
"org/acegisecurity/config/authentication-beanRef-attributes.xml");
|
||||
"org/springframework/security/config/authentication-beanRef-attributes.xml");
|
||||
ConfigurableListableBeanFactory clbf = (ConfigurableListableBeanFactory) context
|
||||
.getAutowireCapableBeanFactory();
|
||||
// get the main bean definition, there should be only one
|
||||
@ -110,7 +110,7 @@ public class AuthenticationRepositoryParserTest extends TestCase {
|
||||
|
||||
public void testAutodetectionOfUserDetailsService() {
|
||||
ApplicationContext context = new ClassPathXmlApplicationContext(
|
||||
"org/acegisecurity/config/authentication-defaults.xml");
|
||||
"org/springframework/security/config/authentication-defaults.xml");
|
||||
DaoAuthenticationProvider provider = (DaoAuthenticationProvider) context.getBean("authenticationRepository");
|
||||
assertNotNull(provider.getUserDetailsService());
|
||||
assertNull(provider.getSaltSource());
|
@ -1,11 +1,10 @@
|
||||
package org.acegisecurity.config;
|
||||
package org.springframework.security.config;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import org.acegisecurity.AccessDecisionManager;
|
||||
import org.acegisecurity.vote.AuthenticatedVoter;
|
||||
import org.springframework.security.AccessDecisionManager;
|
||||
import org.springframework.beans.factory.config.BeanDefinition;
|
||||
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
|
||||
import org.springframework.beans.factory.support.ManagedList;
|
||||
@ -17,7 +16,7 @@ public class AuthorizationManagerBeanDefinitionParserTests extends TestCase {
|
||||
|
||||
public void testParsingBeanDefinition() {
|
||||
ApplicationContext context = new ClassPathXmlApplicationContext(
|
||||
"org/acegisecurity/config/authorization-manager.xml");
|
||||
"org/springframework/security/config/authorization-manager.xml");
|
||||
ConfigurableListableBeanFactory bf = (ConfigurableListableBeanFactory) context.getAutowireCapableBeanFactory();
|
||||
String[] beanNames = bf.getBeanNamesForType(AccessDecisionManager.class);
|
||||
assertEquals(1, beanNames.length);
|
||||
@ -25,7 +24,7 @@ public class AuthorizationManagerBeanDefinitionParserTests extends TestCase {
|
||||
assertNotNull(def);
|
||||
List decisionVoters = (ManagedList) def.getPropertyValues().getPropertyValue("decisionVoters").getValue();
|
||||
assertEquals(2, decisionVoters.size());
|
||||
assertEquals("org.acegisecurity.vote.RoleVoter", ((BeanDefinition) decisionVoters.get(0)).getBeanClassName());
|
||||
assertEquals("org.acegisecurity.vote.AuthenticatedVoter", ((BeanDefinition) decisionVoters.get(1)).getBeanClassName());
|
||||
assertEquals("org.springframework.security.vote.RoleVoter", ((BeanDefinition) decisionVoters.get(0)).getBeanClassName());
|
||||
assertEquals("org.springframework.security.vote.AuthenticatedVoter", ((BeanDefinition) decisionVoters.get(1)).getBeanClassName());
|
||||
}
|
||||
}
|
@ -1,22 +1,22 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package org.acegisecurity.config;
|
||||
package org.springframework.security.config;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.Map;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import org.acegisecurity.AuthenticationManager;
|
||||
import org.acegisecurity.context.HttpSessionContextIntegrationFilter;
|
||||
import org.acegisecurity.intercept.method.MethodDefinitionSource;
|
||||
import org.acegisecurity.intercept.method.aopalliance.MethodDefinitionSourceAdvisor;
|
||||
import org.acegisecurity.ui.logout.LogoutFilter;
|
||||
import org.acegisecurity.ui.logout.LogoutHandler;
|
||||
import org.acegisecurity.ui.rememberme.RememberMeProcessingFilter;
|
||||
import org.acegisecurity.ui.rememberme.RememberMeServices;
|
||||
import org.acegisecurity.ui.webapp.AuthenticationProcessingFilter;
|
||||
import org.springframework.security.AuthenticationManager;
|
||||
import org.springframework.security.context.HttpSessionContextIntegrationFilter;
|
||||
import org.springframework.security.intercept.method.MethodDefinitionSource;
|
||||
import org.springframework.security.intercept.method.aopalliance.MethodDefinitionSourceAdvisor;
|
||||
import org.springframework.security.ui.logout.LogoutFilter;
|
||||
import org.springframework.security.ui.logout.LogoutHandler;
|
||||
import org.springframework.security.ui.rememberme.RememberMeProcessingFilter;
|
||||
import org.springframework.security.ui.rememberme.RememberMeServices;
|
||||
import org.springframework.security.ui.webapp.AuthenticationProcessingFilter;
|
||||
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.context.support.ClassPathXmlApplicationContext;
|
||||
@ -36,7 +36,7 @@ public class AutoConfigBeanDefinitionParserTests extends TestCase {
|
||||
// ========================================================================================================
|
||||
|
||||
public void setUp() {
|
||||
this.context = new ClassPathXmlApplicationContext("org/acegisecurity/config/auto-config.xml");
|
||||
this.context = new ClassPathXmlApplicationContext("org/springframework/security/config/auto-config.xml");
|
||||
this.bf = (ConfigurableListableBeanFactory) context.getAutowireCapableBeanFactory();
|
||||
}
|
||||
|
@ -1,17 +1,13 @@
|
||||
package org.acegisecurity.config;
|
||||
package org.springframework.security.config;
|
||||
|
||||
import java.beans.FeatureDescriptor;
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.Arrays;
|
||||
|
||||
import javax.servlet.Filter;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import org.acegisecurity.ui.AccessDeniedHandler;
|
||||
import org.acegisecurity.ui.AccessDeniedHandlerImpl;
|
||||
import org.acegisecurity.ui.ExceptionTranslationFilter;
|
||||
import org.acegisecurity.ui.webapp.AuthenticationProcessingFilterEntryPoint;
|
||||
import org.springframework.security.ui.AccessDeniedHandler;
|
||||
import org.springframework.security.ui.AccessDeniedHandlerImpl;
|
||||
import org.springframework.security.ui.ExceptionTranslationFilter;
|
||||
import org.springframework.security.ui.webapp.AuthenticationProcessingFilterEntryPoint;
|
||||
import org.springframework.beans.PropertyValue;
|
||||
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
|
||||
import org.springframework.beans.factory.config.RuntimeBeanReference;
|
||||
@ -24,7 +20,7 @@ public class ExceptionTranslationParserTests extends TestCase {
|
||||
|
||||
public void testParsingBeanReferences() {
|
||||
ApplicationContext context = new ClassPathXmlApplicationContext(
|
||||
"org/acegisecurity/config/exception-translation-beanref.xml");
|
||||
"org/springframework/security/config/exception-translation-beanref.xml");
|
||||
ConfigurableListableBeanFactory factory = (ConfigurableListableBeanFactory) context
|
||||
.getAutowireCapableBeanFactory();
|
||||
String[] beanNames = factory.getBeanNamesForType(ExceptionTranslationFilter.class);
|
||||
@ -42,7 +38,7 @@ public class ExceptionTranslationParserTests extends TestCase {
|
||||
|
||||
public void testRuntimeBeanDependencies() {
|
||||
ApplicationContext context = new ClassPathXmlApplicationContext(
|
||||
"org/acegisecurity/config/exception-translation-beanref.xml");
|
||||
"org/springframework/security/config/exception-translation-beanref.xml");
|
||||
ExceptionTranslationFilter filter = (ExceptionTranslationFilter) context.getBean("exceptionTranslationFilter");
|
||||
AuthenticationProcessingFilterEntryPoint entryPoint = (AuthenticationProcessingFilterEntryPoint) filter
|
||||
.getAuthenticationEntryPoint();
|
||||
@ -53,7 +49,7 @@ public class ExceptionTranslationParserTests extends TestCase {
|
||||
|
||||
public void testAutoDetectionOfDefaultDependencies() throws Exception {
|
||||
ApplicationContext context = new ClassPathXmlApplicationContext(
|
||||
"org/acegisecurity/config/exception-translation-autodetect-handler.xml");
|
||||
"org/springframework/security/config/exception-translation-autodetect-handler.xml");
|
||||
ExceptionTranslationFilter filter = (ExceptionTranslationFilter) context.getBean("exceptionTranslationFilter");
|
||||
Field field = makeAccessibleAndGetFieldByName(filter.getClass().getDeclaredFields(), "accessDeniedHandler");
|
||||
assertTrue(field.get(filter) instanceof AccessDeniedHandler);
|
@ -1,11 +1,9 @@
|
||||
package org.acegisecurity.config;
|
||||
package org.springframework.security.config;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import org.acegisecurity.AccessDecisionManager;
|
||||
import org.acegisecurity.intercept.web.FilterSecurityInterceptor;
|
||||
import org.acegisecurity.intercept.web.RegExpBasedFilterInvocationDefinitionMap;
|
||||
import org.acegisecurity.vote.AffirmativeBased;
|
||||
import org.springframework.security.intercept.web.FilterSecurityInterceptor;
|
||||
import org.springframework.security.intercept.web.RegExpBasedFilterInvocationDefinitionMap;
|
||||
import org.springframework.beans.PropertyValue;
|
||||
import org.springframework.beans.factory.config.BeanDefinition;
|
||||
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
|
||||
@ -20,7 +18,7 @@ public class FilterSecurityInterceptorBeanDefinitionParserTests extends TestCase
|
||||
|
||||
public void testParsingBeanDefinition() {
|
||||
ApplicationContext context = new ClassPathXmlApplicationContext(
|
||||
"org/acegisecurity/config/authorization-http-config.xml");
|
||||
"org/springframework/security/config/authorization-http-config.xml");
|
||||
ConfigurableListableBeanFactory bf = (ConfigurableListableBeanFactory) context.getAutowireCapableBeanFactory();
|
||||
String[] beanNames = bf.getBeanNamesForType(FilterSecurityInterceptor.class);
|
||||
assertEquals(1, beanNames.length);
|
||||
@ -30,6 +28,6 @@ public class FilterSecurityInterceptorBeanDefinitionParserTests extends TestCase
|
||||
assertTrue(objectDefinitionSource.getValue() instanceof RegExpBasedFilterInvocationDefinitionMap);
|
||||
PropertyValue accessDecisionManager = def.getPropertyValues().getPropertyValue("accessDecisionManager");
|
||||
BeanDefinition definition = (RootBeanDefinition) accessDecisionManager.getValue() ;
|
||||
assertEquals("org.acegisecurity.vote.AffirmativeBased" , definition.getBeanClassName());
|
||||
assertEquals("org.springframework.security.vote.AffirmativeBased" , definition.getBeanClassName());
|
||||
}
|
||||
}
|
@ -1,11 +1,11 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package org.acegisecurity.config;
|
||||
package org.springframework.security.config;
|
||||
|
||||
import javax.servlet.Filter;
|
||||
|
||||
import org.acegisecurity.context.HttpSessionContextIntegrationFilter;
|
||||
import org.springframework.security.context.HttpSessionContextIntegrationFilter;
|
||||
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
|
||||
import org.springframework.beans.factory.support.RootBeanDefinition;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
@ -21,7 +21,7 @@ import junit.framework.TestCase;
|
||||
public class HttpSessionContextIntegrationParserTest extends TestCase {
|
||||
|
||||
public void testApplicationContext() {
|
||||
ApplicationContext context = new ClassPathXmlApplicationContext("org/acegisecurity/config/session-context-integration-defaults.xml");
|
||||
ApplicationContext context = new ClassPathXmlApplicationContext("org/springframework/security/config/session-context-integration-defaults.xml");
|
||||
ConfigurableListableBeanFactory clbf =
|
||||
(ConfigurableListableBeanFactory)context.getAutowireCapableBeanFactory();
|
||||
|
@ -1,10 +1,10 @@
|
||||
package org.acegisecurity.config;
|
||||
package org.springframework.security.config;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import org.acegisecurity.ldap.InitialDirContextFactory;
|
||||
import org.acegisecurity.providers.ldap.LdapAuthenticationProvider;
|
||||
import org.acegisecurity.providers.ldap.authenticator.BindAuthenticator;
|
||||
import org.springframework.security.ldap.InitialDirContextFactory;
|
||||
import org.springframework.security.providers.ldap.LdapAuthenticationProvider;
|
||||
import org.springframework.security.providers.ldap.authenticator.BindAuthenticator;
|
||||
import org.springframework.beans.PropertyValue;
|
||||
import org.springframework.beans.PropertyValues;
|
||||
import org.springframework.beans.factory.config.BeanDefinition;
|
||||
@ -22,7 +22,7 @@ import org.springframework.context.support.ClassPathXmlApplicationContext;
|
||||
public class LdapAuthenticationProviderBeanDefinitionParserTests extends TestCase {
|
||||
|
||||
public void testBeanDefinitionCreation() {
|
||||
ApplicationContext context = new ClassPathXmlApplicationContext("org/acegisecurity/config/ldap-config.xml");
|
||||
ApplicationContext context = new ClassPathXmlApplicationContext("org/springframework/security/config/ldap-config.xml");
|
||||
ConfigurableListableBeanFactory bf = (ConfigurableListableBeanFactory) context.getAutowireCapableBeanFactory();
|
||||
BeanDefinition def = (RootBeanDefinition) bf.getBeanDefinition("authenticationManager");
|
||||
assertNotNull(def);
|
||||
@ -44,9 +44,9 @@ public class LdapAuthenticationProviderBeanDefinitionParserTests extends TestCas
|
||||
|
||||
RootBeanDefinition initialContextDir = (RootBeanDefinition) authenticatorDefinition
|
||||
.getConstructorArgumentValues().getArgumentValue(0, InitialDirContextFactory.class).getValue();
|
||||
assertEquals("cn=manager,dc=acegisecurity,dc=org", initialContextDir.getPropertyValues().getPropertyValue(
|
||||
assertEquals("cn=manager,dc=security,dc=org", initialContextDir.getPropertyValues().getPropertyValue(
|
||||
"managerDn").getValue());
|
||||
assertEquals("ldap://monkeymachine:389/dc=acegisecurity,dc=org", initialContextDir.getConstructorArgumentValues()
|
||||
assertEquals("ldap://monkeymachine:389/dc=security,dc=org", initialContextDir.getConstructorArgumentValues()
|
||||
.getArgumentValue(0, String.class).getValue());
|
||||
}
|
||||
}
|
@ -1,13 +1,13 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package org.acegisecurity.config;
|
||||
package org.springframework.security.config;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import org.acegisecurity.ui.logout.LogoutHandler;
|
||||
import org.springframework.security.ui.logout.LogoutHandler;
|
||||
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.context.support.ClassPathXmlApplicationContext;
|
||||
@ -20,7 +20,7 @@ public class LogoutFilterBeanDefinitionParserTests extends TestCase {
|
||||
|
||||
public void testLogoutFilter() {
|
||||
ApplicationContext context = new ClassPathXmlApplicationContext(
|
||||
"org/acegisecurity/config/logout-filter-with-handlers.xml");
|
||||
"org/springframework/security/config/logout-filter-with-handlers.xml");
|
||||
ConfigurableListableBeanFactory bf = (ConfigurableListableBeanFactory) context.getAutowireCapableBeanFactory();
|
||||
Map m = bf.getBeansOfType(LogoutHandler.class);
|
||||
assertEquals(2, m.size());
|
@ -1,7 +1,7 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package org.acegisecurity.config;
|
||||
package org.springframework.security.config;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
@ -16,7 +16,7 @@ public class NamespaceTests extends TestCase {
|
||||
|
||||
|
||||
public void testPass() {
|
||||
ApplicationContext c = new ClassPathXmlApplicationContext("org/acegisecurity/config/applicationContext-acegi-security.xml");
|
||||
ApplicationContext c = new ClassPathXmlApplicationContext("org/springframework/security/config/applicationContext-acegi-security.xml");
|
||||
}
|
||||
|
||||
}
|
@ -1,15 +1,14 @@
|
||||
package org.acegisecurity.config;
|
||||
package org.springframework.security.config;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import org.acegisecurity.GrantedAuthority;
|
||||
import org.acegisecurity.GrantedAuthorityImpl;
|
||||
import org.acegisecurity.userdetails.User;
|
||||
import org.acegisecurity.userdetails.UserDetailsService;
|
||||
import org.acegisecurity.userdetails.memory.InMemoryDaoImpl;
|
||||
import org.acegisecurity.userdetails.memory.UserMap;
|
||||
import org.springframework.security.GrantedAuthority;
|
||||
import org.springframework.security.GrantedAuthorityImpl;
|
||||
import org.springframework.security.userdetails.User;
|
||||
import org.springframework.security.userdetails.UserDetailsService;
|
||||
import org.springframework.security.userdetails.memory.InMemoryDaoImpl;
|
||||
import org.springframework.security.userdetails.memory.UserMap;
|
||||
import org.springframework.beans.PropertyValue;
|
||||
import org.springframework.beans.factory.config.BeanDefinition;
|
||||
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
|
||||
import org.springframework.beans.factory.support.RootBeanDefinition;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
@ -23,7 +22,7 @@ public class PrincipalRepositoryNamespaceTests extends TestCase {
|
||||
|
||||
public void testParserWithUserDefinition() {
|
||||
ApplicationContext context = new ClassPathXmlApplicationContext(
|
||||
"org/acegisecurity/config/principal-repository-user-map.xml");
|
||||
"org/springframework/security/config/principal-repository-user-map.xml");
|
||||
|
||||
ConfigurableListableBeanFactory clbf = (ConfigurableListableBeanFactory) context
|
||||
.getAutowireCapableBeanFactory();
|
@ -1,9 +1,9 @@
|
||||
package org.acegisecurity.config;
|
||||
package org.springframework.security.config;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import org.acegisecurity.providers.ProviderManager;
|
||||
import org.acegisecurity.providers.dao.DaoAuthenticationProvider;
|
||||
import org.springframework.security.providers.ProviderManager;
|
||||
import org.springframework.security.providers.dao.DaoAuthenticationProvider;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.context.support.ClassPathXmlApplicationContext;
|
||||
|
||||
@ -11,7 +11,7 @@ import org.springframework.context.support.ClassPathXmlApplicationContext;
|
||||
public class RememberMeBeanDefinitionParserTest extends TestCase {
|
||||
|
||||
public void testParserDefaults() {
|
||||
ApplicationContext context = new ClassPathXmlApplicationContext("org/acegisecurity/config/remember-me-defaults.xml");
|
||||
ApplicationContext context = new ClassPathXmlApplicationContext("org/springframework/security/config/remember-me-defaults.xml");
|
||||
ProviderManager mgr = (ProviderManager)context.getBean("authenticationManager");
|
||||
assertEquals(1, mgr.getProviders().size());
|
||||
assertTrue(mgr.getProviders().get(0) instanceof DaoAuthenticationProvider);
|
@ -1,20 +1,18 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package org.acegisecurity.config;
|
||||
package org.springframework.security.config;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.Map;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import org.acegisecurity.AuthenticationManager;
|
||||
import org.acegisecurity.ui.rememberme.RememberMeProcessingFilter;
|
||||
import org.acegisecurity.ui.rememberme.RememberMeServices;
|
||||
import org.acegisecurity.ui.rememberme.TokenBasedRememberMeServices;
|
||||
import org.acegisecurity.userdetails.UserDetailsService;
|
||||
import org.springframework.beans.PropertyValue;
|
||||
import org.springframework.beans.factory.config.BeanDefinition;
|
||||
import org.springframework.security.AuthenticationManager;
|
||||
import org.springframework.security.ui.rememberme.RememberMeProcessingFilter;
|
||||
import org.springframework.security.ui.rememberme.RememberMeServices;
|
||||
import org.springframework.security.ui.rememberme.TokenBasedRememberMeServices;
|
||||
import org.springframework.security.userdetails.UserDetailsService;
|
||||
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
|
||||
import org.springframework.beans.factory.support.RootBeanDefinition;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
@ -28,7 +26,7 @@ import org.springframework.util.ReflectionUtils;
|
||||
public class RememberMeServicesBeanDefinitionParserTests extends TestCase {
|
||||
|
||||
public void testFilterConfiguration() {
|
||||
ApplicationContext context = new ClassPathXmlApplicationContext("org/acegisecurity/config/remember-me-defaults.xml");
|
||||
ApplicationContext context = new ClassPathXmlApplicationContext("org/springframework/security/config/remember-me-defaults.xml");
|
||||
ConfigurableListableBeanFactory bf = (ConfigurableListableBeanFactory)context.getAutowireCapableBeanFactory();
|
||||
String[] names = bf.getBeanNamesForType(RememberMeProcessingFilter.class);
|
||||
assertEquals(1, names.length);
|
||||
@ -37,7 +35,7 @@ public class RememberMeServicesBeanDefinitionParserTests extends TestCase {
|
||||
}
|
||||
|
||||
public void testRuntimeAutoDetectionOfDependencies() throws Exception {
|
||||
ApplicationContext context = new ClassPathXmlApplicationContext("org/acegisecurity/config/remember-me-autodetect.xml");
|
||||
ApplicationContext context = new ClassPathXmlApplicationContext("org/springframework/security/config/remember-me-autodetect.xml");
|
||||
ConfigurableListableBeanFactory factory = (ConfigurableListableBeanFactory) context.getAutowireCapableBeanFactory();
|
||||
Map map = factory.getBeansOfType(RememberMeProcessingFilter.class);
|
||||
RememberMeProcessingFilter filter = (RememberMeProcessingFilter)map.values().iterator().next();
|
Loading…
x
Reference in New Issue
Block a user