SEC-562: Repackaging core.
This commit is contained in:
@@ -13,11 +13,11 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.acegisecurity;
|
||||
package org.springframework.security;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import org.acegisecurity.providers.TestingAuthenticationToken;
|
||||
import org.springframework.security.providers.TestingAuthenticationToken;
|
||||
|
||||
|
||||
/**
|
||||
@@ -13,7 +13,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.acegisecurity;
|
||||
package org.springframework.security;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
@@ -24,7 +24,7 @@ import java.util.Locale;
|
||||
|
||||
|
||||
/**
|
||||
* Tests {@link org.acegisecurity.AcegiMessageSource}.
|
||||
* Tests {@link org.springframework.security.AcegiMessageSource}.
|
||||
*/
|
||||
public class AcegiMessageSourceTests extends TestCase {
|
||||
//~ Constructors ===================================================================================================
|
||||
@@ -13,17 +13,17 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.acegisecurity;
|
||||
package org.springframework.security;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import org.acegisecurity.providers.TestingAuthenticationToken;
|
||||
import org.acegisecurity.providers.anonymous.AnonymousAuthenticationToken;
|
||||
import org.acegisecurity.providers.rememberme.RememberMeAuthenticationToken;
|
||||
import org.springframework.security.providers.TestingAuthenticationToken;
|
||||
import org.springframework.security.providers.anonymous.AnonymousAuthenticationToken;
|
||||
import org.springframework.security.providers.rememberme.RememberMeAuthenticationToken;
|
||||
|
||||
|
||||
/**
|
||||
* Tests {@link org.acegisecurity.AuthenticationTrustResolverImpl}.
|
||||
* Tests {@link org.springframework.security.AuthenticationTrustResolverImpl}.
|
||||
*
|
||||
* @author Ben Alex
|
||||
* @version $Id$
|
||||
@@ -13,7 +13,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.acegisecurity;
|
||||
package org.springframework.security;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.acegisecurity;
|
||||
package org.springframework.security;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.acegisecurity;
|
||||
package org.springframework.security;
|
||||
|
||||
/**
|
||||
* Represents the interface of a secured object.
|
||||
@@ -13,7 +13,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.acegisecurity;
|
||||
package org.springframework.security;
|
||||
|
||||
import java.util.Iterator;
|
||||
|
||||
@@ -13,10 +13,10 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.acegisecurity;
|
||||
package org.springframework.security;
|
||||
|
||||
import org.acegisecurity.acl.AclEntry;
|
||||
import org.acegisecurity.acl.AclManager;
|
||||
import org.springframework.security.acl.AclEntry;
|
||||
import org.springframework.security.acl.AclManager;
|
||||
|
||||
|
||||
/**
|
||||
@@ -13,7 +13,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.acegisecurity;
|
||||
package org.springframework.security;
|
||||
|
||||
import java.util.Iterator;
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.acegisecurity;
|
||||
package org.springframework.security;
|
||||
|
||||
import org.springframework.context.ConfigurableApplicationContext;
|
||||
import org.springframework.context.support.ClassPathXmlApplicationContext;
|
||||
@@ -29,6 +29,6 @@ public class MockApplicationContext {
|
||||
//~ Methods ========================================================================================================
|
||||
|
||||
public static ConfigurableApplicationContext getContext() {
|
||||
return new ClassPathXmlApplicationContext("org/acegisecurity/applicationContext.xml");
|
||||
return new ClassPathXmlApplicationContext("org/springframework/security/applicationContext.xml");
|
||||
}
|
||||
}
|
||||
@@ -13,7 +13,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.acegisecurity;
|
||||
package org.springframework.security;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
@@ -23,7 +23,7 @@ import javax.servlet.ServletResponse;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.acegisecurity.ui.AuthenticationEntryPoint;
|
||||
import org.springframework.security.ui.AuthenticationEntryPoint;
|
||||
|
||||
|
||||
/**
|
||||
@@ -13,7 +13,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.acegisecurity;
|
||||
package org.springframework.security;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.acegisecurity;
|
||||
package org.springframework.security;
|
||||
|
||||
import java.util.Enumeration;
|
||||
import java.util.HashMap;
|
||||
@@ -13,7 +13,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.acegisecurity;
|
||||
package org.springframework.security;
|
||||
|
||||
import org.aspectj.lang.JoinPoint;
|
||||
import org.aspectj.lang.Signature;
|
||||
@@ -13,9 +13,9 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.acegisecurity;
|
||||
package org.springframework.security;
|
||||
|
||||
import org.acegisecurity.util.PortResolver;
|
||||
import org.springframework.security.util.PortResolver;
|
||||
|
||||
import javax.servlet.ServletRequest;
|
||||
|
||||
@@ -13,9 +13,9 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.acegisecurity;
|
||||
package org.springframework.security;
|
||||
|
||||
import org.acegisecurity.providers.AbstractAuthenticationToken;
|
||||
import org.springframework.security.providers.AbstractAuthenticationToken;
|
||||
|
||||
|
||||
/**
|
||||
@@ -13,7 +13,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.acegisecurity;
|
||||
package org.springframework.security;
|
||||
|
||||
import java.util.Iterator;
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.acegisecurity;
|
||||
package org.springframework.security;
|
||||
|
||||
/**
|
||||
* Simply extends {@link TargetObject} so we have a different object to put configuration attributes against.<P>There
|
||||
@@ -13,7 +13,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.acegisecurity;
|
||||
package org.springframework.security;
|
||||
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
import org.springframework.jdbc.datasource.DriverManagerDataSource;
|
||||
@@ -29,7 +29,7 @@ import javax.sql.DataSource;
|
||||
*/
|
||||
public class PopulatedDatabase {
|
||||
//~ Static fields/initializers =====================================================================================
|
||||
|
||||
|
||||
private static DriverManagerDataSource dataSource = null;
|
||||
|
||||
//~ Constructors ===================================================================================================
|
||||
@@ -76,21 +76,21 @@ public class PopulatedDatabase {
|
||||
template.execute("INSERT INTO AUTHORITIES VALUES('scott','ROLE_TELLER')");
|
||||
template.execute("INSERT INTO AUTHORITIES VALUES('peter','ROLE_TELLER')");
|
||||
template.execute(
|
||||
"INSERT INTO acl_object_identity VALUES (1, 'org.acegisecurity.acl.DomainObject:1', null, 'org.acegisecurity.acl.basic.SimpleAclEntry');");
|
||||
"INSERT INTO acl_object_identity VALUES (1, 'org.springframework.security.acl.DomainObject:1', null, 'org.springframework.security.acl.basic.SimpleAclEntry');");
|
||||
template.execute(
|
||||
"INSERT INTO acl_object_identity VALUES (2, 'org.acegisecurity.acl.DomainObject:2', 1, 'org.acegisecurity.acl.basic.SimpleAclEntry');");
|
||||
"INSERT INTO acl_object_identity VALUES (2, 'org.springframework.security.acl.DomainObject:2', 1, 'org.springframework.security.acl.basic.SimpleAclEntry');");
|
||||
template.execute(
|
||||
"INSERT INTO acl_object_identity VALUES (3, 'org.acegisecurity.acl.DomainObject:3', 1, 'org.acegisecurity.acl.basic.SimpleAclEntry');");
|
||||
"INSERT INTO acl_object_identity VALUES (3, 'org.springframework.security.acl.DomainObject:3', 1, 'org.springframework.security.acl.basic.SimpleAclEntry');");
|
||||
template.execute(
|
||||
"INSERT INTO acl_object_identity VALUES (4, 'org.acegisecurity.acl.DomainObject:4', 1, 'org.acegisecurity.acl.basic.SimpleAclEntry');");
|
||||
"INSERT INTO acl_object_identity VALUES (4, 'org.springframework.security.acl.DomainObject:4', 1, 'org.springframework.security.acl.basic.SimpleAclEntry');");
|
||||
template.execute(
|
||||
"INSERT INTO acl_object_identity VALUES (5, 'org.acegisecurity.acl.DomainObject:5', 3, 'org.acegisecurity.acl.basic.SimpleAclEntry');");
|
||||
"INSERT INTO acl_object_identity VALUES (5, 'org.springframework.security.acl.DomainObject:5', 3, 'org.springframework.security.acl.basic.SimpleAclEntry');");
|
||||
template.execute(
|
||||
"INSERT INTO acl_object_identity VALUES (6, 'org.acegisecurity.acl.DomainObject:6', 3, 'org.acegisecurity.acl.basic.SimpleAclEntry');");
|
||||
"INSERT INTO acl_object_identity VALUES (6, 'org.springframework.security.acl.DomainObject:6', 3, 'org.springframework.security.acl.basic.SimpleAclEntry');");
|
||||
|
||||
// ----- BEGIN deviation from normal sample data load script -----
|
||||
template.execute(
|
||||
"INSERT INTO acl_object_identity VALUES (7, 'org.acegisecurity.acl.DomainObject:7', 3, 'some.invalid.acl.entry.class');");
|
||||
"INSERT INTO acl_object_identity VALUES (7, 'org.springframework.security.acl.DomainObject:7', 3, 'some.invalid.acl.entry.class');");
|
||||
|
||||
// ----- FINISH deviation from normal sample data load script -----
|
||||
template.execute("INSERT INTO acl_permission VALUES (null, 1, 'ROLE_SUPERVISOR', 1);");
|
||||
@@ -13,7 +13,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.acegisecurity;
|
||||
package org.springframework.security;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
@@ -13,9 +13,9 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.acegisecurity;
|
||||
package org.springframework.security;
|
||||
|
||||
import org.acegisecurity.context.SecurityContextHolder;
|
||||
import org.springframework.security.context.SecurityContextHolder;
|
||||
|
||||
|
||||
/**
|
||||
@@ -13,18 +13,18 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.acegisecurity.acl;
|
||||
package org.springframework.security.acl;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import org.acegisecurity.Authentication;
|
||||
import org.acegisecurity.GrantedAuthority;
|
||||
import org.acegisecurity.GrantedAuthorityImpl;
|
||||
import org.springframework.security.Authentication;
|
||||
import org.springframework.security.GrantedAuthority;
|
||||
import org.springframework.security.GrantedAuthorityImpl;
|
||||
|
||||
import org.acegisecurity.acl.basic.NamedEntityObjectIdentity;
|
||||
import org.acegisecurity.acl.basic.SimpleAclEntry;
|
||||
import org.springframework.security.acl.basic.NamedEntityObjectIdentity;
|
||||
import org.springframework.security.acl.basic.SimpleAclEntry;
|
||||
|
||||
import org.acegisecurity.providers.UsernamePasswordAuthenticationToken;
|
||||
import org.springframework.security.providers.UsernamePasswordAuthenticationToken;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Vector;
|
||||
@@ -13,19 +13,19 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.acegisecurity.acl.basic;
|
||||
package org.springframework.security.acl.basic;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import org.acegisecurity.Authentication;
|
||||
import org.acegisecurity.PopulatedDatabase;
|
||||
import org.springframework.security.Authentication;
|
||||
import org.springframework.security.PopulatedDatabase;
|
||||
|
||||
import org.acegisecurity.acl.AclEntry;
|
||||
import org.acegisecurity.acl.basic.cache.BasicAclEntryHolder;
|
||||
import org.acegisecurity.acl.basic.cache.NullAclEntryCache;
|
||||
import org.acegisecurity.acl.basic.jdbc.JdbcDaoImpl;
|
||||
import org.springframework.security.acl.AclEntry;
|
||||
import org.springframework.security.acl.basic.cache.BasicAclEntryHolder;
|
||||
import org.springframework.security.acl.basic.cache.NullAclEntryCache;
|
||||
import org.springframework.security.acl.basic.jdbc.JdbcDaoImpl;
|
||||
|
||||
import org.acegisecurity.providers.UsernamePasswordAuthenticationToken;
|
||||
import org.springframework.security.providers.UsernamePasswordAuthenticationToken;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
@@ -40,7 +40,7 @@ import java.util.Map;
|
||||
public class BasicAclProviderTests extends TestCase {
|
||||
//~ Static fields/initializers =====================================================================================
|
||||
|
||||
public static final String OBJECT_IDENTITY = "org.acegisecurity.acl.DomainObject";
|
||||
public static final String OBJECT_IDENTITY = "org.springframework.security.acl.DomainObject";
|
||||
|
||||
//~ Constructors ===================================================================================================
|
||||
|
||||
@@ -13,18 +13,18 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.acegisecurity.acl.basic;
|
||||
package org.springframework.security.acl.basic;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import org.acegisecurity.GrantedAuthority;
|
||||
import org.acegisecurity.GrantedAuthorityImpl;
|
||||
import org.springframework.security.GrantedAuthority;
|
||||
import org.springframework.security.GrantedAuthorityImpl;
|
||||
|
||||
import org.acegisecurity.acl.AclEntry;
|
||||
import org.springframework.security.acl.AclEntry;
|
||||
|
||||
import org.acegisecurity.providers.UsernamePasswordAuthenticationToken;
|
||||
import org.springframework.security.providers.UsernamePasswordAuthenticationToken;
|
||||
|
||||
import org.acegisecurity.userdetails.User;
|
||||
import org.springframework.security.userdetails.User;
|
||||
|
||||
|
||||
/**
|
||||
@@ -13,7 +13,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.acegisecurity.acl.basic;
|
||||
package org.springframework.security.acl.basic;
|
||||
|
||||
/**
|
||||
* Implements <code>AclObjectIdentity</code> but is incompatible with <code>BasicAclProvider</code> because it
|
||||
@@ -13,7 +13,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.acegisecurity.acl.basic;
|
||||
package org.springframework.security.acl.basic;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.acegisecurity.acl.basic;
|
||||
package org.springframework.security.acl.basic;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.acegisecurity.acl.basic;
|
||||
package org.springframework.security.acl.basic;
|
||||
|
||||
/**
|
||||
* Simple object to use when testing <code>NamedEntityObjectIdentity</code>.
|
||||
@@ -13,12 +13,12 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.acegisecurity.acl.basic.cache;
|
||||
package org.springframework.security.acl.basic.cache;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import org.acegisecurity.acl.basic.BasicAclEntry;
|
||||
import org.acegisecurity.acl.basic.SimpleAclEntry;
|
||||
import org.springframework.security.acl.basic.BasicAclEntry;
|
||||
import org.springframework.security.acl.basic.SimpleAclEntry;
|
||||
|
||||
|
||||
/**
|
||||
@@ -13,18 +13,18 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.acegisecurity.acl.basic.cache;
|
||||
package org.springframework.security.acl.basic.cache;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import net.sf.ehcache.Ehcache;
|
||||
|
||||
import org.acegisecurity.MockApplicationContext;
|
||||
import org.springframework.security.MockApplicationContext;
|
||||
|
||||
import org.acegisecurity.acl.basic.AclObjectIdentity;
|
||||
import org.acegisecurity.acl.basic.BasicAclEntry;
|
||||
import org.acegisecurity.acl.basic.NamedEntityObjectIdentity;
|
||||
import org.acegisecurity.acl.basic.SimpleAclEntry;
|
||||
import org.springframework.security.acl.basic.AclObjectIdentity;
|
||||
import org.springframework.security.acl.basic.BasicAclEntry;
|
||||
import org.springframework.security.acl.basic.NamedEntityObjectIdentity;
|
||||
import org.springframework.security.acl.basic.SimpleAclEntry;
|
||||
|
||||
import org.springframework.context.ApplicationContext;
|
||||
|
||||
@@ -13,13 +13,13 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.acegisecurity.acl.basic.cache;
|
||||
package org.springframework.security.acl.basic.cache;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import org.acegisecurity.acl.basic.BasicAclEntry;
|
||||
import org.acegisecurity.acl.basic.NamedEntityObjectIdentity;
|
||||
import org.acegisecurity.acl.basic.SimpleAclEntry;
|
||||
import org.springframework.security.acl.basic.BasicAclEntry;
|
||||
import org.springframework.security.acl.basic.NamedEntityObjectIdentity;
|
||||
import org.springframework.security.acl.basic.SimpleAclEntry;
|
||||
|
||||
|
||||
/**
|
||||
@@ -13,15 +13,15 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.acegisecurity.acl.basic.jdbc;
|
||||
package org.springframework.security.acl.basic.jdbc;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import org.acegisecurity.PopulatedDatabase;
|
||||
import org.springframework.security.PopulatedDatabase;
|
||||
|
||||
import org.acegisecurity.acl.basic.AclObjectIdentity;
|
||||
import org.acegisecurity.acl.basic.BasicAclEntry;
|
||||
import org.acegisecurity.acl.basic.NamedEntityObjectIdentity;
|
||||
import org.springframework.security.acl.basic.AclObjectIdentity;
|
||||
import org.springframework.security.acl.basic.BasicAclEntry;
|
||||
import org.springframework.security.acl.basic.NamedEntityObjectIdentity;
|
||||
|
||||
import org.springframework.jdbc.object.MappingSqlQuery;
|
||||
|
||||
@@ -38,7 +38,7 @@ import java.sql.SQLException;
|
||||
public class JdbcDaoImplTests extends TestCase {
|
||||
//~ Static fields/initializers =====================================================================================
|
||||
|
||||
public static final String OBJECT_IDENTITY = "org.acegisecurity.acl.DomainObject";
|
||||
public static final String OBJECT_IDENTITY = "org.springframework.security.acl.DomainObject";
|
||||
|
||||
//~ Constructors ===================================================================================================
|
||||
|
||||
@@ -13,16 +13,16 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.acegisecurity.acl.basic.jdbc;
|
||||
package org.springframework.security.acl.basic.jdbc;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import org.acegisecurity.PopulatedDatabase;
|
||||
import org.springframework.security.PopulatedDatabase;
|
||||
|
||||
import org.acegisecurity.acl.basic.AclObjectIdentity;
|
||||
import org.acegisecurity.acl.basic.BasicAclEntry;
|
||||
import org.acegisecurity.acl.basic.NamedEntityObjectIdentity;
|
||||
import org.acegisecurity.acl.basic.SimpleAclEntry;
|
||||
import org.springframework.security.acl.basic.AclObjectIdentity;
|
||||
import org.springframework.security.acl.basic.BasicAclEntry;
|
||||
import org.springframework.security.acl.basic.NamedEntityObjectIdentity;
|
||||
import org.springframework.security.acl.basic.SimpleAclEntry;
|
||||
|
||||
import org.springframework.dao.DataIntegrityViolationException;
|
||||
import org.springframework.dao.DataRetrievalFailureException;
|
||||
@@ -42,7 +42,7 @@ import java.sql.SQLException;
|
||||
public class JdbcExtendedDaoImplTests extends TestCase {
|
||||
//~ Static fields/initializers =====================================================================================
|
||||
|
||||
public static final String OBJECT_IDENTITY = "org.acegisecurity.acl.DomainObject";
|
||||
public static final String OBJECT_IDENTITY = "org.springframework.security.acl.DomainObject";
|
||||
|
||||
//~ Constructors ===================================================================================================
|
||||
|
||||
@@ -12,11 +12,11 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.acegisecurity.acls.domain;
|
||||
package org.springframework.security.acls.domain;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import org.acegisecurity.acls.Permission;
|
||||
import org.springframework.security.acls.Permission;
|
||||
|
||||
|
||||
/**
|
||||
@@ -12,7 +12,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.acegisecurity.acls.jdbc;
|
||||
package org.springframework.security.acls.jdbc;
|
||||
|
||||
import org.springframework.core.io.Resource;
|
||||
|
||||
@@ -12,25 +12,25 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.acegisecurity.acls.jdbc;
|
||||
package org.springframework.security.acls.jdbc;
|
||||
|
||||
import org.acegisecurity.Authentication;
|
||||
import org.acegisecurity.GrantedAuthority;
|
||||
import org.acegisecurity.GrantedAuthorityImpl;
|
||||
import org.springframework.security.Authentication;
|
||||
import org.springframework.security.GrantedAuthority;
|
||||
import org.springframework.security.GrantedAuthorityImpl;
|
||||
|
||||
import org.acegisecurity.acls.AccessControlEntry;
|
||||
import org.acegisecurity.acls.MutableAcl;
|
||||
import org.acegisecurity.acls.NotFoundException;
|
||||
import org.acegisecurity.acls.Permission;
|
||||
import org.acegisecurity.acls.domain.BasePermission;
|
||||
import org.acegisecurity.acls.objectidentity.ObjectIdentity;
|
||||
import org.acegisecurity.acls.objectidentity.ObjectIdentityImpl;
|
||||
import org.acegisecurity.acls.sid.PrincipalSid;
|
||||
import org.acegisecurity.acls.sid.Sid;
|
||||
import org.springframework.security.acls.AccessControlEntry;
|
||||
import org.springframework.security.acls.MutableAcl;
|
||||
import org.springframework.security.acls.NotFoundException;
|
||||
import org.springframework.security.acls.Permission;
|
||||
import org.springframework.security.acls.domain.BasePermission;
|
||||
import org.springframework.security.acls.objectidentity.ObjectIdentity;
|
||||
import org.springframework.security.acls.objectidentity.ObjectIdentityImpl;
|
||||
import org.springframework.security.acls.sid.PrincipalSid;
|
||||
import org.springframework.security.acls.sid.Sid;
|
||||
|
||||
import org.acegisecurity.context.SecurityContextHolder;
|
||||
import org.springframework.security.context.SecurityContextHolder;
|
||||
|
||||
import org.acegisecurity.providers.TestingAuthenticationToken;
|
||||
import org.springframework.security.providers.TestingAuthenticationToken;
|
||||
|
||||
import org.springframework.test.AbstractTransactionalDataSourceSpringContextTests;
|
||||
|
||||
@@ -51,7 +51,7 @@ public class JdbcAclServiceTests extends AbstractTransactionalDataSourceSpringCo
|
||||
//~ Methods ========================================================================================================
|
||||
|
||||
protected String[] getConfigLocations() {
|
||||
return new String[] {"classpath:org/acegisecurity/acls/jdbc/applicationContext-test.xml"};
|
||||
return new String[] {"classpath:org/springframework/security/acls/jdbc/applicationContext-test.xml"};
|
||||
}
|
||||
|
||||
public void setJdbcMutableAclService(JdbcMutableAclService jdbcAclService) {
|
||||
@@ -72,9 +72,9 @@ public class JdbcAclServiceTests extends AbstractTransactionalDataSourceSpringCo
|
||||
auth.setAuthenticated(true);
|
||||
SecurityContextHolder.getContext().setAuthentication(auth);
|
||||
|
||||
ObjectIdentity topParentOid = new ObjectIdentityImpl("org.acegisecurity.TargetObject", new Long(100));
|
||||
ObjectIdentity middleParentOid = new ObjectIdentityImpl("org.acegisecurity.TargetObject", new Long(101));
|
||||
ObjectIdentity childOid = new ObjectIdentityImpl("org.acegisecurity.TargetObject", new Long(102));
|
||||
ObjectIdentity topParentOid = new ObjectIdentityImpl("org.springframework.security.TargetObject", new Long(100));
|
||||
ObjectIdentity middleParentOid = new ObjectIdentityImpl("org.springframework.security.TargetObject", new Long(101));
|
||||
ObjectIdentity childOid = new ObjectIdentityImpl("org.springframework.security.TargetObject", new Long(102));
|
||||
|
||||
MutableAcl topParent = jdbcMutableAclService.createAcl(topParentOid);
|
||||
MutableAcl middleParent = jdbcMutableAclService.createAcl(middleParentOid);
|
||||
@@ -206,7 +206,7 @@ public class JdbcAclServiceTests extends AbstractTransactionalDataSourceSpringCo
|
||||
auth.setAuthenticated(true);
|
||||
SecurityContextHolder.getContext().setAuthentication(auth);
|
||||
|
||||
ObjectIdentity topParentOid = new ObjectIdentityImpl("org.acegisecurity.TargetObject", new Long(110));
|
||||
ObjectIdentity topParentOid = new ObjectIdentityImpl("org.springframework.security.TargetObject", new Long(110));
|
||||
MutableAcl topParent = jdbcMutableAclService.createAcl(topParentOid);
|
||||
|
||||
// Add an ACE permission entry
|
||||
@@ -13,12 +13,12 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.acegisecurity.adapters;
|
||||
package org.springframework.security.adapters;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import org.acegisecurity.GrantedAuthority;
|
||||
import org.acegisecurity.GrantedAuthorityImpl;
|
||||
import org.springframework.security.GrantedAuthority;
|
||||
import org.springframework.security.GrantedAuthorityImpl;
|
||||
|
||||
|
||||
/**
|
||||
@@ -13,16 +13,16 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.acegisecurity.adapters;
|
||||
package org.springframework.security.adapters;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import org.acegisecurity.Authentication;
|
||||
import org.acegisecurity.BadCredentialsException;
|
||||
import org.acegisecurity.GrantedAuthority;
|
||||
import org.acegisecurity.GrantedAuthorityImpl;
|
||||
import org.springframework.security.Authentication;
|
||||
import org.springframework.security.BadCredentialsException;
|
||||
import org.springframework.security.GrantedAuthority;
|
||||
import org.springframework.security.GrantedAuthorityImpl;
|
||||
|
||||
import org.acegisecurity.providers.UsernamePasswordAuthenticationToken;
|
||||
import org.springframework.security.providers.UsernamePasswordAuthenticationToken;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
@@ -13,16 +13,16 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.acegisecurity.adapters;
|
||||
package org.springframework.security.adapters;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import org.acegisecurity.GrantedAuthority;
|
||||
import org.acegisecurity.GrantedAuthorityImpl;
|
||||
import org.springframework.security.GrantedAuthority;
|
||||
import org.springframework.security.GrantedAuthorityImpl;
|
||||
|
||||
import org.acegisecurity.context.SecurityContextHolder;
|
||||
import org.springframework.security.context.SecurityContextHolder;
|
||||
|
||||
import org.acegisecurity.util.MockFilterChain;
|
||||
import org.springframework.security.util.MockFilterChain;
|
||||
|
||||
import org.springframework.mock.web.MockHttpServletRequest;
|
||||
import org.springframework.mock.web.MockHttpServletResponse;
|
||||
@@ -13,7 +13,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.acegisecurity.adapters;
|
||||
package org.springframework.security.adapters;
|
||||
|
||||
import java.security.Principal;
|
||||
|
||||
@@ -13,12 +13,12 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.acegisecurity.adapters;
|
||||
package org.springframework.security.adapters;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import org.acegisecurity.GrantedAuthority;
|
||||
import org.acegisecurity.GrantedAuthorityImpl;
|
||||
import org.springframework.security.GrantedAuthority;
|
||||
import org.springframework.security.GrantedAuthorityImpl;
|
||||
|
||||
|
||||
/**
|
||||
@@ -13,19 +13,19 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.acegisecurity.afterinvocation;
|
||||
package org.springframework.security.afterinvocation;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import org.acegisecurity.AccessDeniedException;
|
||||
import org.acegisecurity.Authentication;
|
||||
import org.acegisecurity.ConfigAttribute;
|
||||
import org.acegisecurity.ConfigAttributeDefinition;
|
||||
import org.acegisecurity.SecurityConfig;
|
||||
import org.springframework.security.AccessDeniedException;
|
||||
import org.springframework.security.Authentication;
|
||||
import org.springframework.security.ConfigAttribute;
|
||||
import org.springframework.security.ConfigAttributeDefinition;
|
||||
import org.springframework.security.SecurityConfig;
|
||||
|
||||
import org.acegisecurity.intercept.web.FilterInvocation;
|
||||
import org.springframework.security.intercept.web.FilterInvocation;
|
||||
|
||||
import org.acegisecurity.util.SimpleMethodInvocation;
|
||||
import org.springframework.security.util.SimpleMethodInvocation;
|
||||
|
||||
import org.aopalliance.intercept.MethodInvocation;
|
||||
|
||||
@@ -13,23 +13,23 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.acegisecurity.afterinvocation;
|
||||
package org.springframework.security.afterinvocation;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import org.acegisecurity.AuthorizationServiceException;
|
||||
import org.acegisecurity.ConfigAttributeDefinition;
|
||||
import org.acegisecurity.MockAclManager;
|
||||
import org.acegisecurity.SecurityConfig;
|
||||
import org.springframework.security.AuthorizationServiceException;
|
||||
import org.springframework.security.ConfigAttributeDefinition;
|
||||
import org.springframework.security.MockAclManager;
|
||||
import org.springframework.security.SecurityConfig;
|
||||
|
||||
import org.acegisecurity.acl.AclEntry;
|
||||
import org.acegisecurity.acl.AclManager;
|
||||
import org.acegisecurity.acl.basic.MockAclObjectIdentity;
|
||||
import org.acegisecurity.acl.basic.SimpleAclEntry;
|
||||
import org.springframework.security.acl.AclEntry;
|
||||
import org.springframework.security.acl.AclManager;
|
||||
import org.springframework.security.acl.basic.MockAclObjectIdentity;
|
||||
import org.springframework.security.acl.basic.SimpleAclEntry;
|
||||
|
||||
import org.acegisecurity.providers.UsernamePasswordAuthenticationToken;
|
||||
import org.springframework.security.providers.UsernamePasswordAuthenticationToken;
|
||||
|
||||
import org.acegisecurity.util.SimpleMethodInvocation;
|
||||
import org.springframework.security.util.SimpleMethodInvocation;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Vector;
|
||||
@@ -13,23 +13,23 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.acegisecurity.afterinvocation;
|
||||
package org.springframework.security.afterinvocation;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import org.acegisecurity.AccessDeniedException;
|
||||
import org.acegisecurity.ConfigAttributeDefinition;
|
||||
import org.acegisecurity.MockAclManager;
|
||||
import org.acegisecurity.SecurityConfig;
|
||||
import org.springframework.security.AccessDeniedException;
|
||||
import org.springframework.security.ConfigAttributeDefinition;
|
||||
import org.springframework.security.MockAclManager;
|
||||
import org.springframework.security.SecurityConfig;
|
||||
|
||||
import org.acegisecurity.acl.AclEntry;
|
||||
import org.acegisecurity.acl.AclManager;
|
||||
import org.acegisecurity.acl.basic.MockAclObjectIdentity;
|
||||
import org.acegisecurity.acl.basic.SimpleAclEntry;
|
||||
import org.springframework.security.acl.AclEntry;
|
||||
import org.springframework.security.acl.AclManager;
|
||||
import org.springframework.security.acl.basic.MockAclObjectIdentity;
|
||||
import org.springframework.security.acl.basic.SimpleAclEntry;
|
||||
|
||||
import org.acegisecurity.providers.UsernamePasswordAuthenticationToken;
|
||||
import org.springframework.security.providers.UsernamePasswordAuthenticationToken;
|
||||
|
||||
import org.acegisecurity.util.SimpleMethodInvocation;
|
||||
import org.springframework.security.util.SimpleMethodInvocation;
|
||||
|
||||
|
||||
/**
|
||||
@@ -13,7 +13,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.acegisecurity.captcha;
|
||||
package org.springframework.security.captcha;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
@@ -13,11 +13,11 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.acegisecurity.captcha;
|
||||
package org.springframework.security.captcha;
|
||||
|
||||
import junit.framework.*;
|
||||
|
||||
import org.acegisecurity.captcha.AlwaysTestAfterTimeInMillisCaptchaChannelProcessor;
|
||||
import org.springframework.security.captcha.AlwaysTestAfterTimeInMillisCaptchaChannelProcessor;
|
||||
|
||||
|
||||
/**
|
||||
@@ -53,7 +53,7 @@ public class AlwaysTestAfterTimeInMillisCaptchaChannelProcessorTests extends Tes
|
||||
}
|
||||
/* Commented out as it makes assumptions about the speed of the build server and fails intermittently on
|
||||
build.springframework.org - L.T.
|
||||
|
||||
|
||||
public void testIsContextValidConcerningHumanity()
|
||||
throws Exception {
|
||||
CaptchaSecurityContext context = new CaptchaSecurityContextImpl();
|
||||
@@ -13,7 +13,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.acegisecurity.captcha;
|
||||
package org.springframework.security.captcha;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
@@ -13,17 +13,17 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.acegisecurity.captcha;
|
||||
package org.springframework.security.captcha;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import org.acegisecurity.ConfigAttributeDefinition;
|
||||
import org.acegisecurity.MockFilterChain;
|
||||
import org.acegisecurity.SecurityConfig;
|
||||
import org.springframework.security.ConfigAttributeDefinition;
|
||||
import org.springframework.security.MockFilterChain;
|
||||
import org.springframework.security.SecurityConfig;
|
||||
|
||||
import org.acegisecurity.context.SecurityContextHolder;
|
||||
import org.springframework.security.context.SecurityContextHolder;
|
||||
|
||||
import org.acegisecurity.intercept.web.FilterInvocation;
|
||||
import org.springframework.security.intercept.web.FilterInvocation;
|
||||
|
||||
import org.springframework.mock.web.MockHttpServletRequest;
|
||||
import org.springframework.mock.web.MockHttpServletResponse;
|
||||
@@ -34,7 +34,7 @@ import javax.servlet.ServletException;
|
||||
|
||||
|
||||
/**
|
||||
* Tests {@link org.acegisecurity.captcha.CaptchaChannelProcessorTemplate}
|
||||
* Tests {@link org.springframework.security.captcha.CaptchaChannelProcessorTemplate}
|
||||
*
|
||||
* @author marc antoine Garrigue
|
||||
* @version $Id$
|
||||
@@ -13,13 +13,13 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.acegisecurity.captcha;
|
||||
package org.springframework.security.captcha;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import org.acegisecurity.MockPortResolver;
|
||||
import org.springframework.security.MockPortResolver;
|
||||
|
||||
import org.acegisecurity.util.PortMapperImpl;
|
||||
import org.springframework.security.util.PortMapperImpl;
|
||||
|
||||
import org.springframework.mock.web.MockHttpServletRequest;
|
||||
import org.springframework.mock.web.MockHttpServletResponse;
|
||||
@@ -13,9 +13,9 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.acegisecurity.captcha;
|
||||
package org.springframework.security.captcha;
|
||||
|
||||
import org.acegisecurity.context.SecurityContextImplTests;
|
||||
import org.springframework.security.context.SecurityContextImplTests;
|
||||
|
||||
|
||||
/**
|
||||
@@ -13,13 +13,13 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.acegisecurity.captcha;
|
||||
package org.springframework.security.captcha;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import org.acegisecurity.context.SecurityContextHolder;
|
||||
import org.springframework.security.context.SecurityContextHolder;
|
||||
|
||||
import org.acegisecurity.util.MockFilterChain;
|
||||
import org.springframework.security.util.MockFilterChain;
|
||||
|
||||
import org.springframework.mock.web.MockHttpServletRequest;
|
||||
|
||||
@@ -61,7 +61,7 @@ public class CaptchaValidationProcessingFilterTests extends TestCase {
|
||||
|
||||
/*
|
||||
* Test method for
|
||||
* 'org.acegisecurity.captcha.CaptchaValidationProcessingFilter.doFilter(ServletRequest,
|
||||
* 'org.springframework.security.captcha.CaptchaValidationProcessingFilter.doFilter(ServletRequest,
|
||||
* ServletResponse, FilterChain)'
|
||||
*/
|
||||
public void testDoFilterWithRequestParameter() throws Exception {
|
||||
@@ -89,7 +89,7 @@ public class CaptchaValidationProcessingFilterTests extends TestCase {
|
||||
|
||||
/*
|
||||
* Test method for
|
||||
* 'org.acegisecurity.captcha.CaptchaValidationProcessingFilter.doFilter(ServletRequest,
|
||||
* 'org.springframework.security.captcha.CaptchaValidationProcessingFilter.doFilter(ServletRequest,
|
||||
* ServletResponse, FilterChain)'
|
||||
*/
|
||||
public void testDoFilterWithoutRequestParameter() throws Exception {
|
||||
@@ -13,7 +13,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.acegisecurity.captcha;
|
||||
package org.springframework.security.captcha;
|
||||
|
||||
/**
|
||||
* DOCUMENT ME!
|
||||
@@ -13,11 +13,11 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.acegisecurity.captcha;
|
||||
package org.springframework.security.captcha;
|
||||
|
||||
import junit.framework.*;
|
||||
|
||||
import org.acegisecurity.captcha.TestOnceAfterMaxRequestsCaptchaChannelProcessor;
|
||||
import org.springframework.security.captcha.TestOnceAfterMaxRequestsCaptchaChannelProcessor;
|
||||
|
||||
|
||||
/**
|
||||
@@ -13,15 +13,15 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.acegisecurity.concurrent;
|
||||
package org.springframework.security.concurrent;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import org.acegisecurity.Authentication;
|
||||
import org.springframework.security.Authentication;
|
||||
|
||||
import org.acegisecurity.providers.UsernamePasswordAuthenticationToken;
|
||||
import org.springframework.security.providers.UsernamePasswordAuthenticationToken;
|
||||
|
||||
import org.acegisecurity.ui.WebAuthenticationDetails;
|
||||
import org.springframework.security.ui.WebAuthenticationDetails;
|
||||
|
||||
import org.springframework.mock.web.MockHttpServletRequest;
|
||||
import org.springframework.mock.web.MockHttpSession;
|
||||
@@ -13,7 +13,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.acegisecurity.concurrent;
|
||||
package org.springframework.security.concurrent;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
import org.springframework.mock.web.MockFilterConfig;
|
||||
@@ -13,7 +13,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.acegisecurity.concurrent;
|
||||
package org.springframework.security.concurrent;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.acegisecurity.concurrent;
|
||||
package org.springframework.security.concurrent;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
@@ -13,11 +13,11 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.acegisecurity.concurrent;
|
||||
package org.springframework.security.concurrent;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import org.acegisecurity.ui.session.HttpSessionDestroyedEvent;
|
||||
import org.springframework.security.ui.session.HttpSessionDestroyedEvent;
|
||||
|
||||
import org.springframework.mock.web.MockHttpSession;
|
||||
|
||||
@@ -13,17 +13,16 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.acegisecurity.context;
|
||||
package org.springframework.security.context;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import org.acegisecurity.Authentication;
|
||||
import org.acegisecurity.GrantedAuthority;
|
||||
import org.acegisecurity.GrantedAuthorityImpl;
|
||||
import org.acegisecurity.MockFilterConfig;
|
||||
import org.springframework.security.Authentication;
|
||||
import org.springframework.security.GrantedAuthority;
|
||||
import org.springframework.security.GrantedAuthorityImpl;
|
||||
import org.springframework.security.MockFilterConfig;
|
||||
|
||||
import org.acegisecurity.adapters.PrincipalAcegiUserToken;
|
||||
import org.jmock.Mock;
|
||||
import org.springframework.security.adapters.PrincipalAcegiUserToken;
|
||||
|
||||
import org.springframework.mock.web.MockHttpServletRequest;
|
||||
import org.springframework.mock.web.MockHttpServletResponse;
|
||||
@@ -13,12 +13,12 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.acegisecurity.context;
|
||||
package org.springframework.security.context;
|
||||
|
||||
import junit.framework.ComparisonFailure;
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import org.acegisecurity.providers.UsernamePasswordAuthenticationToken;
|
||||
import org.springframework.security.providers.UsernamePasswordAuthenticationToken;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
@@ -244,7 +244,7 @@ public class SecurityContextHolderTests extends TestCase {
|
||||
public void testSynchronizationCustomStrategyLoading() {
|
||||
SecurityContextHolder.setStrategyName(InheritableThreadLocalSecurityContextHolderStrategy.class.getName());
|
||||
assertTrue(new SecurityContextHolder().toString()
|
||||
.lastIndexOf("SecurityContextHolder[strategy='org.acegisecurity.context.InheritableThreadLocalSecurityContextHolderStrategy'") != -1);
|
||||
.lastIndexOf("SecurityContextHolder[strategy='org.springframework.security.context.InheritableThreadLocalSecurityContextHolderStrategy'") != -1);
|
||||
loadStartAndWaitForThreads(true, "Main_", NUM_THREADS, false, true);
|
||||
assertEquals("Thread errors detected; review log output for details", 0, errors);
|
||||
}
|
||||
@@ -13,13 +13,13 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.acegisecurity.context;
|
||||
package org.springframework.security.context;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import org.acegisecurity.Authentication;
|
||||
import org.springframework.security.Authentication;
|
||||
|
||||
import org.acegisecurity.providers.UsernamePasswordAuthenticationToken;
|
||||
import org.springframework.security.providers.UsernamePasswordAuthenticationToken;
|
||||
|
||||
|
||||
/**
|
||||
@@ -13,16 +13,16 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.acegisecurity.context.httpinvoker;
|
||||
package org.springframework.security.context.httpinvoker;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import org.acegisecurity.Authentication;
|
||||
import org.springframework.security.Authentication;
|
||||
|
||||
import org.acegisecurity.context.SecurityContextHolder;
|
||||
import org.acegisecurity.context.httpinvoker.AuthenticationSimpleHttpInvokerRequestExecutor;
|
||||
import org.springframework.security.context.SecurityContextHolder;
|
||||
import org.springframework.security.context.httpinvoker.AuthenticationSimpleHttpInvokerRequestExecutor;
|
||||
|
||||
import org.acegisecurity.providers.UsernamePasswordAuthenticationToken;
|
||||
import org.springframework.security.providers.UsernamePasswordAuthenticationToken;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
@@ -13,18 +13,18 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.acegisecurity.context.rmi;
|
||||
package org.springframework.security.context.rmi;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import org.acegisecurity.Authentication;
|
||||
import org.acegisecurity.TargetObject;
|
||||
import org.springframework.security.Authentication;
|
||||
import org.springframework.security.TargetObject;
|
||||
|
||||
import org.acegisecurity.context.SecurityContextHolder;
|
||||
import org.springframework.security.context.SecurityContextHolder;
|
||||
|
||||
import org.acegisecurity.providers.UsernamePasswordAuthenticationToken;
|
||||
import org.springframework.security.providers.UsernamePasswordAuthenticationToken;
|
||||
|
||||
import org.acegisecurity.util.SimpleMethodInvocation;
|
||||
import org.springframework.security.util.SimpleMethodInvocation;
|
||||
|
||||
import org.aopalliance.intercept.MethodInvocation;
|
||||
|
||||
@@ -100,7 +100,7 @@ public class ContextPropagatingRemoteInvocationTests extends TestCase {
|
||||
|
||||
// The result from invoking the TargetObject should contain the
|
||||
// Authentication class delivered via the SecurityContextHolder
|
||||
assertEquals("some_string org.acegisecurity.providers.UsernamePasswordAuthenticationToken false",
|
||||
assertEquals("some_string org.springframework.security.providers.UsernamePasswordAuthenticationToken false",
|
||||
remoteInvocation.invoke(new TargetObject()));
|
||||
}
|
||||
|
||||
@@ -13,15 +13,15 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.acegisecurity.event.authentication;
|
||||
package org.springframework.security.event.authentication;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import org.acegisecurity.Authentication;
|
||||
import org.acegisecurity.AuthenticationException;
|
||||
import org.acegisecurity.DisabledException;
|
||||
import org.springframework.security.Authentication;
|
||||
import org.springframework.security.AuthenticationException;
|
||||
import org.springframework.security.DisabledException;
|
||||
|
||||
import org.acegisecurity.providers.UsernamePasswordAuthenticationToken;
|
||||
import org.springframework.security.providers.UsernamePasswordAuthenticationToken;
|
||||
|
||||
|
||||
/**
|
||||
@@ -13,14 +13,14 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.acegisecurity.event.authentication;
|
||||
package org.springframework.security.event.authentication;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import org.acegisecurity.Authentication;
|
||||
import org.acegisecurity.LockedException;
|
||||
import org.springframework.security.Authentication;
|
||||
import org.springframework.security.LockedException;
|
||||
|
||||
import org.acegisecurity.providers.UsernamePasswordAuthenticationToken;
|
||||
import org.springframework.security.providers.UsernamePasswordAuthenticationToken;
|
||||
|
||||
|
||||
/**
|
||||
@@ -13,14 +13,14 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.acegisecurity.event.authorization;
|
||||
package org.springframework.security.event.authorization;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import org.acegisecurity.AuthenticationCredentialsNotFoundException;
|
||||
import org.acegisecurity.ConfigAttributeDefinition;
|
||||
import org.springframework.security.AuthenticationCredentialsNotFoundException;
|
||||
import org.springframework.security.ConfigAttributeDefinition;
|
||||
|
||||
import org.acegisecurity.util.SimpleMethodInvocation;
|
||||
import org.springframework.security.util.SimpleMethodInvocation;
|
||||
|
||||
|
||||
/**
|
||||
@@ -13,18 +13,18 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.acegisecurity.event.authorization;
|
||||
package org.springframework.security.event.authorization;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import org.acegisecurity.AccessDeniedException;
|
||||
import org.acegisecurity.ConfigAttributeDefinition;
|
||||
import org.springframework.security.AccessDeniedException;
|
||||
import org.springframework.security.ConfigAttributeDefinition;
|
||||
|
||||
import org.acegisecurity.event.authorization.AuthorizationFailureEvent;
|
||||
import org.springframework.security.event.authorization.AuthorizationFailureEvent;
|
||||
|
||||
import org.acegisecurity.providers.UsernamePasswordAuthenticationToken;
|
||||
import org.springframework.security.providers.UsernamePasswordAuthenticationToken;
|
||||
|
||||
import org.acegisecurity.util.SimpleMethodInvocation;
|
||||
import org.springframework.security.util.SimpleMethodInvocation;
|
||||
|
||||
|
||||
/**
|
||||
@@ -13,15 +13,15 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.acegisecurity.event.authorization;
|
||||
package org.springframework.security.event.authorization;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import org.acegisecurity.ConfigAttributeDefinition;
|
||||
import org.springframework.security.ConfigAttributeDefinition;
|
||||
|
||||
import org.acegisecurity.providers.UsernamePasswordAuthenticationToken;
|
||||
import org.springframework.security.providers.UsernamePasswordAuthenticationToken;
|
||||
|
||||
import org.acegisecurity.util.SimpleMethodInvocation;
|
||||
import org.springframework.security.util.SimpleMethodInvocation;
|
||||
|
||||
|
||||
/**
|
||||
@@ -13,18 +13,18 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.acegisecurity.intercept;
|
||||
package org.springframework.security.intercept;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import org.acegisecurity.MockAccessDecisionManager;
|
||||
import org.acegisecurity.MockAfterInvocationManager;
|
||||
import org.acegisecurity.MockAuthenticationManager;
|
||||
import org.acegisecurity.MockRunAsManager;
|
||||
import org.springframework.security.MockAccessDecisionManager;
|
||||
import org.springframework.security.MockAfterInvocationManager;
|
||||
import org.springframework.security.MockAuthenticationManager;
|
||||
import org.springframework.security.MockRunAsManager;
|
||||
|
||||
import org.acegisecurity.intercept.method.MockMethodDefinitionSource;
|
||||
import org.springframework.security.intercept.method.MockMethodDefinitionSource;
|
||||
|
||||
import org.acegisecurity.util.SimpleMethodInvocation;
|
||||
import org.springframework.security.util.SimpleMethodInvocation;
|
||||
|
||||
|
||||
/**
|
||||
@@ -13,16 +13,16 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.acegisecurity.intercept;
|
||||
package org.springframework.security.intercept;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import org.acegisecurity.ConfigAttributeDefinition;
|
||||
import org.acegisecurity.SecurityConfig;
|
||||
import org.springframework.security.ConfigAttributeDefinition;
|
||||
import org.springframework.security.SecurityConfig;
|
||||
|
||||
import org.acegisecurity.providers.UsernamePasswordAuthenticationToken;
|
||||
import org.springframework.security.providers.UsernamePasswordAuthenticationToken;
|
||||
|
||||
import org.acegisecurity.util.SimpleMethodInvocation;
|
||||
import org.springframework.security.util.SimpleMethodInvocation;
|
||||
|
||||
import org.aopalliance.intercept.MethodInvocation;
|
||||
|
||||
@@ -13,11 +13,11 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.acegisecurity.intercept.method;
|
||||
package org.springframework.security.intercept.method;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import org.acegisecurity.util.SimpleMethodInvocation;
|
||||
import org.springframework.security.util.SimpleMethodInvocation;
|
||||
|
||||
import org.aopalliance.intercept.MethodInvocation;
|
||||
|
||||
@@ -13,26 +13,26 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.acegisecurity.intercept.method;
|
||||
package org.springframework.security.intercept.method;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import org.acegisecurity.ConfigAttribute;
|
||||
import org.acegisecurity.ConfigAttributeDefinition;
|
||||
import org.acegisecurity.GrantedAuthority;
|
||||
import org.acegisecurity.GrantedAuthorityImpl;
|
||||
import org.acegisecurity.ITargetObject;
|
||||
import org.acegisecurity.OtherTargetObject;
|
||||
import org.acegisecurity.SecurityConfig;
|
||||
import org.acegisecurity.TargetObject;
|
||||
import org.springframework.security.ConfigAttribute;
|
||||
import org.springframework.security.ConfigAttributeDefinition;
|
||||
import org.springframework.security.GrantedAuthority;
|
||||
import org.springframework.security.GrantedAuthorityImpl;
|
||||
import org.springframework.security.ITargetObject;
|
||||
import org.springframework.security.OtherTargetObject;
|
||||
import org.springframework.security.SecurityConfig;
|
||||
import org.springframework.security.TargetObject;
|
||||
|
||||
import org.acegisecurity.acl.basic.SomeDomain;
|
||||
import org.springframework.security.acl.basic.SomeDomain;
|
||||
|
||||
import org.acegisecurity.context.SecurityContextHolder;
|
||||
import org.springframework.security.context.SecurityContextHolder;
|
||||
|
||||
import org.acegisecurity.providers.UsernamePasswordAuthenticationToken;
|
||||
import org.springframework.security.providers.UsernamePasswordAuthenticationToken;
|
||||
|
||||
import org.acegisecurity.util.SimpleMethodInvocation;
|
||||
import org.springframework.security.util.SimpleMethodInvocation;
|
||||
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.context.support.ClassPathXmlApplicationContext;
|
||||
@@ -87,7 +87,7 @@ public class MethodDefinitionAttributesTests extends TestCase {
|
||||
|
||||
private ITargetObject makeInterceptedTarget() {
|
||||
ApplicationContext context = new ClassPathXmlApplicationContext(
|
||||
"org/acegisecurity/intercept/method/applicationContext.xml");
|
||||
"org/springframework/security/intercept/method/applicationContext.xml");
|
||||
|
||||
return (ITargetObject) context.getBean("target");
|
||||
}
|
||||
@@ -187,7 +187,7 @@ public class MethodDefinitionAttributesTests extends TestCase {
|
||||
|
||||
ITargetObject target = makeInterceptedTarget();
|
||||
String result = target.makeUpperCase("hello");
|
||||
assertEquals("HELLO org.acegisecurity.MockRunAsAuthenticationToken true", result);
|
||||
assertEquals("HELLO org.springframework.security.MockRunAsAuthenticationToken true", result);
|
||||
}
|
||||
|
||||
public void testMethodCallWithoutRunAsReplacement()
|
||||
@@ -199,7 +199,7 @@ public class MethodDefinitionAttributesTests extends TestCase {
|
||||
ITargetObject target = makeInterceptedTarget();
|
||||
String result = target.makeLowerCase("HELLO");
|
||||
|
||||
assertEquals("hello org.acegisecurity.providers.UsernamePasswordAuthenticationToken true", result);
|
||||
assertEquals("hello org.springframework.security.providers.UsernamePasswordAuthenticationToken true", result);
|
||||
}
|
||||
|
||||
public void testNullReturnedIfZeroAttributesDefinedForMethodInvocation()
|
||||
@@ -13,14 +13,14 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.acegisecurity.intercept.method;
|
||||
package org.springframework.security.intercept.method;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import org.acegisecurity.ConfigAttributeDefinition;
|
||||
import org.acegisecurity.MockJoinPoint;
|
||||
import org.acegisecurity.SecurityConfig;
|
||||
import org.acegisecurity.TargetObject;
|
||||
import org.springframework.security.ConfigAttributeDefinition;
|
||||
import org.springframework.security.MockJoinPoint;
|
||||
import org.springframework.security.SecurityConfig;
|
||||
import org.springframework.security.TargetObject;
|
||||
|
||||
import org.aopalliance.intercept.MethodInvocation;
|
||||
|
||||
@@ -40,7 +40,6 @@ public class MethodDefinitionSourceEditorTests extends TestCase {
|
||||
//~ Constructors ===================================================================================================
|
||||
|
||||
public MethodDefinitionSourceEditorTests() {
|
||||
super();
|
||||
}
|
||||
|
||||
public MethodDefinitionSourceEditorTests(String arg0) {
|
||||
@@ -49,17 +48,13 @@ public class MethodDefinitionSourceEditorTests extends TestCase {
|
||||
|
||||
//~ Methods ========================================================================================================
|
||||
|
||||
public static void main(String[] args) {
|
||||
junit.textui.TestRunner.run(MethodDefinitionSourceEditorTests.class);
|
||||
}
|
||||
|
||||
public final void setUp() throws Exception {
|
||||
super.setUp();
|
||||
}
|
||||
|
||||
public void testAspectJJointPointLookup() throws Exception {
|
||||
MethodDefinitionSourceEditor editor = new MethodDefinitionSourceEditor();
|
||||
editor.setAsText("org.acegisecurity.TargetObject.countLength=ROLE_ONE,ROLE_TWO,RUN_AS_ENTRY");
|
||||
editor.setAsText("org.springframework.security.TargetObject.countLength=ROLE_ONE,ROLE_TWO,RUN_AS_ENTRY");
|
||||
|
||||
MethodDefinitionMap map = (MethodDefinitionMap) editor.getValue();
|
||||
|
||||
@@ -80,7 +75,7 @@ public class MethodDefinitionSourceEditorTests extends TestCase {
|
||||
MethodDefinitionSourceEditor editor = new MethodDefinitionSourceEditor();
|
||||
|
||||
try {
|
||||
editor.setAsText("org.acegisecurity.DOES_NOT_EXIST_NAME=FOO,BAR");
|
||||
editor.setAsText("org.springframework.security.DOES_NOT_EXIST_NAME=FOO,BAR");
|
||||
fail("Should have given IllegalArgumentException");
|
||||
} catch (IllegalArgumentException expected) {
|
||||
assertTrue(true);
|
||||
@@ -102,7 +97,7 @@ public class MethodDefinitionSourceEditorTests extends TestCase {
|
||||
MethodDefinitionSourceEditor editor = new MethodDefinitionSourceEditor();
|
||||
|
||||
try {
|
||||
editor.setAsText("org.acegisecurity.TargetObject.INVALID_METHOD=FOO,BAR");
|
||||
editor.setAsText("org.springframework.security.TargetObject.INVALID_METHOD=FOO,BAR");
|
||||
fail("Should have given IllegalArgumentException");
|
||||
} catch (IllegalArgumentException expected) {
|
||||
assertTrue(true);
|
||||
@@ -113,7 +108,7 @@ public class MethodDefinitionSourceEditorTests extends TestCase {
|
||||
throws Exception {
|
||||
MethodDefinitionSourceEditor editor = new MethodDefinitionSourceEditor();
|
||||
editor.setAsText(
|
||||
"org.acegisecurity.ITargetObject.makeLower*=ROLE_FROM_INTERFACE\r\norg.acegisecurity.ITargetObject.makeUpper*=ROLE_FROM_INTERFACE\r\norg.acegisecurity.TargetObject.makeUpper*=ROLE_FROM_IMPLEMENTATION");
|
||||
"org.springframework.security.ITargetObject.makeLower*=ROLE_FROM_INTERFACE\r\norg.springframework.security.ITargetObject.makeUpper*=ROLE_FROM_INTERFACE\r\norg.springframework.security.TargetObject.makeUpper*=ROLE_FROM_IMPLEMENTATION");
|
||||
|
||||
MethodDefinitionMap map = (MethodDefinitionMap) editor.getValue();
|
||||
assertEquals(3, map.getMethodMapSize());
|
||||
@@ -143,7 +138,7 @@ public class MethodDefinitionSourceEditorTests extends TestCase {
|
||||
public void testIterator() {
|
||||
MethodDefinitionSourceEditor editor = new MethodDefinitionSourceEditor();
|
||||
editor.setAsText(
|
||||
"org.acegisecurity.TargetObject.countLength=ROLE_ONE,ROLE_TWO,RUN_AS_ENTRY\r\norg.acegisecurity.TargetObject.make*=ROLE_NINE,ROLE_SUPERVISOR");
|
||||
"org.springframework.security.TargetObject.countLength=ROLE_ONE,ROLE_TWO,RUN_AS_ENTRY\r\norg.springframework.security.TargetObject.make*=ROLE_NINE,ROLE_SUPERVISOR");
|
||||
|
||||
MethodDefinitionMap map = (MethodDefinitionMap) editor.getValue();
|
||||
Iterator iter = map.getConfigAttributeDefinitions();
|
||||
@@ -160,17 +155,16 @@ public class MethodDefinitionSourceEditorTests extends TestCase {
|
||||
public void testMultiMethodParsing() {
|
||||
MethodDefinitionSourceEditor editor = new MethodDefinitionSourceEditor();
|
||||
editor.setAsText(
|
||||
"org.acegisecurity.TargetObject.countLength=ROLE_ONE,ROLE_TWO,RUN_AS_ENTRY\r\norg.acegisecurity.TargetObject.make*=ROLE_NINE,ROLE_SUPERVISOR");
|
||||
"org.springframework.security.TargetObject.countLength=ROLE_ONE,ROLE_TWO,RUN_AS_ENTRY\r\norg.springframework.security.TargetObject.make*=ROLE_NINE,ROLE_SUPERVISOR");
|
||||
|
||||
MethodDefinitionMap map = (MethodDefinitionMap) editor.getValue();
|
||||
assertEquals(3, map.getMethodMapSize());
|
||||
}
|
||||
|
||||
public void testMultiMethodParsingWhereLaterMethodsOverrideEarlierMethods()
|
||||
throws Exception {
|
||||
public void testMultiMethodParsingWhereLaterMethodsOverrideEarlierMethods() throws Exception {
|
||||
MethodDefinitionSourceEditor editor = new MethodDefinitionSourceEditor();
|
||||
editor.setAsText(
|
||||
"org.acegisecurity.TargetObject.*=ROLE_GENERAL\r\norg.acegisecurity.TargetObject.makeLower*=ROLE_LOWER\r\norg.acegisecurity.TargetObject.make*=ROLE_MAKE\r\norg.acegisecurity.TargetObject.makeUpper*=ROLE_UPPER");
|
||||
"org.springframework.security.TargetObject.*=ROLE_GENERAL\r\norg.springframework.security.TargetObject.makeLower*=ROLE_LOWER\r\norg.springframework.security.TargetObject.make*=ROLE_MAKE\r\norg.springframework.security.TargetObject.makeUpper*=ROLE_UPPER");
|
||||
|
||||
MethodDefinitionMap map = (MethodDefinitionMap) editor.getValue();
|
||||
assertEquals(5, map.getMethodMapSize());
|
||||
@@ -194,10 +188,9 @@ public class MethodDefinitionSourceEditorTests extends TestCase {
|
||||
assertEquals(expectedCountLength, returnedCountLength);
|
||||
}
|
||||
|
||||
public void testNullIsReturnedByMethodDefinitionSourceWhenMethodInvocationNotDefined()
|
||||
throws Exception {
|
||||
public void testNullIsReturnedByMethodDefinitionSourceWhenMethodInvocationNotDefined() throws Exception {
|
||||
MethodDefinitionSourceEditor editor = new MethodDefinitionSourceEditor();
|
||||
editor.setAsText("org.acegisecurity.TargetObject.countLength=ROLE_ONE,ROLE_TWO,RUN_AS_ENTRY");
|
||||
editor.setAsText("org.springframework.security.TargetObject.countLength=ROLE_ONE,ROLE_TWO,RUN_AS_ENTRY");
|
||||
|
||||
MethodDefinitionMap map = (MethodDefinitionMap) editor.getValue();
|
||||
|
||||
@@ -216,7 +209,7 @@ public class MethodDefinitionSourceEditorTests extends TestCase {
|
||||
|
||||
public void testSingleMethodParsing() throws Exception {
|
||||
MethodDefinitionSourceEditor editor = new MethodDefinitionSourceEditor();
|
||||
editor.setAsText("org.acegisecurity.TargetObject.countLength=ROLE_ONE,ROLE_TWO,RUN_AS_ENTRY");
|
||||
editor.setAsText("org.springframework.security.TargetObject.countLength=ROLE_ONE,ROLE_TWO,RUN_AS_ENTRY");
|
||||
|
||||
MethodDefinitionMap map = (MethodDefinitionMap) editor.getValue();
|
||||
|
||||
@@ -234,10 +227,6 @@ public class MethodDefinitionSourceEditorTests extends TestCase {
|
||||
private class MockMethodInvocation implements MethodInvocation {
|
||||
Method method;
|
||||
|
||||
private MockMethodInvocation() {
|
||||
super();
|
||||
}
|
||||
|
||||
public MockMethodInvocation(Class clazz, String methodName, Class[] parameterTypes)
|
||||
throws NoSuchMethodException {
|
||||
method = clazz.getMethod(methodName, parameterTypes);
|
||||
@@ -13,19 +13,19 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.acegisecurity.intercept.method;
|
||||
package org.springframework.security.intercept.method;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import org.acegisecurity.GrantedAuthority;
|
||||
import org.acegisecurity.GrantedAuthorityImpl;
|
||||
import org.acegisecurity.ITargetObject;
|
||||
import org.springframework.security.GrantedAuthority;
|
||||
import org.springframework.security.GrantedAuthorityImpl;
|
||||
import org.springframework.security.ITargetObject;
|
||||
|
||||
import org.acegisecurity.intercept.method.aopalliance.MethodSecurityInterceptor;
|
||||
import org.springframework.security.intercept.method.aopalliance.MethodSecurityInterceptor;
|
||||
|
||||
import org.acegisecurity.providers.UsernamePasswordAuthenticationToken;
|
||||
import org.springframework.security.providers.UsernamePasswordAuthenticationToken;
|
||||
|
||||
import org.acegisecurity.util.MethodInvocationUtils;
|
||||
import org.springframework.security.util.MethodInvocationUtils;
|
||||
|
||||
import org.aopalliance.intercept.MethodInvocation;
|
||||
|
||||
@@ -34,7 +34,7 @@ import org.springframework.context.support.ClassPathXmlApplicationContext;
|
||||
|
||||
|
||||
/**
|
||||
* Tests {@link org.acegisecurity.intercept.method.MethodInvocationPrivilegeEvaluator}.
|
||||
* Tests {@link org.springframework.security.intercept.method.MethodInvocationPrivilegeEvaluator}.
|
||||
*
|
||||
* @author Ben Alex
|
||||
* @version $Id$
|
||||
@@ -54,7 +54,7 @@ public class MethodInvocationPrivilegeEvaluatorTests extends TestCase {
|
||||
|
||||
private Object lookupTargetObject() {
|
||||
ApplicationContext context = new ClassPathXmlApplicationContext(
|
||||
"org/acegisecurity/intercept/method/aopalliance/applicationContext.xml");
|
||||
"org/springframework/security/intercept/method/aopalliance/applicationContext.xml");
|
||||
|
||||
return context.getBean("target");
|
||||
}
|
||||
@@ -65,7 +65,7 @@ public class MethodInvocationPrivilegeEvaluatorTests extends TestCase {
|
||||
|
||||
private MethodSecurityInterceptor makeSecurityInterceptor() {
|
||||
ApplicationContext context = new ClassPathXmlApplicationContext(
|
||||
"org/acegisecurity/intercept/method/aopalliance/applicationContext.xml");
|
||||
"org/springframework/security/intercept/method/aopalliance/applicationContext.xml");
|
||||
|
||||
return (MethodSecurityInterceptor) context.getBean("securityInterceptor");
|
||||
}
|
||||
@@ -13,12 +13,12 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.acegisecurity.intercept.method;
|
||||
package org.springframework.security.intercept.method;
|
||||
|
||||
import org.acegisecurity.ITargetObject;
|
||||
import org.acegisecurity.OtherTargetObject;
|
||||
import org.acegisecurity.SecurityConfig;
|
||||
import org.acegisecurity.TargetObject;
|
||||
import org.springframework.security.ITargetObject;
|
||||
import org.springframework.security.OtherTargetObject;
|
||||
import org.springframework.security.SecurityConfig;
|
||||
import org.springframework.security.TargetObject;
|
||||
|
||||
import org.springframework.metadata.Attributes;
|
||||
|
||||
@@ -13,10 +13,10 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.acegisecurity.intercept.method;
|
||||
package org.springframework.security.intercept.method;
|
||||
|
||||
import org.acegisecurity.ConfigAttributeDefinition;
|
||||
import org.acegisecurity.SecurityConfig;
|
||||
import org.springframework.security.ConfigAttributeDefinition;
|
||||
import org.springframework.security.SecurityConfig;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
|
||||
@@ -13,14 +13,14 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.acegisecurity.intercept.method.aopalliance;
|
||||
package org.springframework.security.intercept.method.aopalliance;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import org.acegisecurity.TargetObject;
|
||||
import org.springframework.security.TargetObject;
|
||||
|
||||
import org.acegisecurity.intercept.method.MethodDefinitionMap;
|
||||
import org.acegisecurity.intercept.method.MethodDefinitionSourceEditor;
|
||||
import org.springframework.security.intercept.method.MethodDefinitionMap;
|
||||
import org.springframework.security.intercept.method.MethodDefinitionSourceEditor;
|
||||
|
||||
import org.springframework.aop.framework.AopConfigException;
|
||||
|
||||
@@ -48,7 +48,7 @@ public class MethodDefinitionSourceAdvisorTests extends TestCase {
|
||||
|
||||
private MethodSecurityInterceptor getInterceptor() {
|
||||
MethodDefinitionSourceEditor editor = new MethodDefinitionSourceEditor();
|
||||
editor.setAsText("org.acegisecurity.TargetObject.countLength=ROLE_NOT_USED");
|
||||
editor.setAsText("org.springframework.security.TargetObject.countLength=ROLE_NOT_USED");
|
||||
|
||||
MethodDefinitionMap map = (MethodDefinitionMap) editor.getValue();
|
||||
|
||||
@@ -13,35 +13,35 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.acegisecurity.intercept.method.aopalliance;
|
||||
package org.springframework.security.intercept.method.aopalliance;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import org.acegisecurity.AccessDecisionManager;
|
||||
import org.acegisecurity.AccessDeniedException;
|
||||
import org.acegisecurity.AfterInvocationManager;
|
||||
import org.acegisecurity.Authentication;
|
||||
import org.acegisecurity.AuthenticationCredentialsNotFoundException;
|
||||
import org.acegisecurity.AuthenticationException;
|
||||
import org.acegisecurity.ConfigAttribute;
|
||||
import org.acegisecurity.ConfigAttributeDefinition;
|
||||
import org.acegisecurity.GrantedAuthority;
|
||||
import org.acegisecurity.GrantedAuthorityImpl;
|
||||
import org.acegisecurity.ITargetObject;
|
||||
import org.acegisecurity.MockAccessDecisionManager;
|
||||
import org.acegisecurity.MockAfterInvocationManager;
|
||||
import org.acegisecurity.MockAuthenticationManager;
|
||||
import org.acegisecurity.MockRunAsManager;
|
||||
import org.acegisecurity.RunAsManager;
|
||||
import org.springframework.security.AccessDecisionManager;
|
||||
import org.springframework.security.AccessDeniedException;
|
||||
import org.springframework.security.AfterInvocationManager;
|
||||
import org.springframework.security.Authentication;
|
||||
import org.springframework.security.AuthenticationCredentialsNotFoundException;
|
||||
import org.springframework.security.AuthenticationException;
|
||||
import org.springframework.security.ConfigAttribute;
|
||||
import org.springframework.security.ConfigAttributeDefinition;
|
||||
import org.springframework.security.GrantedAuthority;
|
||||
import org.springframework.security.GrantedAuthorityImpl;
|
||||
import org.springframework.security.ITargetObject;
|
||||
import org.springframework.security.MockAccessDecisionManager;
|
||||
import org.springframework.security.MockAfterInvocationManager;
|
||||
import org.springframework.security.MockAuthenticationManager;
|
||||
import org.springframework.security.MockRunAsManager;
|
||||
import org.springframework.security.RunAsManager;
|
||||
|
||||
import org.acegisecurity.context.SecurityContextHolder;
|
||||
import org.springframework.security.context.SecurityContextHolder;
|
||||
|
||||
import org.acegisecurity.intercept.method.AbstractMethodDefinitionSource;
|
||||
import org.acegisecurity.intercept.method.MockMethodDefinitionSource;
|
||||
import org.springframework.security.intercept.method.AbstractMethodDefinitionSource;
|
||||
import org.springframework.security.intercept.method.MockMethodDefinitionSource;
|
||||
|
||||
import org.acegisecurity.providers.UsernamePasswordAuthenticationToken;
|
||||
import org.springframework.security.providers.UsernamePasswordAuthenticationToken;
|
||||
|
||||
import org.acegisecurity.runas.RunAsManagerImpl;
|
||||
import org.springframework.security.runas.RunAsManagerImpl;
|
||||
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.context.support.ClassPathXmlApplicationContext;
|
||||
@@ -82,14 +82,14 @@ public class MethodSecurityInterceptorTests extends TestCase {
|
||||
|
||||
private ITargetObject makeInterceptedTarget() {
|
||||
ApplicationContext context = new ClassPathXmlApplicationContext(
|
||||
"org/acegisecurity/intercept/method/aopalliance/applicationContext.xml");
|
||||
"org/springframework/security/intercept/method/aopalliance/applicationContext.xml");
|
||||
|
||||
return (ITargetObject) context.getBean("target");
|
||||
}
|
||||
|
||||
private ITargetObject makeInterceptedTargetRejectsAuthentication() {
|
||||
ApplicationContext context = new ClassPathXmlApplicationContext(
|
||||
"org/acegisecurity/intercept/method/aopalliance/applicationContext.xml");
|
||||
"org/springframework/security/intercept/method/aopalliance/applicationContext.xml");
|
||||
|
||||
MockAuthenticationManager authenticationManager = new MockAuthenticationManager(false);
|
||||
MethodSecurityInterceptor si = (MethodSecurityInterceptor) context.getBean("securityInterceptor");
|
||||
@@ -100,7 +100,7 @@ public class MethodSecurityInterceptorTests extends TestCase {
|
||||
|
||||
private ITargetObject makeInterceptedTargetWithoutAnAfterInvocationManager() {
|
||||
ApplicationContext context = new ClassPathXmlApplicationContext(
|
||||
"org/acegisecurity/intercept/method/aopalliance/applicationContext.xml");
|
||||
"org/springframework/security/intercept/method/aopalliance/applicationContext.xml");
|
||||
|
||||
MethodSecurityInterceptor si = (MethodSecurityInterceptor) context.getBean("securityInterceptor");
|
||||
si.setAfterInvocationManager(null);
|
||||
@@ -124,7 +124,7 @@ public class MethodSecurityInterceptorTests extends TestCase {
|
||||
// The associated MockAuthenticationManager WILL accept the above UsernamePasswordAuthenticationToken
|
||||
ITargetObject target = makeInterceptedTarget();
|
||||
String result = target.publicMakeLowerCase("HELLO");
|
||||
assertEquals("hello org.acegisecurity.providers.UsernamePasswordAuthenticationToken false", result);
|
||||
assertEquals("hello org.springframework.security.providers.UsernamePasswordAuthenticationToken false", result);
|
||||
}
|
||||
|
||||
public void testDeniesWhenAppropriate() throws Exception {
|
||||
@@ -170,7 +170,7 @@ public class MethodSecurityInterceptorTests extends TestCase {
|
||||
|
||||
ITargetObject target = makeInterceptedTarget();
|
||||
String result = target.makeUpperCase("hello");
|
||||
assertEquals("HELLO org.acegisecurity.MockRunAsAuthenticationToken true", result);
|
||||
assertEquals("HELLO org.springframework.security.MockRunAsAuthenticationToken true", result);
|
||||
}
|
||||
|
||||
public void testMethodCallWithoutRunAsReplacement()
|
||||
@@ -184,7 +184,7 @@ public class MethodSecurityInterceptorTests extends TestCase {
|
||||
String result = target.makeLowerCase("HELLO");
|
||||
|
||||
// Note we check the isAuthenticated remained true in following line
|
||||
assertEquals("hello org.acegisecurity.providers.UsernamePasswordAuthenticationToken true", result);
|
||||
assertEquals("hello org.springframework.security.providers.UsernamePasswordAuthenticationToken true", result);
|
||||
}
|
||||
|
||||
public void testRejectionOfEmptySecurityContext() throws Exception {
|
||||
@@ -13,26 +13,26 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.acegisecurity.intercept.method.aspectj;
|
||||
package org.springframework.security.intercept.method.aspectj;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import org.acegisecurity.AccessDeniedException;
|
||||
import org.acegisecurity.GrantedAuthority;
|
||||
import org.acegisecurity.GrantedAuthorityImpl;
|
||||
import org.acegisecurity.MockAccessDecisionManager;
|
||||
import org.acegisecurity.MockApplicationContext;
|
||||
import org.acegisecurity.MockAuthenticationManager;
|
||||
import org.acegisecurity.MockJoinPoint;
|
||||
import org.acegisecurity.MockRunAsManager;
|
||||
import org.acegisecurity.TargetObject;
|
||||
import org.springframework.security.AccessDeniedException;
|
||||
import org.springframework.security.GrantedAuthority;
|
||||
import org.springframework.security.GrantedAuthorityImpl;
|
||||
import org.springframework.security.MockAccessDecisionManager;
|
||||
import org.springframework.security.MockApplicationContext;
|
||||
import org.springframework.security.MockAuthenticationManager;
|
||||
import org.springframework.security.MockJoinPoint;
|
||||
import org.springframework.security.MockRunAsManager;
|
||||
import org.springframework.security.TargetObject;
|
||||
|
||||
import org.acegisecurity.context.SecurityContextHolder;
|
||||
import org.springframework.security.context.SecurityContextHolder;
|
||||
|
||||
import org.acegisecurity.intercept.method.MethodDefinitionMap;
|
||||
import org.acegisecurity.intercept.method.MethodDefinitionSourceEditor;
|
||||
import org.springframework.security.intercept.method.MethodDefinitionMap;
|
||||
import org.springframework.security.intercept.method.MethodDefinitionSourceEditor;
|
||||
|
||||
import org.acegisecurity.providers.TestingAuthenticationToken;
|
||||
import org.springframework.security.providers.TestingAuthenticationToken;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
|
||||
@@ -62,7 +62,7 @@ public class AspectJSecurityInterceptorTests extends TestCase {
|
||||
protected void tearDown() throws Exception {
|
||||
super.tearDown();
|
||||
SecurityContextHolder.clearContext();
|
||||
}
|
||||
}
|
||||
|
||||
public void testCallbackIsInvokedWhenPermissionGranted()
|
||||
throws Exception {
|
||||
@@ -73,7 +73,7 @@ public class AspectJSecurityInterceptorTests extends TestCase {
|
||||
si.setRunAsManager(new MockRunAsManager());
|
||||
|
||||
MethodDefinitionSourceEditor editor = new MethodDefinitionSourceEditor();
|
||||
editor.setAsText("org.acegisecurity.TargetObject.countLength=MOCK_ONE,MOCK_TWO");
|
||||
editor.setAsText("org.springframework.security.TargetObject.countLength=MOCK_ONE,MOCK_TWO");
|
||||
|
||||
MethodDefinitionMap map = (MethodDefinitionMap) editor.getValue();
|
||||
si.setObjectDefinitionSource(map);
|
||||
@@ -105,7 +105,7 @@ public class AspectJSecurityInterceptorTests extends TestCase {
|
||||
si.setRunAsManager(new MockRunAsManager());
|
||||
|
||||
MethodDefinitionSourceEditor editor = new MethodDefinitionSourceEditor();
|
||||
editor.setAsText("org.acegisecurity.TargetObject.countLength=MOCK_ONE,MOCK_TWO");
|
||||
editor.setAsText("org.springframework.security.TargetObject.countLength=MOCK_ONE,MOCK_TWO");
|
||||
|
||||
MethodDefinitionMap map = (MethodDefinitionMap) editor.getValue();
|
||||
si.setObjectDefinitionSource(map);
|
||||
@@ -13,7 +13,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.acegisecurity.intercept.web;
|
||||
package org.springframework.security.intercept.web;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
@@ -13,20 +13,20 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.acegisecurity.intercept.web;
|
||||
package org.springframework.security.intercept.web;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
import org.acegisecurity.ConfigAttributeDefinition;
|
||||
import org.acegisecurity.SecurityConfig;
|
||||
import org.springframework.security.ConfigAttributeDefinition;
|
||||
import org.springframework.security.SecurityConfig;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
/**
|
||||
* Test for {@link FilterInvocationDefinitionDecorator}
|
||||
*
|
||||
*
|
||||
* @author <a href="mailto:carlos@apache.org">Carlos Sanchez</a>
|
||||
* @version $Id$
|
||||
*/
|
||||
@@ -13,13 +13,13 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.acegisecurity.intercept.web;
|
||||
package org.springframework.security.intercept.web;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import org.acegisecurity.ConfigAttributeDefinition;
|
||||
import org.acegisecurity.MockFilterChain;
|
||||
import org.acegisecurity.SecurityConfig;
|
||||
import org.springframework.security.ConfigAttributeDefinition;
|
||||
import org.springframework.security.MockFilterChain;
|
||||
import org.springframework.security.SecurityConfig;
|
||||
|
||||
import org.springframework.mock.web.MockHttpServletRequest;
|
||||
import org.springframework.mock.web.MockHttpServletResponse;
|
||||
@@ -13,13 +13,13 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.acegisecurity.intercept.web;
|
||||
package org.springframework.security.intercept.web;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import org.acegisecurity.ConfigAttributeDefinition;
|
||||
import org.acegisecurity.MockFilterChain;
|
||||
import org.acegisecurity.SecurityConfig;
|
||||
import org.springframework.security.ConfigAttributeDefinition;
|
||||
import org.springframework.security.MockFilterChain;
|
||||
import org.springframework.security.SecurityConfig;
|
||||
|
||||
import org.springframework.mock.web.MockHttpServletRequest;
|
||||
import org.springframework.mock.web.MockHttpServletResponse;
|
||||
@@ -13,9 +13,9 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.acegisecurity.intercept.web;
|
||||
package org.springframework.security.intercept.web;
|
||||
|
||||
import org.acegisecurity.MockFilterChain;
|
||||
import org.springframework.security.MockFilterChain;
|
||||
|
||||
import org.jmock.MockObjectTestCase;
|
||||
|
||||
@@ -13,25 +13,25 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.acegisecurity.intercept.web;
|
||||
package org.springframework.security.intercept.web;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import org.acegisecurity.AccessDecisionManager;
|
||||
import org.acegisecurity.AccessDeniedException;
|
||||
import org.acegisecurity.Authentication;
|
||||
import org.acegisecurity.ConfigAttribute;
|
||||
import org.acegisecurity.ConfigAttributeDefinition;
|
||||
import org.acegisecurity.GrantedAuthority;
|
||||
import org.acegisecurity.GrantedAuthorityImpl;
|
||||
import org.acegisecurity.MockAccessDecisionManager;
|
||||
import org.acegisecurity.MockApplicationContext;
|
||||
import org.acegisecurity.MockAuthenticationManager;
|
||||
import org.acegisecurity.MockRunAsManager;
|
||||
import org.acegisecurity.RunAsManager;
|
||||
import org.acegisecurity.SecurityConfig;
|
||||
import org.acegisecurity.context.SecurityContextHolder;
|
||||
import org.acegisecurity.providers.UsernamePasswordAuthenticationToken;
|
||||
import org.springframework.security.AccessDecisionManager;
|
||||
import org.springframework.security.AccessDeniedException;
|
||||
import org.springframework.security.Authentication;
|
||||
import org.springframework.security.ConfigAttribute;
|
||||
import org.springframework.security.ConfigAttributeDefinition;
|
||||
import org.springframework.security.GrantedAuthority;
|
||||
import org.springframework.security.GrantedAuthorityImpl;
|
||||
import org.springframework.security.MockAccessDecisionManager;
|
||||
import org.springframework.security.MockApplicationContext;
|
||||
import org.springframework.security.MockAuthenticationManager;
|
||||
import org.springframework.security.MockRunAsManager;
|
||||
import org.springframework.security.RunAsManager;
|
||||
import org.springframework.security.SecurityConfig;
|
||||
import org.springframework.security.context.SecurityContextHolder;
|
||||
import org.springframework.security.providers.UsernamePasswordAuthenticationToken;
|
||||
import org.springframework.mock.web.MockHttpServletRequest;
|
||||
import org.springframework.mock.web.MockHttpServletResponse;
|
||||
|
||||
@@ -101,7 +101,7 @@ public class FilterSecurityInterceptorTests extends TestCase {
|
||||
interceptor.afterPropertiesSet();
|
||||
fail("Should have thrown IllegalArgumentException");
|
||||
} catch (IllegalArgumentException expected) {
|
||||
assertEquals("AccessDecisionManager does not support secure object class: class org.acegisecurity.intercept.web.FilterInvocation",
|
||||
assertEquals("AccessDecisionManager does not support secure object class: class org.springframework.security.intercept.web.FilterInvocation",
|
||||
expected.getMessage());
|
||||
}
|
||||
}
|
||||
@@ -132,7 +132,7 @@ public class FilterSecurityInterceptorTests extends TestCase {
|
||||
interceptor.afterPropertiesSet();
|
||||
fail("Should have thrown IllegalArgumentException");
|
||||
} catch (IllegalArgumentException expected) {
|
||||
assertEquals("RunAsManager does not support secure object class: class org.acegisecurity.intercept.web.FilterInvocation",
|
||||
assertEquals("RunAsManager does not support secure object class: class org.springframework.security.intercept.web.FilterInvocation",
|
||||
expected.getMessage());
|
||||
}
|
||||
}
|
||||
@@ -13,17 +13,17 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.acegisecurity.intercept.web;
|
||||
package org.springframework.security.intercept.web;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
|
||||
import org.acegisecurity.ConfigAttributeDefinition;
|
||||
import org.springframework.security.ConfigAttributeDefinition;
|
||||
|
||||
/**
|
||||
* Mock for {@link FilterInvocationDefinitionMap}
|
||||
*
|
||||
*
|
||||
* @author <a href="mailto:carlos@apache.org">Carlos Sanchez</a>
|
||||
* @version $Id: MockFilterInvocationDefinitionSource.java 1496 2006-05-23
|
||||
* 13:38:33Z benalex $
|
||||
@@ -13,10 +13,10 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.acegisecurity.intercept.web;
|
||||
package org.springframework.security.intercept.web;
|
||||
|
||||
import org.acegisecurity.ConfigAttributeDefinition;
|
||||
import org.acegisecurity.SecurityConfig;
|
||||
import org.springframework.security.ConfigAttributeDefinition;
|
||||
import org.springframework.security.SecurityConfig;
|
||||
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
@@ -13,13 +13,13 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.acegisecurity.intercept.web;
|
||||
package org.springframework.security.intercept.web;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import org.acegisecurity.ConfigAttributeDefinition;
|
||||
import org.acegisecurity.MockFilterChain;
|
||||
import org.acegisecurity.SecurityConfig;
|
||||
import org.springframework.security.ConfigAttributeDefinition;
|
||||
import org.springframework.security.MockFilterChain;
|
||||
import org.springframework.security.SecurityConfig;
|
||||
|
||||
import org.springframework.mock.web.MockHttpServletRequest;
|
||||
import org.springframework.mock.web.MockHttpServletResponse;
|
||||
@@ -13,13 +13,13 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.acegisecurity.intercept.web;
|
||||
package org.springframework.security.intercept.web;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import org.acegisecurity.ConfigAttributeDefinition;
|
||||
import org.acegisecurity.MockFilterChain;
|
||||
import org.acegisecurity.SecurityConfig;
|
||||
import org.springframework.security.ConfigAttributeDefinition;
|
||||
import org.springframework.security.MockFilterChain;
|
||||
import org.springframework.security.SecurityConfig;
|
||||
|
||||
import org.springframework.mock.web.MockHttpServletRequest;
|
||||
import org.springframework.mock.web.MockHttpServletResponse;
|
||||
@@ -13,23 +13,23 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.acegisecurity.intercept.web;
|
||||
package org.springframework.security.intercept.web;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import org.acegisecurity.GrantedAuthority;
|
||||
import org.acegisecurity.GrantedAuthorityImpl;
|
||||
import org.springframework.security.GrantedAuthority;
|
||||
import org.springframework.security.GrantedAuthorityImpl;
|
||||
|
||||
import org.acegisecurity.providers.UsernamePasswordAuthenticationToken;
|
||||
import org.springframework.security.providers.UsernamePasswordAuthenticationToken;
|
||||
|
||||
import org.acegisecurity.util.FilterInvocationUtils;
|
||||
import org.springframework.security.util.FilterInvocationUtils;
|
||||
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.context.support.ClassPathXmlApplicationContext;
|
||||
|
||||
|
||||
/**
|
||||
* Tests {@link org.acegisecurity.intercept.web.WebInvocationPrivilegeEvaluator}.
|
||||
* Tests {@link org.springframework.security.intercept.web.WebInvocationPrivilegeEvaluator}.
|
||||
*
|
||||
* @author Ben Alex
|
||||
* @version $Id$
|
||||
@@ -53,7 +53,7 @@ public class WebInvocationPrivilegeEvaluatorTests extends TestCase {
|
||||
|
||||
private FilterSecurityInterceptor makeFilterSecurityInterceptor() {
|
||||
ApplicationContext context = new ClassPathXmlApplicationContext(
|
||||
"org/acegisecurity/intercept/web/applicationContext.xml");
|
||||
"org/springframework/security/intercept/web/applicationContext.xml");
|
||||
|
||||
return (FilterSecurityInterceptor) context.getBean("securityInterceptor");
|
||||
}
|
||||
@@ -12,14 +12,12 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.acegisecurity.ldap;
|
||||
package org.springframework.security.ldap;
|
||||
|
||||
import org.springframework.test.AbstractDependencyInjectionSpringContextTests;
|
||||
import org.springframework.ldap.core.ContextSource;
|
||||
import org.springframework.core.io.ClassPathResource;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
/**
|
||||
* Based on class borrowed from Spring Ldap project.
|
||||
*
|
||||
@@ -36,14 +34,18 @@ public abstract class AbstractLdapIntegrationTests extends AbstractDependencyInj
|
||||
}
|
||||
|
||||
protected String[] getConfigLocations() {
|
||||
return new String[] {"/org/acegisecurity/ldap/ldapIntegrationTestContext.xml"};
|
||||
return new String[] {"/org/springframework/security/ldap/ldapIntegrationTestContext.xml"};
|
||||
}
|
||||
|
||||
|
||||
protected void onSetUp() throws Exception {
|
||||
super.onSetUp();
|
||||
|
||||
ClassPathResource ldifs = new ClassPathResource("org/acegisecurity/ldap/setup_data.ldif");
|
||||
ClassPathResource ldifs = new ClassPathResource("org/springframework/security/ldap/setup_data.ldif");
|
||||
|
||||
if (!ldifs.getFile().exists()) {
|
||||
throw new IllegalStateException("Ldif file not found: " + ldifs.getFile().getAbsolutePath());
|
||||
}
|
||||
|
||||
ldapServerManager.cleanAndSetup(ldifs.getFile().getAbsolutePath());
|
||||
}
|
||||
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.acegisecurity.ldap;
|
||||
package org.springframework.security.ldap;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.Hashtable;
|
||||
@@ -13,10 +13,10 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.acegisecurity.ldap;
|
||||
package org.springframework.security.ldap;
|
||||
|
||||
import org.acegisecurity.AcegiMessageSource;
|
||||
import org.acegisecurity.BadCredentialsException;
|
||||
import org.springframework.security.AcegiMessageSource;
|
||||
import org.springframework.security.BadCredentialsException;
|
||||
import org.springframework.ldap.UncategorizedLdapException;
|
||||
|
||||
import java.util.Hashtable;
|
||||
@@ -26,7 +26,7 @@ import javax.naming.directory.DirContext;
|
||||
|
||||
|
||||
/**
|
||||
* Tests {@link org.acegisecurity.ldap.DefaultInitialDirContextFactory}.
|
||||
* Tests {@link org.springframework.security.ldap.DefaultInitialDirContextFactory}.
|
||||
*
|
||||
* @author Luke Taylor
|
||||
* @version $Id$
|
||||
@@ -127,9 +127,9 @@ public class DefaultInitialDirContextFactoryTests extends AbstractLdapIntegratio
|
||||
assertNull(env.get(Context.SECURITY_CREDENTIALS));
|
||||
|
||||
// Ctx factory.
|
||||
idf.setInitialContextFactory("org.acegisecurity.NonExistentCtxFactory");
|
||||
idf.setInitialContextFactory("org.springframework.security.NonExistentCtxFactory");
|
||||
env = idf.getEnvironment();
|
||||
assertEquals("org.acegisecurity.NonExistentCtxFactory", env.get(Context.INITIAL_CONTEXT_FACTORY));
|
||||
assertEquals("org.springframework.security.NonExistentCtxFactory", env.get(Context.INITIAL_CONTEXT_FACTORY));
|
||||
|
||||
// Auth type
|
||||
idf.setAuthenticationType("myauthtype");
|
||||
@@ -160,13 +160,13 @@ public class DefaultInitialDirContextFactoryTests extends AbstractLdapIntegratio
|
||||
}
|
||||
|
||||
public void testMultipleProviderUrlsAreAccepted() {
|
||||
idf = new DefaultInitialDirContextFactory("ldaps://acegisecurity.org/dc=acegisecurity,dc=org "
|
||||
idf = new DefaultInitialDirContextFactory("ldaps://security.org/dc=acegisecurity,dc=org "
|
||||
+ "ldap://monkeymachine.co.uk/dc=acegisecurity,dc=org");
|
||||
}
|
||||
|
||||
public void testMultipleProviderUrlsWithDifferentRootsAreRejected() {
|
||||
try {
|
||||
idf = new DefaultInitialDirContextFactory("ldap://acegisecurity.org/dc=acegisecurity,dc=org "
|
||||
idf = new DefaultInitialDirContextFactory("ldap://security.org/dc=acegisecurity,dc=org "
|
||||
+ "ldap://monkeymachine.co.uk/dc=someotherplace,dc=org");
|
||||
fail("Different root DNs should cause an exception");
|
||||
} catch (IllegalArgumentException expected) {}
|
||||
@@ -180,7 +180,7 @@ public class DefaultInitialDirContextFactoryTests extends AbstractLdapIntegratio
|
||||
// public void testNonLdapUrlIsRejected() throws Exception {
|
||||
// DefaultInitialDirContextFactory idf = new DefaultInitialDirContextFactory();
|
||||
//
|
||||
// idf.setUrl("http://acegisecurity.org/dc=acegisecurity,dc=org");
|
||||
// idf.setUrl("http://security.org/dc=acegisecurity,dc=org");
|
||||
// idf.setInitialContextFactory(CoreContextFactory.class.getName());
|
||||
//
|
||||
// try {
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.acegisecurity.ldap;
|
||||
package org.springframework.security.ldap;
|
||||
|
||||
import java.util.Properties;
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.acegisecurity.ldap;
|
||||
package org.springframework.security.ldap;
|
||||
|
||||
import org.jmock.Mock;
|
||||
import org.jmock.MockObjectTestCase;
|
||||
@@ -13,7 +13,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.acegisecurity.ldap;
|
||||
package org.springframework.security.ldap;
|
||||
|
||||
import org.springframework.dao.DataAccessException;
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.acegisecurity.ldap;
|
||||
package org.springframework.security.ldap;
|
||||
|
||||
import org.springframework.ldap.UncategorizedLdapException;
|
||||
import org.springframework.ldap.core.ContextExecutor;
|
||||
@@ -13,13 +13,12 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.acegisecurity.ldap.search;
|
||||
package org.springframework.security.ldap.search;
|
||||
|
||||
import org.acegisecurity.ldap.DefaultInitialDirContextFactory;
|
||||
import org.acegisecurity.ldap.AbstractLdapIntegrationTests;
|
||||
import org.springframework.security.ldap.DefaultInitialDirContextFactory;
|
||||
import org.springframework.security.ldap.AbstractLdapIntegrationTests;
|
||||
|
||||
import org.acegisecurity.userdetails.UsernameNotFoundException;
|
||||
import org.acegisecurity.userdetails.ldap.LdapUserDetails;
|
||||
import org.springframework.security.userdetails.UsernameNotFoundException;
|
||||
|
||||
import org.springframework.dao.IncorrectResultSizeDataAccessException;
|
||||
import org.springframework.ldap.core.DirContextOperations;
|
||||
@@ -13,12 +13,12 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.acegisecurity.providers;
|
||||
package org.springframework.security.providers;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import org.acegisecurity.GrantedAuthority;
|
||||
import org.acegisecurity.GrantedAuthorityImpl;
|
||||
import org.springframework.security.GrantedAuthority;
|
||||
import org.springframework.security.GrantedAuthorityImpl;
|
||||
|
||||
|
||||
/**
|
||||
@@ -13,18 +13,18 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.acegisecurity.providers;
|
||||
package org.springframework.security.providers;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import org.acegisecurity.Authentication;
|
||||
import org.acegisecurity.AuthenticationException;
|
||||
import org.acegisecurity.AuthenticationServiceException;
|
||||
import org.acegisecurity.GrantedAuthority;
|
||||
import org.acegisecurity.GrantedAuthorityImpl;
|
||||
import org.springframework.security.Authentication;
|
||||
import org.springframework.security.AuthenticationException;
|
||||
import org.springframework.security.AuthenticationServiceException;
|
||||
import org.springframework.security.GrantedAuthority;
|
||||
import org.springframework.security.GrantedAuthorityImpl;
|
||||
|
||||
import org.acegisecurity.concurrent.ConcurrentSessionControllerImpl;
|
||||
import org.acegisecurity.concurrent.NullConcurrentSessionController;
|
||||
import org.springframework.security.concurrent.ConcurrentSessionControllerImpl;
|
||||
import org.springframework.security.concurrent.NullConcurrentSessionController;
|
||||
|
||||
import org.springframework.context.ApplicationEvent;
|
||||
import org.springframework.context.ApplicationEventPublisher;
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user