瀏覽代碼

Renamed web.wrapper to web.servletapi. Added some package.html files.

Luke Taylor 16 年之前
父節點
當前提交
1042305cfe
共有 17 個文件被更改,包括 37 次插入16 次删除
  1. 1 1
      config/src/main/java/org/springframework/security/config/http/DefaultFilterChainValidator.java
  2. 1 1
      config/src/main/java/org/springframework/security/config/http/HttpConfigurationBuilder.java
  3. 1 1
      config/src/test/java/org/springframework/security/config/FilterChainProxyConfigTests.java
  4. 1 1
      config/src/test/java/org/springframework/security/config/http/HttpSecurityBeanDefinitionParserTests.java
  5. 2 2
      config/src/test/resources/org/springframework/security/util/filtertest-valid.xml
  6. 1 1
      itest/context/src/test/resources/filter-chain-performance-app-context.xml
  7. 2 2
      samples/preauth/src/main/webapp/WEB-INF/applicationContext-security.xml
  8. 5 0
      web/src/main/java/org/springframework/security/web/authentication/session/package.html
  9. 6 0
      web/src/main/java/org/springframework/security/web/authentication/ui/package.html
  10. 5 0
      web/src/main/java/org/springframework/security/web/authentication/www/package.html
  11. 4 2
      web/src/main/java/org/springframework/security/web/savedrequest/package.html
  12. 1 1
      web/src/main/java/org/springframework/security/web/servletapi/SecurityContextHolderAwareRequestFilter.java
  13. 1 1
      web/src/main/java/org/springframework/security/web/servletapi/SecurityContextHolderAwareRequestWrapper.java
  14. 0 0
      web/src/main/java/org/springframework/security/web/servletapi/package.html
  15. 1 1
      web/src/main/java/org/springframework/security/web/session/package.html
  16. 3 1
      web/src/test/java/org/springframework/security/web/servletapi/SecurityContextHolderAwareRequestFilterTests.java
  17. 2 1
      web/src/test/java/org/springframework/security/web/servletapi/SecurityContextHolderAwareRequestWrapperTests.java

+ 1 - 1
config/src/main/java/org/springframework/security/config/http/DefaultFilterChainValidator.java

@@ -19,8 +19,8 @@ import org.springframework.security.web.authentication.UsernamePasswordAuthentic
 import org.springframework.security.web.authentication.ui.DefaultLoginPageGeneratingFilter;
 import org.springframework.security.web.authentication.www.BasicProcessingFilter;
 import org.springframework.security.web.context.SecurityContextPersistenceFilter;
+import org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter;
 import org.springframework.security.web.session.SessionManagementFilter;
-import org.springframework.security.web.wrapper.SecurityContextHolderAwareRequestFilter;
 
 public class DefaultFilterChainValidator implements FilterChainProxy.FilterChainValidator {
     private Log logger = LogFactory.getLog(getClass());

+ 1 - 1
config/src/main/java/org/springframework/security/config/http/HttpConfigurationBuilder.java

@@ -42,11 +42,11 @@ import org.springframework.security.web.authentication.session.ConcurrentSession
 import org.springframework.security.web.authentication.session.SessionFixationProtectionStrategy;
 import org.springframework.security.web.context.HttpSessionSecurityContextRepository;
 import org.springframework.security.web.context.SecurityContextPersistenceFilter;
+import org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter;
 import org.springframework.security.web.session.ConcurrentSessionFilter;
 import org.springframework.security.web.session.SessionManagementFilter;
 import org.springframework.security.web.util.AntUrlPathMatcher;
 import org.springframework.security.web.util.UrlMatcher;
-import org.springframework.security.web.wrapper.SecurityContextHolderAwareRequestFilter;
 import org.springframework.util.StringUtils;
 import org.springframework.util.xml.DomUtils;
 import org.w3c.dom.Element;

+ 1 - 1
config/src/test/java/org/springframework/security/config/FilterChainProxyConfigTests.java

@@ -36,7 +36,7 @@ import org.springframework.mock.web.MockHttpServletResponse;
 import org.springframework.security.web.FilterChainProxy;
 import org.springframework.security.web.authentication.UsernamePasswordAuthenticationProcessingFilter;
 import org.springframework.security.web.context.SecurityContextPersistenceFilter;
-import org.springframework.security.web.wrapper.SecurityContextHolderAwareRequestFilter;
+import org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter;
 
 /**
  * Tests {@link FilterChainProxy}.

+ 1 - 1
config/src/test/java/org/springframework/security/config/http/HttpSecurityBeanDefinitionParserTests.java

@@ -69,9 +69,9 @@ import org.springframework.security.web.context.HttpSessionSecurityContextReposi
 import org.springframework.security.web.context.SecurityContextPersistenceFilter;
 import org.springframework.security.web.savedrequest.HttpSessionRequestCache;
 import org.springframework.security.web.savedrequest.RequestCacheAwareFilter;
+import org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter;
 import org.springframework.security.web.session.ConcurrentSessionFilter;
 import org.springframework.security.web.session.SessionManagementFilter;
-import org.springframework.security.web.wrapper.SecurityContextHolderAwareRequestFilter;
 import org.springframework.util.ReflectionUtils;
 
 /**

+ 2 - 2
config/src/test/resources/org/springframework/security/util/filtertest-valid.xml

@@ -24,9 +24,9 @@
     xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
 http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-2.0.xsd">
 
-    <bean id="mockFilter" class="org.springframework.security.web.wrapper.SecurityContextHolderAwareRequestFilter"/>
+    <bean id="mockFilter" class="org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter"/>
 
-    <bean id="mockFilter2" class="org.springframework.security.web.wrapper.SecurityContextHolderAwareRequestFilter"/>
+    <bean id="mockFilter2" class="org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter"/>
 
     <!-- These are just here so we have filters of a specific type to check the ordering is as expected -->
     <bean id="sif" class="org.springframework.security.web.context.SecurityContextPersistenceFilter"/>

+ 1 - 1
itest/context/src/test/resources/filter-chain-performance-app-context.xml

@@ -52,7 +52,7 @@
         <property name="authenticationManager" ref="authenticationManager"/>
     </bean>
 
-    <bean id="scharf" class="org.springframework.security.web.wrapper.SecurityContextHolderAwareRequestFilter" />
+    <bean id="scharf" class="org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter" />
 
     <bean id="preAuthenticatedProcessingFilterEntryPoint"
             class="org.springframework.security.web.authentication.Http403ForbiddenEntryPoint"/>

+ 2 - 2
samples/preauth/src/main/webapp/WEB-INF/applicationContext-security.xml

@@ -88,8 +88,8 @@
 
     <bean id="roleVoter" class="org.springframework.security.access.vote.RoleVoter"/>
 
-    <bean id="securityContextHolderAwareRequestFilter" class="org.springframework.security.web.wrapper.SecurityContextHolderAwareRequestFilter">
-        <property name="wrapperClass" value="org.springframework.security.web.wrapper.SecurityContextHolderAwareRequestWrapper"/>
+    <bean id="securityContextHolderAwareRequestFilter" class="org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter">
+        <property name="wrapperClass" value="org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestWrapper"/>
     </bean>
 
 </beans>

+ 5 - 0
web/src/main/java/org/springframework/security/web/authentication/session/package.html

@@ -0,0 +1,5 @@
+<html>
+<body>
+Strategy interface and implementations for handling session-related behaviour for a newly authenticated user.
+</body>
+</html>

+ 6 - 0
web/src/main/java/org/springframework/security/web/authentication/ui/package.html

@@ -0,0 +1,6 @@
+<html>
+<body>
+Authentication user-interface rendering code. Used to conveniently create an appropriate login page when using namespace
+configuration without defining a login page URL.
+</body>
+</html>

+ 5 - 0
web/src/main/java/org/springframework/security/web/authentication/www/package.html

@@ -0,0 +1,5 @@
+<html>
+<body>
+Contains WWW-Authenticate based authentication mechanism implementations: Basic and Digest authentication.
+</body>
+</html>

+ 4 - 2
web/src/main/java/org/springframework/security/web/savedrequest/package.html

@@ -1,6 +1,8 @@
 <html>
 <body>
-Stores a <code>HttpServletRequest</code> so that it can subsequently be emulated by the
-<code>SavedRequestAwareWrapper</code>.
+Classes related top the caching of an <code>HttpServletRequest</code> which requires authentication. While the user is
+logging in, the request is cached (using the RequestCache implementation) by the ExceptionTranslationFilter.
+Once the user has been authenticated, the original request is restored following a redirect to a matching URL, and the
+RequestCache is queried to obtain the original (matching) request.
 </body>
 </html>

+ 1 - 1
web/src/main/java/org/springframework/security/web/wrapper/SecurityContextHolderAwareRequestFilter.java → web/src/main/java/org/springframework/security/web/servletapi/SecurityContextHolderAwareRequestFilter.java

@@ -13,7 +13,7 @@
  * limitations under the License.
  */
 
-package org.springframework.security.web.wrapper;
+package org.springframework.security.web.servletapi;
 
 import java.io.IOException;
 

+ 1 - 1
web/src/main/java/org/springframework/security/web/wrapper/SecurityContextHolderAwareRequestWrapper.java → web/src/main/java/org/springframework/security/web/servletapi/SecurityContextHolderAwareRequestWrapper.java

@@ -13,7 +13,7 @@
  * limitations under the License.
  */
 
-package org.springframework.security.web.wrapper;
+package org.springframework.security.web.servletapi;
 
 
 import java.security.Principal;

+ 0 - 0
web/src/main/java/org/springframework/security/web/wrapper/package.html → web/src/main/java/org/springframework/security/web/servletapi/package.html


+ 1 - 1
web/src/main/java/org/springframework/security/web/session/package.html

@@ -1,5 +1,5 @@
 <html>
 <body>
-HttpSession events and publisher classes.
+Session management filters, HttpSession events and publisher classes.
 </body>
 </html>

+ 3 - 1
web/src/test/java/org/springframework/security/web/wrapper/SecurityContextHolderAwareRequestFilterTests.java → web/src/test/java/org/springframework/security/web/servletapi/SecurityContextHolderAwareRequestFilterTests.java

@@ -13,7 +13,7 @@
  * limitations under the License.
  */
 
-package org.springframework.security.web.wrapper;
+package org.springframework.security.web.servletapi;
 
 import javax.servlet.FilterChain;
 import javax.servlet.http.HttpServletResponse;
@@ -24,6 +24,8 @@ import org.jmock.integration.junit4.JUnit4Mockery;
 import org.junit.Test;
 import org.springframework.mock.web.MockHttpServletRequest;
 import org.springframework.mock.web.MockHttpServletResponse;
+import org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter;
+import org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestWrapper;
 
 
 /**

+ 2 - 1
web/src/test/java/org/springframework/security/web/wrapper/SecurityContextHolderAwareRequestWrapperTests.java → web/src/test/java/org/springframework/security/web/servletapi/SecurityContextHolderAwareRequestWrapperTests.java

@@ -13,7 +13,7 @@
  * limitations under the License.
  */
 
-package org.springframework.security.web.wrapper;
+package org.springframework.security.web.servletapi;
 
 import junit.framework.TestCase;
 
@@ -23,6 +23,7 @@ import org.springframework.security.core.Authentication;
 import org.springframework.security.core.authority.AuthorityUtils;
 import org.springframework.security.core.context.SecurityContextHolder;
 import org.springframework.security.core.userdetails.User;
+import org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestWrapper;
 
 /**
  * Tests {@link SecurityContextHolderAwareRequestWrapper}.