Browse Source

SEC-1536: moved web.authentication.jaas to web.jaasapi

Renamed org.springframework.security.web.authentication.jaas to org.springframework.security.web.jaasapi to be better aligned with org.springframework.security.web.servletapi, added package-info.java, and removed trailing whitespaces
Rob Winch 15 years ago
parent
commit
ee12d54bec

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

@@ -17,10 +17,10 @@ import org.springframework.security.web.access.intercept.FilterSecurityIntercept
 import org.springframework.security.web.authentication.AnonymousAuthenticationFilter;
 import org.springframework.security.web.authentication.LoginUrlAuthenticationEntryPoint;
 import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter;
-import org.springframework.security.web.authentication.jaas.JaasApiIntegrationFilter;
 import org.springframework.security.web.authentication.ui.DefaultLoginPageGeneratingFilter;
 import org.springframework.security.web.authentication.www.BasicAuthenticationFilter;
 import org.springframework.security.web.context.SecurityContextPersistenceFilter;
+import org.springframework.security.web.jaasapi.JaasApiIntegrationFilter;
 import org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter;
 import org.springframework.security.web.session.SessionManagementFilter;
 

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

@@ -34,12 +34,12 @@ import org.springframework.security.web.access.expression.WebExpressionVoter;
 import org.springframework.security.web.access.intercept.DefaultFilterInvocationSecurityMetadataSource;
 import org.springframework.security.web.access.intercept.FilterSecurityInterceptor;
 import org.springframework.security.web.authentication.SimpleUrlAuthenticationFailureHandler;
-import org.springframework.security.web.authentication.jaas.JaasApiIntegrationFilter;
 import org.springframework.security.web.authentication.session.ConcurrentSessionControlStrategy;
 import org.springframework.security.web.authentication.session.SessionFixationProtectionStrategy;
 import org.springframework.security.web.context.HttpSessionSecurityContextRepository;
 import org.springframework.security.web.context.NullSecurityContextRepository;
 import org.springframework.security.web.context.SecurityContextPersistenceFilter;
+import org.springframework.security.web.jaasapi.JaasApiIntegrationFilter;
 import org.springframework.security.web.savedrequest.HttpSessionRequestCache;
 import org.springframework.security.web.savedrequest.NullRequestCache;
 import org.springframework.security.web.savedrequest.RequestCacheAwareFilter;

+ 1 - 1
config/src/test/groovy/org/springframework/security/config/http/MiscHttpConfigTests.groovy

@@ -30,7 +30,6 @@ import org.springframework.security.web.access.intercept.FilterSecurityIntercept
 import org.springframework.security.web.authentication.AnonymousAuthenticationFilter
 import org.springframework.security.web.authentication.LoginUrlAuthenticationEntryPoint
 import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter
-import org.springframework.security.web.authentication.jaas.JaasApiIntegrationFilter
 import org.springframework.security.web.authentication.logout.LogoutFilter
 import org.springframework.security.web.authentication.logout.SimpleUrlLogoutSuccessHandler
 import org.springframework.security.web.authentication.preauth.x509.X509AuthenticationFilter
@@ -39,6 +38,7 @@ import org.springframework.security.web.authentication.www.BasicAuthenticationEn
 import org.springframework.security.web.authentication.www.BasicAuthenticationFilter
 import org.springframework.security.web.context.HttpSessionSecurityContextRepository
 import org.springframework.security.web.context.SecurityContextPersistenceFilter
+import org.springframework.security.web.jaasapi.JaasApiIntegrationFilter
 import org.springframework.security.web.savedrequest.HttpSessionRequestCache
 import org.springframework.security.web.savedrequest.RequestCacheAwareFilter
 import org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter

+ 5 - 5
web/src/main/java/org/springframework/security/web/authentication/jaas/JaasApiIntegrationFilter.java → web/src/main/java/org/springframework/security/web/jaasapi/JaasApiIntegrationFilter.java

@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.springframework.security.web.authentication.jaas;
+package org.springframework.security.web.jaasapi;
 
 import java.io.IOException;
 import java.security.PrivilegedActionException;
@@ -44,7 +44,7 @@ import org.springframework.web.filter.GenericFilterBean;
  * simultaneously. This is useful when integrating with code that requires a
  * JAAS <code>Subject</code> to be populated.
  * </p>
- * 
+ *
  * @author Rob Winch
  * @see #doFilter(ServletRequest, ServletResponse, FilterChain)
  * @see #obtainSubject(ServletRequest)
@@ -61,7 +61,7 @@ public class JaasApiIntegrationFilter extends GenericFilterBean {
      * Attempts to obtain and run as a JAAS <code>Subject</code> using
      * {@link #obtainSubject(ServletRequest)}.
      * </p>
-     * 
+     *
      * <p>
      * If the <code>Subject</code> is <code>null</code> and
      * <tt>createEmptySubject</tt> is <code>true</code>, an empty, writeable
@@ -120,7 +120,7 @@ public class JaasApiIntegrationFilter extends GenericFilterBean {
      * the <code>Subject</code> is returned from it. Otherwise,
      * <code>null</code> is returned.
      * </p>
-     * 
+     *
      * @param request
      *            the current <code>ServletRequest</code>
      * @return the Subject to run as or <code>null</code> if no
@@ -153,7 +153,7 @@ public class JaasApiIntegrationFilter extends GenericFilterBean {
      * and {@link #obtainSubject(ServletRequest)} returns <code>null</code>, an
      * empty, writeable <code>Subject</code> is created instead. Otherwise no
      * <code>Subject</code> is used. The default is <code>false</code>.
-     * 
+     *
      * @param createEmptySubject
      *            the new value
      */

+ 6 - 0
web/src/main/java/org/springframework/security/web/jaasapi/package-info.java

@@ -0,0 +1,6 @@
+/**
+ * Makes a JAAS Subject available as the current Subject.
+ * <p>
+ * To use, simply add the {@code JaasApiIntegrationFilter} to the Spring Security filter chain.
+ */
+package org.springframework.security.web.jaasapi;

+ 3 - 2
web/src/test/java/org/springframework/security/web/authentication/jaas/JaasApiIntegrationFilterTest.java → web/src/test/java/org/springframework/security/web/jaasapi/JaasApiIntegrationFilterTest.java

@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.springframework.security.web.authentication.jaas;
+package org.springframework.security.web.jaasapi;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
@@ -50,10 +50,11 @@ import org.springframework.security.authentication.jaas.TestLoginModule;
 import org.springframework.security.core.Authentication;
 import org.springframework.security.core.authority.AuthorityUtils;
 import org.springframework.security.core.context.SecurityContextHolder;
+import org.springframework.security.web.jaasapi.JaasApiIntegrationFilter;
 
 /**
  * Tests the JaasApiIntegrationFilter.
- * 
+ *
  * @author Rob Winch
  */
 public class JaasApiIntegrationFilterTest {