1
0
mirror of synced 2026-08-03 00:37:03 +00:00

SEC-562: Further repackaging.

This commit is contained in:
Luke Taylor
2007-09-21 18:24:52 +00:00
parent 4083e2ef92
commit 43cca63394
21 changed files with 119 additions and 119 deletions
+5 -5
View File
@@ -2,19 +2,19 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.acegisecurity</groupId>
<artifactId>acegi-security-parent</artifactId>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-parent</artifactId>
<version>2.0-SNAPSHOT</version>
</parent>
<artifactId>acegi-security-portlet</artifactId>
<artifactId>spring-security-portlet</artifactId>
<name>Acegi Security System for Spring - Portlet support</name>
<description>Acegi Security System for Spring - Support for JSR 168 Portlets</description>
<version>0.1-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>org.acegisecurity</groupId>
<artifactId>acegi-security</artifactId>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-core</artifactId>
<version>2.0-SNAPSHOT</version>
</dependency>
<dependency>
@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.acegisecurity.context;
package org.springframework.security.context;
import java.lang.reflect.Method;
@@ -48,7 +48,7 @@ import org.springframework.web.portlet.ModelAndView;
* <p> If a valid <code>SecurityContext</code> cannot be obtained from the <code>PortletSession</code> for
* whatever reason, a fresh <code>SecurityContext</code> will be created and used instead. The created object
* will be of the instance defined by the {@link #setContext(Class)} method (which defaults to
* {@link org.acegisecurity.context.SecurityContextImpl}. </p>
* {@link org.springframework.security.context.SecurityContextImpl}. </p>
*
* <p>A <code>PortletSession</code> may be created by this interceptor if one does not already exist. If at the
* end of the portlet request the <code>PortletSession</code> does not exist, one will <b>only</b> be created if
@@ -67,7 +67,7 @@ import org.springframework.web.portlet.ModelAndView;
* <code>true</code> (setting it to <code>false</code> will cause a startup-time error).</p>
* <p>This interceptor <b>must</b> be executed <b>before</p> any authentication processing mechanisms. These
* mechanisms (specifically {@link org.acegisecurity.ui.portlet.PortletProcessingInterceptor}) expect the
* mechanisms (specifically {@link org.springframework.security.ui.portlet.PortletProcessingInterceptor}) expect the
* <code>SecurityContextHolder</code> to contain a valid <code>SecurityContext</code> by the time they execute.</p>
*
* <p>An important nuance to this interceptor is that (by default) the <code>SecurityContext</code> is stored
@@ -179,7 +179,7 @@ public class PortletSessionContextIntegrationInterceptor
// check that the value of context is legal
if ((this.context == null) || (!SecurityContext.class.isAssignableFrom(this.context))) {
throw new IllegalArgumentException("context must be defined and implement SecurityContext "
+ "(typically use org.acegisecurity.context.SecurityContextImpl; existing class is "
+ "(typically use org.springframework.security.context.SecurityContextImpl; existing class is "
+ this.context + ")");
}
@@ -14,20 +14,20 @@
* limitations under the License.
*/
package org.acegisecurity.providers.portlet;
package org.springframework.security.providers.portlet;
import java.security.Principal;
import java.util.Map;
import javax.portlet.PortletRequest;
import org.acegisecurity.Authentication;
import org.acegisecurity.AuthenticationException;
import org.acegisecurity.AuthenticationServiceException;
import org.acegisecurity.BadCredentialsException;
import org.acegisecurity.providers.AuthenticationProvider;
import org.acegisecurity.providers.portlet.cache.NullUserCache;
import org.acegisecurity.userdetails.UserDetails;
import org.springframework.security.Authentication;
import org.springframework.security.AuthenticationException;
import org.springframework.security.AuthenticationServiceException;
import org.springframework.security.BadCredentialsException;
import org.springframework.security.providers.AuthenticationProvider;
import org.springframework.security.providers.portlet.cache.NullUserCache;
import org.springframework.security.userdetails.UserDetails;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.InitializingBean;
@@ -35,7 +35,7 @@ import org.springframework.util.Assert;
/**
* <p>Processes a JSR 168 Portlet authentication request. The request will typically
* originate from {@link org.acegisecurity.ui.portlet.PortletProcessingInterceptor}.</p>
* originate from {@link org.springframework.security.ui.portlet.PortletProcessingInterceptor}.</p>
*
* <p>Be aware that this provider is trusting the portal and portlet container to handle
* actual authentication. If a valid {@link PortletAuthenticationToken} is presented with
@@ -14,10 +14,10 @@
* limitations under the License.
*/
package org.acegisecurity.providers.portlet;
package org.springframework.security.providers.portlet;
import org.acegisecurity.GrantedAuthority;
import org.acegisecurity.providers.AbstractAuthenticationToken;
import org.springframework.security.GrantedAuthority;
import org.springframework.security.providers.AbstractAuthenticationToken;
/**
* <code>Authentication</code> implementation for JSR 168 Portlet authentication. <p>The
@@ -14,11 +14,11 @@
* limitations under the License.
*/
package org.acegisecurity.providers.portlet;
package org.springframework.security.providers.portlet;
import org.acegisecurity.Authentication;
import org.acegisecurity.AuthenticationException;
import org.acegisecurity.userdetails.UserDetails;
import org.springframework.security.Authentication;
import org.springframework.security.AuthenticationException;
import org.springframework.security.userdetails.UserDetails;
/**
* Populates the <code>UserDetails</code> associated with the
@@ -14,9 +14,9 @@
* limitations under the License.
*/
package org.acegisecurity.providers.portlet;
package org.springframework.security.providers.portlet;
import org.acegisecurity.userdetails.UserDetails;
import org.springframework.security.userdetails.UserDetails;
/**
* Provides a cache of {@link UserDetails} objects for the
@@ -14,14 +14,14 @@
* limitations under the License.
*/
package org.acegisecurity.providers.portlet.cache;
package org.springframework.security.providers.portlet.cache;
import net.sf.ehcache.Cache;
import net.sf.ehcache.CacheException;
import net.sf.ehcache.Element;
import org.acegisecurity.providers.portlet.UserCache;
import org.acegisecurity.userdetails.UserDetails;
import org.springframework.security.providers.portlet.UserCache;
import org.springframework.security.userdetails.UserDetails;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.InitializingBean;
@@ -14,10 +14,10 @@
* limitations under the License.
*/
package org.acegisecurity.providers.portlet.cache;
package org.springframework.security.providers.portlet.cache;
import org.acegisecurity.providers.portlet.UserCache;
import org.acegisecurity.userdetails.UserDetails;
import org.springframework.security.providers.portlet.UserCache;
import org.springframework.security.userdetails.UserDetails;
/**
* <code>UserCache</code> implementation for portlets that does nothing.
@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.acegisecurity.providers.portlet.populator;
package org.springframework.security.providers.portlet.populator;
import java.util.ArrayList;
import java.util.Iterator;
@@ -22,15 +22,15 @@ import java.util.List;
import javax.portlet.PortletRequest;
import org.acegisecurity.Authentication;
import org.acegisecurity.AuthenticationException;
import org.acegisecurity.AuthenticationServiceException;
import org.acegisecurity.GrantedAuthority;
import org.acegisecurity.GrantedAuthorityImpl;
import org.acegisecurity.providers.portlet.PortletAuthenticationProvider;
import org.acegisecurity.providers.portlet.PortletAuthoritiesPopulator;
import org.acegisecurity.userdetails.User;
import org.acegisecurity.userdetails.UserDetails;
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.springframework.security.providers.portlet.PortletAuthenticationProvider;
import org.springframework.security.providers.portlet.PortletAuthoritiesPopulator;
import org.springframework.security.userdetails.User;
import org.springframework.security.userdetails.UserDetails;
/**
* <p>Populates the portlet authorities via role information from the portlet container.
@@ -14,15 +14,15 @@
* limitations under the License.
*/
package org.acegisecurity.providers.portlet.populator;
package org.springframework.security.providers.portlet.populator;
import org.acegisecurity.Authentication;
import org.acegisecurity.AuthenticationException;
import org.acegisecurity.AuthenticationServiceException;
import org.acegisecurity.providers.portlet.PortletAuthenticationProvider;
import org.acegisecurity.providers.portlet.PortletAuthoritiesPopulator;
import org.acegisecurity.userdetails.UserDetails;
import org.acegisecurity.userdetails.UserDetailsService;
import org.springframework.security.Authentication;
import org.springframework.security.AuthenticationException;
import org.springframework.security.AuthenticationServiceException;
import org.springframework.security.providers.portlet.PortletAuthenticationProvider;
import org.springframework.security.providers.portlet.PortletAuthoritiesPopulator;
import org.springframework.security.userdetails.UserDetails;
import org.springframework.security.userdetails.UserDetailsService;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.util.Assert;
@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.acegisecurity.ui.portlet;
package org.springframework.security.ui.portlet;
import java.io.IOException;
@@ -23,8 +23,8 @@ import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletResponse;
import org.acegisecurity.AuthenticationException;
import org.acegisecurity.ui.AuthenticationEntryPoint;
import org.springframework.security.AuthenticationException;
import org.springframework.security.ui.AuthenticationEntryPoint;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.core.Ordered;
@@ -37,7 +37,7 @@ import org.springframework.core.Ordered;
* already failed. Therefore the <code>commence</code> method in this case will
* always return <code>HttpServletResponse.SC_FORBIDDEN</code> (HTTP 403 error).
*
* @see org.acegisecurity.ui.ExceptionTranslationFilter
* @see org.springframework.security.ui.ExceptionTranslationFilter
* @author John A. Lewis
* @since 2.0
* @version $Id$
@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.acegisecurity.ui.portlet;
package org.springframework.security.ui.portlet;
import java.io.IOException;
import java.security.Principal;
@@ -30,15 +30,15 @@ import javax.portlet.PortletSession;
import javax.portlet.RenderRequest;
import javax.portlet.RenderResponse;
import org.acegisecurity.Authentication;
import org.acegisecurity.AuthenticationException;
import org.acegisecurity.AuthenticationManager;
import org.acegisecurity.context.SecurityContext;
import org.acegisecurity.context.SecurityContextHolder;
import org.acegisecurity.providers.portlet.PortletAuthenticationProvider;
import org.acegisecurity.providers.portlet.PortletAuthenticationToken;
import org.acegisecurity.providers.portlet.populator.ContainerPortletAuthoritiesPopulator;
import org.acegisecurity.ui.AbstractProcessingFilter;
import org.springframework.security.Authentication;
import org.springframework.security.AuthenticationException;
import org.springframework.security.AuthenticationManager;
import org.springframework.security.context.SecurityContext;
import org.springframework.security.context.SecurityContextHolder;
import org.springframework.security.providers.portlet.PortletAuthenticationProvider;
import org.springframework.security.providers.portlet.PortletAuthenticationToken;
import org.springframework.security.providers.portlet.populator.ContainerPortletAuthoritiesPopulator;
import org.springframework.security.ui.AbstractProcessingFilter;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.InitializingBean;
@@ -75,8 +75,8 @@ import org.springframework.web.portlet.ModelAndView;
* will replace this with the <code>USER_INFO</code> map in the resulting <code>Authentication</code>
* object.</p>
*
* @see org.acegisecurity.ui.AbstractProcessingFilter
* @see org.acegisecurity.ui.webapp.AuthenticationProcessingFilter
* @see org.springframework.security.ui.AbstractProcessingFilter
* @see org.springframework.security.ui.webapp.AuthenticationProcessingFilter
* @author John A. Lewis
* @since 2.0
* @version $Id$
@@ -14,17 +14,17 @@
* limitations under the License.
*/
package org.acegisecurity.context;
package org.springframework.security.context;
import javax.portlet.PortletSession;
import junit.framework.TestCase;
import org.acegisecurity.GrantedAuthority;
import org.acegisecurity.GrantedAuthorityImpl;
import org.acegisecurity.providers.portlet.PortletAuthenticationToken;
import org.acegisecurity.providers.portlet.PortletTestUtils;
import org.acegisecurity.userdetails.User;
import org.springframework.security.GrantedAuthority;
import org.springframework.security.GrantedAuthorityImpl;
import org.springframework.security.providers.portlet.PortletAuthenticationToken;
import org.springframework.security.providers.portlet.PortletTestUtils;
import org.springframework.security.userdetails.User;
import org.springframework.mock.web.portlet.MockActionRequest;
import org.springframework.mock.web.portlet.MockActionResponse;
import org.springframework.mock.web.portlet.MockRenderRequest;
@@ -14,15 +14,15 @@
* limitations under the License.
*/
package org.acegisecurity.providers.portlet;
package org.springframework.security.providers.portlet;
import junit.framework.TestCase;
import org.acegisecurity.Authentication;
import org.acegisecurity.AuthenticationException;
import org.acegisecurity.BadCredentialsException;
import org.acegisecurity.providers.UsernamePasswordAuthenticationToken;
import org.acegisecurity.userdetails.UserDetails;
import org.springframework.security.Authentication;
import org.springframework.security.AuthenticationException;
import org.springframework.security.BadCredentialsException;
import org.springframework.security.providers.UsernamePasswordAuthenticationToken;
import org.springframework.security.userdetails.UserDetails;
/**
* Tests {@link PortletAuthenticationProvider}
@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.acegisecurity.providers.portlet;
package org.springframework.security.providers.portlet;
import junit.framework.TestCase;
@@ -14,18 +14,18 @@
* limitations under the License.
*/
package org.acegisecurity.providers.portlet;
package org.springframework.security.providers.portlet;
import javax.portlet.PortletRequest;
import org.acegisecurity.GrantedAuthority;
import org.acegisecurity.GrantedAuthorityImpl;
import org.acegisecurity.context.SecurityContext;
import org.acegisecurity.context.SecurityContextHolder;
import org.acegisecurity.context.SecurityContextImpl;
import org.acegisecurity.providers.TestingAuthenticationToken;
import org.acegisecurity.userdetails.User;
import org.acegisecurity.userdetails.UserDetails;
import org.springframework.security.GrantedAuthority;
import org.springframework.security.GrantedAuthorityImpl;
import org.springframework.security.context.SecurityContext;
import org.springframework.security.context.SecurityContextHolder;
import org.springframework.security.context.SecurityContextImpl;
import org.springframework.security.providers.TestingAuthenticationToken;
import org.springframework.security.userdetails.User;
import org.springframework.security.userdetails.UserDetails;
import org.springframework.mock.web.portlet.MockActionRequest;
import org.springframework.mock.web.portlet.MockActionResponse;
import org.springframework.mock.web.portlet.MockPortletRequest;
@@ -14,14 +14,14 @@
* limitations under the License.
*/
package org.acegisecurity.providers.portlet.cache;
package org.springframework.security.providers.portlet.cache;
import java.io.IOException;
import junit.framework.TestCase;
import net.sf.ehcache.Cache;
import org.acegisecurity.providers.portlet.PortletTestUtils;
import org.springframework.security.providers.portlet.PortletTestUtils;
import org.springframework.cache.ehcache.EhCacheFactoryBean;
/**
@@ -14,18 +14,18 @@
* limitations under the License.
*/
package org.acegisecurity.providers.portlet.populator;
package org.springframework.security.providers.portlet.populator;
import java.util.ArrayList;
import java.util.List;
import junit.framework.TestCase;
import org.acegisecurity.AuthenticationServiceException;
import org.acegisecurity.GrantedAuthorityImpl;
import org.acegisecurity.providers.portlet.PortletAuthenticationToken;
import org.acegisecurity.providers.portlet.PortletTestUtils;
import org.acegisecurity.userdetails.UserDetails;
import org.springframework.security.AuthenticationServiceException;
import org.springframework.security.GrantedAuthorityImpl;
import org.springframework.security.providers.portlet.PortletAuthenticationToken;
import org.springframework.security.providers.portlet.PortletTestUtils;
import org.springframework.security.userdetails.UserDetails;
/**
@@ -14,16 +14,16 @@
* limitations under the License.
*/
package org.acegisecurity.providers.portlet.populator;
package org.springframework.security.providers.portlet.populator;
import junit.framework.TestCase;
import org.acegisecurity.GrantedAuthorityImpl;
import org.acegisecurity.providers.portlet.PortletAuthenticationToken;
import org.acegisecurity.providers.portlet.PortletTestUtils;
import org.acegisecurity.userdetails.UserDetails;
import org.acegisecurity.userdetails.UserDetailsService;
import org.acegisecurity.userdetails.UsernameNotFoundException;
import org.springframework.security.GrantedAuthorityImpl;
import org.springframework.security.providers.portlet.PortletAuthenticationToken;
import org.springframework.security.providers.portlet.PortletTestUtils;
import org.springframework.security.userdetails.UserDetails;
import org.springframework.security.userdetails.UserDetailsService;
import org.springframework.security.userdetails.UsernameNotFoundException;
import org.springframework.dao.DataAccessException;
@@ -14,13 +14,13 @@
* limitations under the License.
*/
package org.acegisecurity.ui.portlet;
package org.springframework.security.ui.portlet;
import javax.servlet.http.HttpServletResponse;
import junit.framework.TestCase;
import org.acegisecurity.BadCredentialsException;
import org.springframework.security.BadCredentialsException;
import org.springframework.mock.web.MockHttpServletRequest;
import org.springframework.mock.web.MockHttpServletResponse;
@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.acegisecurity.ui.portlet;
package org.springframework.security.ui.portlet;
import java.util.ArrayList;
import java.util.HashMap;
@@ -24,18 +24,18 @@ import javax.portlet.PortletSession;
import junit.framework.TestCase;
import org.acegisecurity.Authentication;
import org.acegisecurity.AuthenticationManager;
import org.acegisecurity.BadCredentialsException;
import org.acegisecurity.GrantedAuthority;
import org.acegisecurity.GrantedAuthorityImpl;
import org.acegisecurity.context.SecurityContextHolder;
import org.acegisecurity.providers.TestingAuthenticationToken;
import org.acegisecurity.providers.UsernamePasswordAuthenticationToken;
import org.acegisecurity.providers.portlet.PortletAuthenticationToken;
import org.acegisecurity.providers.portlet.PortletTestUtils;
import org.acegisecurity.ui.AbstractProcessingFilter;
import org.acegisecurity.userdetails.User;
import org.springframework.security.Authentication;
import org.springframework.security.AuthenticationManager;
import org.springframework.security.BadCredentialsException;
import org.springframework.security.GrantedAuthority;
import org.springframework.security.GrantedAuthorityImpl;
import org.springframework.security.context.SecurityContextHolder;
import org.springframework.security.providers.TestingAuthenticationToken;
import org.springframework.security.providers.UsernamePasswordAuthenticationToken;
import org.springframework.security.providers.portlet.PortletAuthenticationToken;
import org.springframework.security.providers.portlet.PortletTestUtils;
import org.springframework.security.ui.AbstractProcessingFilter;
import org.springframework.security.userdetails.User;
import org.springframework.mock.web.portlet.MockActionRequest;
import org.springframework.mock.web.portlet.MockActionResponse;
import org.springframework.mock.web.portlet.MockRenderRequest;