diff --git a/core/src/main/java/org/springframework/security/core/Authentication.java b/core/src/main/java/org/springframework/security/core/Authentication.java index 61d4afbb61..25aba7a439 100644 --- a/core/src/main/java/org/springframework/security/core/Authentication.java +++ b/core/src/main/java/org/springframework/security/core/Authentication.java @@ -30,7 +30,7 @@ import org.springframework.security.core.context.SecurityContextHolder; *

* Once the request has been authenticated, the Authentication will usually be stored in a thread-local * SecurityContext managed by the {@link SecurityContextHolder} by the authentication mechanism which is - * being used. An explicit authentication can be achieved, without using one of Spring Security's authentication + * being used. An explicit authentication can be achieved, without using one of Spring Security's authentication * mechanisms, by creating an Authentication instance and using the code: * *

@@ -38,7 +38,7 @@ import org.springframework.security.core.context.SecurityContextHolder;
  * 
* Note that unless the Authentication has the authenticated property set to true, it will * still be authenticated by any security interceptor (for method or web invocations) which encounters it. - * + *

* In most cases, the framework transparently takes care of managing the security context and authentication objects * for you. * diff --git a/core/src/main/java/org/springframework/security/access/authoritymapping/Attributes2GrantedAuthoritiesMapper.java b/core/src/main/java/org/springframework/security/core/authoritymapping/Attributes2GrantedAuthoritiesMapper.java similarity index 91% rename from core/src/main/java/org/springframework/security/access/authoritymapping/Attributes2GrantedAuthoritiesMapper.java rename to core/src/main/java/org/springframework/security/core/authoritymapping/Attributes2GrantedAuthoritiesMapper.java index 3f7b5a7d0f..11103ed397 100755 --- a/core/src/main/java/org/springframework/security/access/authoritymapping/Attributes2GrantedAuthoritiesMapper.java +++ b/core/src/main/java/org/springframework/security/core/authoritymapping/Attributes2GrantedAuthoritiesMapper.java @@ -1,4 +1,4 @@ -package org.springframework.security.access.authoritymapping; +package org.springframework.security.core.authoritymapping; import java.util.Collection; import java.util.List; diff --git a/core/src/main/java/org/springframework/security/access/authoritymapping/MapBasedAttributes2GrantedAuthoritiesMapper.java b/core/src/main/java/org/springframework/security/core/authoritymapping/MapBasedAttributes2GrantedAuthoritiesMapper.java similarity index 94% rename from core/src/main/java/org/springframework/security/access/authoritymapping/MapBasedAttributes2GrantedAuthoritiesMapper.java rename to core/src/main/java/org/springframework/security/core/authoritymapping/MapBasedAttributes2GrantedAuthoritiesMapper.java index a1c0ec711a..4a4b7e1306 100755 --- a/core/src/main/java/org/springframework/security/access/authoritymapping/MapBasedAttributes2GrantedAuthoritiesMapper.java +++ b/core/src/main/java/org/springframework/security/core/authoritymapping/MapBasedAttributes2GrantedAuthoritiesMapper.java @@ -1,4 +1,4 @@ -package org.springframework.security.access.authoritymapping; +package org.springframework.security.core.authoritymapping; import java.util.ArrayList; import java.util.Collection; @@ -144,7 +144,7 @@ public class MapBasedAttributes2GrantedAuthoritiesMapper implements Attributes2G /** * - * @see org.springframework.security.access.authoritymapping.MappableAttributesRetriever#getMappableAttributes() + * @see org.springframework.security.core.authoritymapping.MappableAttributesRetriever#getMappableAttributes() */ public Set getMappableAttributes() { return mappableAttributes; diff --git a/core/src/main/java/org/springframework/security/access/authoritymapping/MappableAttributesRetriever.java b/core/src/main/java/org/springframework/security/core/authoritymapping/MappableAttributesRetriever.java similarity index 87% rename from core/src/main/java/org/springframework/security/access/authoritymapping/MappableAttributesRetriever.java rename to core/src/main/java/org/springframework/security/core/authoritymapping/MappableAttributesRetriever.java index 0b8430111a..f9f0d247b5 100755 --- a/core/src/main/java/org/springframework/security/access/authoritymapping/MappableAttributesRetriever.java +++ b/core/src/main/java/org/springframework/security/core/authoritymapping/MappableAttributesRetriever.java @@ -1,4 +1,4 @@ -package org.springframework.security.access.authoritymapping; +package org.springframework.security.core.authoritymapping; import java.util.Set; diff --git a/core/src/main/java/org/springframework/security/access/authoritymapping/SimpleAttributes2GrantedAuthoritiesMapper.java b/core/src/main/java/org/springframework/security/core/authoritymapping/SimpleAttributes2GrantedAuthoritiesMapper.java similarity index 95% rename from core/src/main/java/org/springframework/security/access/authoritymapping/SimpleAttributes2GrantedAuthoritiesMapper.java rename to core/src/main/java/org/springframework/security/core/authoritymapping/SimpleAttributes2GrantedAuthoritiesMapper.java index 821d486931..a0d69cca15 100755 --- a/core/src/main/java/org/springframework/security/access/authoritymapping/SimpleAttributes2GrantedAuthoritiesMapper.java +++ b/core/src/main/java/org/springframework/security/core/authoritymapping/SimpleAttributes2GrantedAuthoritiesMapper.java @@ -1,4 +1,4 @@ -package org.springframework.security.access.authoritymapping; +package org.springframework.security.core.authoritymapping; import org.springframework.security.core.GrantedAuthority; import org.springframework.security.core.GrantedAuthorityImpl; diff --git a/core/src/main/java/org/springframework/security/access/authoritymapping/SimpleMappableAttributesRetriever.java b/core/src/main/java/org/springframework/security/core/authoritymapping/SimpleMappableAttributesRetriever.java similarity index 80% rename from core/src/main/java/org/springframework/security/access/authoritymapping/SimpleMappableAttributesRetriever.java rename to core/src/main/java/org/springframework/security/core/authoritymapping/SimpleMappableAttributesRetriever.java index beccfe0daa..483b082206 100755 --- a/core/src/main/java/org/springframework/security/access/authoritymapping/SimpleMappableAttributesRetriever.java +++ b/core/src/main/java/org/springframework/security/core/authoritymapping/SimpleMappableAttributesRetriever.java @@ -1,4 +1,4 @@ -package org.springframework.security.access.authoritymapping; +package org.springframework.security.core.authoritymapping; import java.util.Collections; import java.util.HashSet; @@ -18,7 +18,7 @@ public class SimpleMappableAttributesRetriever implements MappableAttributesRetr /* * (non-Javadoc) * - * @see org.springframework.security.access.authoritymapping.MappableAttributesRetriever#getMappableAttributes() + * @see org.springframework.security.core.authoritymapping.MappableAttributesRetriever#getMappableAttributes() */ public Set getMappableAttributes() { return mappableAttributes; diff --git a/core/src/main/java/org/springframework/security/access/authoritymapping/XmlMappableAttributesRetriever.java b/core/src/main/java/org/springframework/security/core/authoritymapping/XmlMappableAttributesRetriever.java similarity index 96% rename from core/src/main/java/org/springframework/security/access/authoritymapping/XmlMappableAttributesRetriever.java rename to core/src/main/java/org/springframework/security/core/authoritymapping/XmlMappableAttributesRetriever.java index 9fe2af2e84..1950f2e362 100755 --- a/core/src/main/java/org/springframework/security/access/authoritymapping/XmlMappableAttributesRetriever.java +++ b/core/src/main/java/org/springframework/security/core/authoritymapping/XmlMappableAttributesRetriever.java @@ -1,4 +1,4 @@ -package org.springframework.security.access.authoritymapping; +package org.springframework.security.core.authoritymapping; import java.io.FilterInputStream; import java.io.IOException; diff --git a/core/src/test/java/org/springframework/security/access/authoritymapping/MapBasedAttributes2GrantedAuthoritiesMapperTest.java b/core/src/test/java/org/springframework/security/core/authoritymapping/MapBasedAttributes2GrantedAuthoritiesMapperTest.java similarity index 94% rename from core/src/test/java/org/springframework/security/access/authoritymapping/MapBasedAttributes2GrantedAuthoritiesMapperTest.java rename to core/src/test/java/org/springframework/security/core/authoritymapping/MapBasedAttributes2GrantedAuthoritiesMapperTest.java index 696a9b85b4..d5576b676e 100755 --- a/core/src/test/java/org/springframework/security/access/authoritymapping/MapBasedAttributes2GrantedAuthoritiesMapperTest.java +++ b/core/src/test/java/org/springframework/security/core/authoritymapping/MapBasedAttributes2GrantedAuthoritiesMapperTest.java @@ -1,4 +1,4 @@ -package org.springframework.security.access.authoritymapping; +package org.springframework.security.core.authoritymapping; import static org.junit.Assert.*; @@ -11,10 +11,10 @@ import java.util.List; import org.apache.log4j.Level; import org.apache.log4j.Logger; import org.junit.Test; -import org.springframework.security.access.authoritymapping.Attributes2GrantedAuthoritiesMapper; -import org.springframework.security.access.authoritymapping.MapBasedAttributes2GrantedAuthoritiesMapper; import org.springframework.security.core.GrantedAuthority; import org.springframework.security.core.GrantedAuthorityImpl; +import org.springframework.security.core.authoritymapping.Attributes2GrantedAuthoritiesMapper; +import org.springframework.security.core.authoritymapping.MapBasedAttributes2GrantedAuthoritiesMapper; /** * diff --git a/core/src/test/java/org/springframework/security/access/authoritymapping/SimpleMappableRolesRetrieverTests.java b/core/src/test/java/org/springframework/security/core/authoritymapping/SimpleMappableRolesRetrieverTests.java similarity index 82% rename from core/src/test/java/org/springframework/security/access/authoritymapping/SimpleMappableRolesRetrieverTests.java rename to core/src/test/java/org/springframework/security/core/authoritymapping/SimpleMappableRolesRetrieverTests.java index dd1e59a65d..f54622bf0b 100755 --- a/core/src/test/java/org/springframework/security/access/authoritymapping/SimpleMappableRolesRetrieverTests.java +++ b/core/src/test/java/org/springframework/security/core/authoritymapping/SimpleMappableRolesRetrieverTests.java @@ -1,9 +1,10 @@ -package org.springframework.security.access.authoritymapping; +package org.springframework.security.core.authoritymapping; import java.util.Set; import junit.framework.TestCase; +import org.springframework.security.core.authoritymapping.SimpleMappableAttributesRetriever; import org.springframework.util.StringUtils; /** diff --git a/core/src/test/java/org/springframework/security/access/authoritymapping/SimpleRoles2GrantedAuthoritiesMapperTests.java b/core/src/test/java/org/springframework/security/core/authoritymapping/SimpleRoles2GrantedAuthoritiesMapperTests.java similarity index 94% rename from core/src/test/java/org/springframework/security/access/authoritymapping/SimpleRoles2GrantedAuthoritiesMapperTests.java rename to core/src/test/java/org/springframework/security/core/authoritymapping/SimpleRoles2GrantedAuthoritiesMapperTests.java index 3eba213293..bbfa12c673 100755 --- a/core/src/test/java/org/springframework/security/access/authoritymapping/SimpleRoles2GrantedAuthoritiesMapperTests.java +++ b/core/src/test/java/org/springframework/security/core/authoritymapping/SimpleRoles2GrantedAuthoritiesMapperTests.java @@ -1,7 +1,7 @@ -package org.springframework.security.access.authoritymapping; +package org.springframework.security.core.authoritymapping; -import org.springframework.security.access.authoritymapping.SimpleAttributes2GrantedAuthoritiesMapper; import org.springframework.security.core.GrantedAuthority; +import org.springframework.security.core.authoritymapping.SimpleAttributes2GrantedAuthoritiesMapper; import java.util.ArrayList; import java.util.Arrays; diff --git a/core/src/test/java/org/springframework/security/access/authoritymapping/XmlMappableRolesRetrieverTests.java b/core/src/test/java/org/springframework/security/core/authoritymapping/XmlMappableRolesRetrieverTests.java similarity index 93% rename from core/src/test/java/org/springframework/security/access/authoritymapping/XmlMappableRolesRetrieverTests.java rename to core/src/test/java/org/springframework/security/core/authoritymapping/XmlMappableRolesRetrieverTests.java index b33ac7e728..2978a0ed9c 100755 --- a/core/src/test/java/org/springframework/security/access/authoritymapping/XmlMappableRolesRetrieverTests.java +++ b/core/src/test/java/org/springframework/security/core/authoritymapping/XmlMappableRolesRetrieverTests.java @@ -1,4 +1,4 @@ -package org.springframework.security.access.authoritymapping; +package org.springframework.security.core.authoritymapping; import java.io.ByteArrayInputStream; import java.io.IOException; @@ -7,7 +7,7 @@ import java.util.Arrays; import java.util.Collection; import java.util.Set; -import org.springframework.security.access.authoritymapping.XmlMappableAttributesRetriever; +import org.springframework.security.core.authoritymapping.XmlMappableAttributesRetriever; import junit.framework.TestCase; diff --git a/core/src/test/java/org/springframework/security/core/context/SecurityContextHolderTests.java b/core/src/test/java/org/springframework/security/core/context/SecurityContextHolderTests.java index 42aaab6122..2f65bad80c 100644 --- a/core/src/test/java/org/springframework/security/core/context/SecurityContextHolderTests.java +++ b/core/src/test/java/org/springframework/security/core/context/SecurityContextHolderTests.java @@ -18,8 +18,6 @@ package org.springframework.security.core.context; import junit.framework.TestCase; import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; -import org.springframework.security.core.context.SecurityContext; -import org.springframework.security.core.context.SecurityContextHolder; import org.springframework.security.core.context.SecurityContextImpl; /** diff --git a/core/src/test/java/org/springframework/security/core/context/SecurityContextImplTests.java b/core/src/test/java/org/springframework/security/core/context/SecurityContextImplTests.java index f267d00d6b..21a4ae8082 100644 --- a/core/src/test/java/org/springframework/security/core/context/SecurityContextImplTests.java +++ b/core/src/test/java/org/springframework/security/core/context/SecurityContextImplTests.java @@ -20,7 +20,6 @@ import junit.framework.TestCase; import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; import org.springframework.security.core.Authentication; -import org.springframework.security.core.context.SecurityContext; import org.springframework.security.core.context.SecurityContextImpl; diff --git a/samples/portlet/src/main/resources/portlet/securityContextPortlet.xml b/samples/portlet/src/main/resources/portlet/securityContextPortlet.xml index 96788ca4e5..66aa104117 100644 --- a/samples/portlet/src/main/resources/portlet/securityContextPortlet.xml +++ b/samples/portlet/src/main/resources/portlet/securityContextPortlet.xml @@ -36,7 +36,7 @@ - + tomcat diff --git a/samples/preauth/src/main/webapp/WEB-INF/applicationContext-security.xml b/samples/preauth/src/main/webapp/WEB-INF/applicationContext-security.xml index 097636d369..dfd8583aa2 100644 --- a/samples/preauth/src/main/webapp/WEB-INF/applicationContext-security.xml +++ b/samples/preauth/src/main/webapp/WEB-INF/applicationContext-security.xml @@ -52,7 +52,7 @@ - + diff --git a/web/src/main/java/org/springframework/security/web/authentication/preauth/j2ee/AbstractPreAuthenticatedAuthenticationDetailsSource.java b/web/src/main/java/org/springframework/security/web/authentication/preauth/j2ee/AbstractPreAuthenticatedAuthenticationDetailsSource.java index e0dccb6e50..328e6b0570 100644 --- a/web/src/main/java/org/springframework/security/web/authentication/preauth/j2ee/AbstractPreAuthenticatedAuthenticationDetailsSource.java +++ b/web/src/main/java/org/springframework/security/web/authentication/preauth/j2ee/AbstractPreAuthenticatedAuthenticationDetailsSource.java @@ -6,12 +6,12 @@ import java.util.Set; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.springframework.security.access.authoritymapping.Attributes2GrantedAuthoritiesMapper; -import org.springframework.security.access.authoritymapping.MappableAttributesRetriever; -import org.springframework.security.access.authoritymapping.SimpleAttributes2GrantedAuthoritiesMapper; import org.springframework.security.authentication.AuthenticationDetailsSourceImpl; import org.springframework.security.core.GrantedAuthority; import org.springframework.security.core.MutableGrantedAuthoritiesContainer; +import org.springframework.security.core.authoritymapping.Attributes2GrantedAuthoritiesMapper; +import org.springframework.security.core.authoritymapping.MappableAttributesRetriever; +import org.springframework.security.core.authoritymapping.SimpleAttributes2GrantedAuthoritiesMapper; import org.springframework.util.Assert; /** diff --git a/web/src/main/java/org/springframework/security/web/authentication/preauth/j2ee/J2eeBasedPreAuthenticatedWebAuthenticationDetailsSource.java b/web/src/main/java/org/springframework/security/web/authentication/preauth/j2ee/J2eeBasedPreAuthenticatedWebAuthenticationDetailsSource.java index f7c12556c1..1b46b1fc54 100755 --- a/web/src/main/java/org/springframework/security/web/authentication/preauth/j2ee/J2eeBasedPreAuthenticatedWebAuthenticationDetailsSource.java +++ b/web/src/main/java/org/springframework/security/web/authentication/preauth/j2ee/J2eeBasedPreAuthenticatedWebAuthenticationDetailsSource.java @@ -1,7 +1,7 @@ package org.springframework.security.web.authentication.preauth.j2ee; import org.springframework.security.web.authentication.preauth.PreAuthenticatedGrantedAuthoritiesWebAuthenticationDetails; -import org.springframework.security.access.authoritymapping.SimpleAttributes2GrantedAuthoritiesMapper; +import org.springframework.security.core.authoritymapping.SimpleAttributes2GrantedAuthoritiesMapper; import java.util.ArrayList; import java.util.Collection; diff --git a/web/src/main/java/org/springframework/security/web/authentication/preauth/j2ee/WebXmlMappableAttributesRetriever.java b/web/src/main/java/org/springframework/security/web/authentication/preauth/j2ee/WebXmlMappableAttributesRetriever.java index 2e13755b67..43f3942af3 100755 --- a/web/src/main/java/org/springframework/security/web/authentication/preauth/j2ee/WebXmlMappableAttributesRetriever.java +++ b/web/src/main/java/org/springframework/security/web/authentication/preauth/j2ee/WebXmlMappableAttributesRetriever.java @@ -2,7 +2,7 @@ package org.springframework.security.web.authentication.preauth.j2ee; import java.io.InputStream; -import org.springframework.security.access.authoritymapping.XmlMappableAttributesRetriever; +import org.springframework.security.core.authoritymapping.XmlMappableAttributesRetriever; /** *

diff --git a/web/src/main/java/org/springframework/security/web/authentication/preauth/websphere/WebSpherePreAuthenticatedAuthenticationDetailsSource.java b/web/src/main/java/org/springframework/security/web/authentication/preauth/websphere/WebSpherePreAuthenticatedAuthenticationDetailsSource.java index a24da68e9a..28556b441c 100755 --- a/web/src/main/java/org/springframework/security/web/authentication/preauth/websphere/WebSpherePreAuthenticatedAuthenticationDetailsSource.java +++ b/web/src/main/java/org/springframework/security/web/authentication/preauth/websphere/WebSpherePreAuthenticatedAuthenticationDetailsSource.java @@ -6,11 +6,11 @@ import java.util.List; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.springframework.beans.factory.InitializingBean; -import org.springframework.security.access.authoritymapping.Attributes2GrantedAuthoritiesMapper; -import org.springframework.security.access.authoritymapping.SimpleAttributes2GrantedAuthoritiesMapper; import org.springframework.security.authentication.AuthenticationDetailsSourceImpl; import org.springframework.security.core.GrantedAuthority; import org.springframework.security.core.MutableGrantedAuthoritiesContainer; +import org.springframework.security.core.authoritymapping.Attributes2GrantedAuthoritiesMapper; +import org.springframework.security.core.authoritymapping.SimpleAttributes2GrantedAuthoritiesMapper; import org.springframework.security.web.authentication.preauth.PreAuthenticatedGrantedAuthoritiesAuthenticationDetails; import org.springframework.util.Assert; diff --git a/web/src/test/java/org/springframework/security/web/authentication/preauth/j2ee/J2eeBasedPreAuthenticatedWebAuthenticationDetailsSourceTests.java b/web/src/test/java/org/springframework/security/web/authentication/preauth/j2ee/J2eeBasedPreAuthenticatedWebAuthenticationDetailsSourceTests.java index e25f2662d9..580e59b213 100755 --- a/web/src/test/java/org/springframework/security/web/authentication/preauth/j2ee/J2eeBasedPreAuthenticatedWebAuthenticationDetailsSourceTests.java +++ b/web/src/test/java/org/springframework/security/web/authentication/preauth/j2ee/J2eeBasedPreAuthenticatedWebAuthenticationDetailsSourceTests.java @@ -10,11 +10,11 @@ import javax.servlet.http.HttpServletRequest; import junit.framework.TestCase; -import org.springframework.security.access.authoritymapping.Attributes2GrantedAuthoritiesMapper; -import org.springframework.security.access.authoritymapping.MappableAttributesRetriever; -import org.springframework.security.access.authoritymapping.SimpleAttributes2GrantedAuthoritiesMapper; -import org.springframework.security.access.authoritymapping.SimpleMappableAttributesRetriever; import org.springframework.security.core.GrantedAuthority; +import org.springframework.security.core.authoritymapping.Attributes2GrantedAuthoritiesMapper; +import org.springframework.security.core.authoritymapping.MappableAttributesRetriever; +import org.springframework.security.core.authoritymapping.SimpleAttributes2GrantedAuthoritiesMapper; +import org.springframework.security.core.authoritymapping.SimpleMappableAttributesRetriever; import org.springframework.security.web.authentication.preauth.PreAuthenticatedGrantedAuthoritiesWebAuthenticationDetails; import org.springframework.security.web.authentication.preauth.j2ee.J2eeBasedPreAuthenticatedWebAuthenticationDetailsSource;