shiro-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jha...@apache.org
Subject svn commit: r749350 - in /incubator/jsecurity/trunk: ./ core/src/ core/src/org/jsecurity/authc/pam/ core/src/org/jsecurity/mgt/ core/src/org/jsecurity/realm/ core/src/org/jsecurity/realm/jdbc/ core/src/org/jsecurity/realm/text/ core/test/ core/test/org...
Date Mon, 02 Mar 2009 16:39:39 GMT
Author: jhaile
Date: Mon Mar  2 16:39:37 2009
New Revision: 749350

URL: http://svn.apache.org/viewvc?rev=749350&view=rev
Log:
Merged changes from the import branch that were accidentally committed into the trunk.

Added:
    incubator/jsecurity/trunk/core/src/org/jsecurity/authc/pam/AllSuccessfulStrategy.java
      - copied unchanged from r749338, incubator/jsecurity/import/trunk/src/org/jsecurity/authc/pam/AllSuccessfulStrategy.java
    incubator/jsecurity/trunk/core/src/org/jsecurity/authc/pam/AtLeastOneSuccessfulStrategy.java
      - copied unchanged from r749338, incubator/jsecurity/import/trunk/src/org/jsecurity/authc/pam/AtLeastOneSuccessfulStrategy.java
    incubator/jsecurity/trunk/core/src/org/jsecurity/authc/pam/AuthenticationStrategy.java
      - copied unchanged from r749338, incubator/jsecurity/import/trunk/src/org/jsecurity/authc/pam/AuthenticationStrategy.java
    incubator/jsecurity/trunk/core/src/org/jsecurity/authc/pam/FirstSuccessfulStrategy.java
      - copied unchanged from r749338, incubator/jsecurity/import/trunk/src/org/jsecurity/authc/pam/FirstSuccessfulStrategy.java
    incubator/jsecurity/trunk/core/test/org/jsecurity/authc/pam/AllSuccessfulStrategyTest.java
      - copied unchanged from r749341, incubator/jsecurity/import/trunk/test/org/jsecurity/authc/pam/AllSuccessfulStrategyTest.java
    incubator/jsecurity/trunk/samples/spring-hibernate/src/org/jsecurity/samples/sprhib/dao/
      - copied from r749338, incubator/jsecurity/import/trunk/samples/spring-hibernate/src/org/jsecurity/samples/sprhib/dao/
    incubator/jsecurity/trunk/samples/spring-hibernate/src/org/jsecurity/samples/sprhib/dao/BootstrapDataPopulator.java
      - copied unchanged from r749338, incubator/jsecurity/import/trunk/samples/spring-hibernate/src/org/jsecurity/samples/sprhib/dao/BootstrapDataPopulator.java
    incubator/jsecurity/trunk/samples/spring-hibernate/src/org/jsecurity/samples/sprhib/dao/HibernateDao.java
      - copied unchanged from r749338, incubator/jsecurity/import/trunk/samples/spring-hibernate/src/org/jsecurity/samples/sprhib/dao/HibernateDao.java
    incubator/jsecurity/trunk/samples/spring-hibernate/src/org/jsecurity/samples/sprhib/dao/HibernateUserDAO.java
      - copied unchanged from r749338, incubator/jsecurity/import/trunk/samples/spring-hibernate/src/org/jsecurity/samples/sprhib/dao/HibernateUserDAO.java
    incubator/jsecurity/trunk/samples/spring-hibernate/src/org/jsecurity/samples/sprhib/dao/UserDAO.java
      - copied unchanged from r749338, incubator/jsecurity/import/trunk/samples/spring-hibernate/src/org/jsecurity/samples/sprhib/dao/UserDAO.java
    incubator/jsecurity/trunk/samples/spring-hibernate/src/org/jsecurity/samples/sprhib/model/
      - copied from r749338, incubator/jsecurity/import/trunk/samples/spring-hibernate/src/org/jsecurity/samples/sprhib/model/
    incubator/jsecurity/trunk/samples/spring-hibernate/src/org/jsecurity/samples/sprhib/model/Role.java
      - copied unchanged from r749338, incubator/jsecurity/import/trunk/samples/spring-hibernate/src/org/jsecurity/samples/sprhib/model/Role.java
    incubator/jsecurity/trunk/samples/spring-hibernate/src/org/jsecurity/samples/sprhib/model/User.java
      - copied unchanged from r749338, incubator/jsecurity/import/trunk/samples/spring-hibernate/src/org/jsecurity/samples/sprhib/model/User.java
    incubator/jsecurity/trunk/samples/spring-hibernate/src/org/jsecurity/samples/sprhib/security/SampleRealm.java
      - copied unchanged from r749338, incubator/jsecurity/import/trunk/samples/spring-hibernate/src/org/jsecurity/samples/sprhib/security/SampleRealm.java
    incubator/jsecurity/trunk/samples/spring-hibernate/src/org/jsecurity/samples/sprhib/service/
      - copied from r749338, incubator/jsecurity/import/trunk/samples/spring-hibernate/src/org/jsecurity/samples/sprhib/service/
    incubator/jsecurity/trunk/samples/spring-hibernate/src/org/jsecurity/samples/sprhib/service/DefaultUserService.java
      - copied unchanged from r749338, incubator/jsecurity/import/trunk/samples/spring-hibernate/src/org/jsecurity/samples/sprhib/service/DefaultUserService.java
    incubator/jsecurity/trunk/samples/spring-hibernate/src/org/jsecurity/samples/sprhib/service/UserService.java
      - copied unchanged from r749338, incubator/jsecurity/import/trunk/samples/spring-hibernate/src/org/jsecurity/samples/sprhib/service/UserService.java
    incubator/jsecurity/trunk/samples/spring-hibernate/src/org/jsecurity/samples/sprhib/web/
      - copied from r749338, incubator/jsecurity/import/trunk/samples/spring-hibernate/src/org/jsecurity/samples/sprhib/web/
    incubator/jsecurity/trunk/samples/spring-hibernate/src/org/jsecurity/samples/sprhib/web/CurrentUserInterceptor.java
      - copied unchanged from r749338, incubator/jsecurity/import/trunk/samples/spring-hibernate/src/org/jsecurity/samples/sprhib/web/CurrentUserInterceptor.java
    incubator/jsecurity/trunk/samples/spring-hibernate/src/org/jsecurity/samples/sprhib/web/EditUserCommand.java
      - copied unchanged from r749338, incubator/jsecurity/import/trunk/samples/spring-hibernate/src/org/jsecurity/samples/sprhib/web/EditUserCommand.java
    incubator/jsecurity/trunk/samples/spring-hibernate/src/org/jsecurity/samples/sprhib/web/EditUserValidator.java
      - copied unchanged from r749338, incubator/jsecurity/import/trunk/samples/spring-hibernate/src/org/jsecurity/samples/sprhib/web/EditUserValidator.java
    incubator/jsecurity/trunk/samples/spring-hibernate/src/org/jsecurity/samples/sprhib/web/HomeController.java
      - copied unchanged from r749338, incubator/jsecurity/import/trunk/samples/spring-hibernate/src/org/jsecurity/samples/sprhib/web/HomeController.java
    incubator/jsecurity/trunk/samples/spring-hibernate/src/org/jsecurity/samples/sprhib/web/LoginCommand.java
      - copied unchanged from r749338, incubator/jsecurity/import/trunk/samples/spring-hibernate/src/org/jsecurity/samples/sprhib/web/LoginCommand.java
    incubator/jsecurity/trunk/samples/spring-hibernate/src/org/jsecurity/samples/sprhib/web/LoginValidator.java
      - copied unchanged from r749338, incubator/jsecurity/import/trunk/samples/spring-hibernate/src/org/jsecurity/samples/sprhib/web/LoginValidator.java
    incubator/jsecurity/trunk/samples/spring-hibernate/src/org/jsecurity/samples/sprhib/web/ManageUsersController.java
      - copied unchanged from r749338, incubator/jsecurity/import/trunk/samples/spring-hibernate/src/org/jsecurity/samples/sprhib/web/ManageUsersController.java
    incubator/jsecurity/trunk/samples/spring-hibernate/src/org/jsecurity/samples/sprhib/web/SecurityController.java
      - copied unchanged from r749338, incubator/jsecurity/import/trunk/samples/spring-hibernate/src/org/jsecurity/samples/sprhib/web/SecurityController.java
    incubator/jsecurity/trunk/samples/spring-hibernate/src/org/jsecurity/samples/sprhib/web/SignupCommand.java
      - copied unchanged from r749338, incubator/jsecurity/import/trunk/samples/spring-hibernate/src/org/jsecurity/samples/sprhib/web/SignupCommand.java
    incubator/jsecurity/trunk/samples/spring-hibernate/src/org/jsecurity/samples/sprhib/web/SignupController.java
      - copied unchanged from r749338, incubator/jsecurity/import/trunk/samples/spring-hibernate/src/org/jsecurity/samples/sprhib/web/SignupController.java
    incubator/jsecurity/trunk/samples/spring-hibernate/src/org/jsecurity/samples/sprhib/web/SignupValidator.java
      - copied unchanged from r749338, incubator/jsecurity/import/trunk/samples/spring-hibernate/src/org/jsecurity/samples/sprhib/web/SignupValidator.java
    incubator/jsecurity/trunk/samples/spring-hibernate/web/
      - copied from r749338, incubator/jsecurity/import/trunk/samples/spring-hibernate/web/
    incubator/jsecurity/trunk/samples/spring-hibernate/web/WEB-INF/
      - copied from r749338, incubator/jsecurity/import/trunk/samples/spring-hibernate/web/WEB-INF/
    incubator/jsecurity/trunk/samples/spring-hibernate/web/WEB-INF/applicationContext.xml
      - copied unchanged from r749338, incubator/jsecurity/import/trunk/samples/spring-hibernate/web/WEB-INF/applicationContext.xml
    incubator/jsecurity/trunk/samples/spring-hibernate/web/WEB-INF/classes/
      - copied from r749338, incubator/jsecurity/import/trunk/samples/spring-hibernate/web/WEB-INF/classes/
    incubator/jsecurity/trunk/samples/spring-hibernate/web/WEB-INF/classes/ehcache.xml
      - copied, changed from r749338, incubator/jsecurity/import/trunk/samples/spring-hibernate/web/WEB-INF/classes/ehcache.xml
    incubator/jsecurity/trunk/samples/spring-hibernate/web/WEB-INF/classes/hibernate.cfg.xml
      - copied unchanged from r749338, incubator/jsecurity/import/trunk/samples/spring-hibernate/web/WEB-INF/classes/hibernate.cfg.xml
    incubator/jsecurity/trunk/samples/spring-hibernate/web/WEB-INF/classes/log4j.properties
      - copied unchanged from r749338, incubator/jsecurity/import/trunk/samples/spring-hibernate/web/WEB-INF/classes/log4j.properties
    incubator/jsecurity/trunk/samples/spring-hibernate/web/WEB-INF/jsp/
      - copied from r749338, incubator/jsecurity/import/trunk/samples/spring-hibernate/web/WEB-INF/jsp/
    incubator/jsecurity/trunk/samples/spring-hibernate/web/WEB-INF/jsp/editUser.jsp
      - copied unchanged from r749338, incubator/jsecurity/import/trunk/samples/spring-hibernate/web/WEB-INF/jsp/editUser.jsp
    incubator/jsecurity/trunk/samples/spring-hibernate/web/WEB-INF/jsp/home.jsp
      - copied unchanged from r749338, incubator/jsecurity/import/trunk/samples/spring-hibernate/web/WEB-INF/jsp/home.jsp
    incubator/jsecurity/trunk/samples/spring-hibernate/web/WEB-INF/jsp/login.jsp
      - copied unchanged from r749338, incubator/jsecurity/import/trunk/samples/spring-hibernate/web/WEB-INF/jsp/login.jsp
    incubator/jsecurity/trunk/samples/spring-hibernate/web/WEB-INF/jsp/manageUsers.jsp
      - copied unchanged from r749338, incubator/jsecurity/import/trunk/samples/spring-hibernate/web/WEB-INF/jsp/manageUsers.jsp
    incubator/jsecurity/trunk/samples/spring-hibernate/web/WEB-INF/jsp/signup.jsp
      - copied unchanged from r749338, incubator/jsecurity/import/trunk/samples/spring-hibernate/web/WEB-INF/jsp/signup.jsp
    incubator/jsecurity/trunk/samples/spring-hibernate/web/WEB-INF/sprhib-servlet.xml
      - copied unchanged from r749338, incubator/jsecurity/import/trunk/samples/spring-hibernate/web/WEB-INF/sprhib-servlet.xml
    incubator/jsecurity/trunk/samples/spring-hibernate/web/WEB-INF/web.xml
      - copied unchanged from r749338, incubator/jsecurity/import/trunk/samples/spring-hibernate/web/WEB-INF/web.xml
    incubator/jsecurity/trunk/samples/spring-hibernate/web/index.jsp
      - copied unchanged from r749338, incubator/jsecurity/import/trunk/samples/spring-hibernate/web/index.jsp
    incubator/jsecurity/trunk/samples/spring-hibernate/web/styles/
      - copied from r749338, incubator/jsecurity/import/trunk/samples/spring-hibernate/web/styles/
    incubator/jsecurity/trunk/samples/spring-hibernate/web/styles/sample.css
      - copied unchanged from r749338, incubator/jsecurity/import/trunk/samples/spring-hibernate/web/styles/sample.css
    incubator/jsecurity/trunk/samples/spring-hibernate/web/unauthorized.jsp
      - copied unchanged from r749338, incubator/jsecurity/import/trunk/samples/spring-hibernate/web/unauthorized.jsp
Removed:
    incubator/jsecurity/trunk/core/src/org/jsecurity/authc/pam/AllSuccessfulModularAuthenticationStrategy.java
    incubator/jsecurity/trunk/core/src/org/jsecurity/authc/pam/AtLeastOneSuccessfulModularAuthenticationStrategy.java
    incubator/jsecurity/trunk/core/src/org/jsecurity/authc/pam/FirstSuccessfulAuthenticationStrategy.java
    incubator/jsecurity/trunk/core/src/org/jsecurity/authc/pam/ModularAuthenticationStrategy.java
    incubator/jsecurity/trunk/core/test/org/jsecurity/authc/pam/AllSuccessfulModularAuthenticationStrategyTest.java
    incubator/jsecurity/trunk/samples/spring-hibernate/src/org/jsecurity/samples/sprhib/eis/
    incubator/jsecurity/trunk/samples/spring-hibernate/src/org/jsecurity/samples/sprhib/entity/
    incubator/jsecurity/trunk/samples/spring-hibernate/src/org/jsecurity/samples/sprhib/party/
    incubator/jsecurity/trunk/samples/spring-hibernate/src/org/jsecurity/samples/sprhib/security/DefaultRealm.java
    incubator/jsecurity/trunk/samples/spring-hibernate/src/org/jsecurity/samples/sprhib/security/Role.java
Modified:
    incubator/jsecurity/trunk/common.ant.xml
    incubator/jsecurity/trunk/core/src/   (props changed)
    incubator/jsecurity/trunk/core/src/org/jsecurity/authc/pam/AbstractAuthenticationStrategy.java
    incubator/jsecurity/trunk/core/src/org/jsecurity/authc/pam/ModularRealmAuthenticator.java
    incubator/jsecurity/trunk/core/src/org/jsecurity/authc/pam/UnsupportedTokenException.java
    incubator/jsecurity/trunk/core/src/org/jsecurity/authc/pam/package-info.java
    incubator/jsecurity/trunk/core/src/org/jsecurity/mgt/AuthenticatingSecurityManager.java
    incubator/jsecurity/trunk/core/src/org/jsecurity/realm/SimpleAccountRealm.java
    incubator/jsecurity/trunk/core/src/org/jsecurity/realm/jdbc/JdbcRealm.java
    incubator/jsecurity/trunk/core/src/org/jsecurity/realm/text/TextConfigurationRealm.java
    incubator/jsecurity/trunk/core/test/   (props changed)
    incubator/jsecurity/trunk/ivy.xml   (contents, props changed)
    incubator/jsecurity/trunk/samples/spring-hibernate/   (props changed)
    incubator/jsecurity/trunk/samples/spring-hibernate/build.xml   (contents, props changed)
    incubator/jsecurity/trunk/web/src/org/jsecurity/web/   (props changed)
    incubator/jsecurity/trunk/web/src/org/jsecurity/web/attr/CookieAttribute.java
    incubator/jsecurity/trunk/web/src/org/jsecurity/web/filter/PathConfigProcessor.java
    incubator/jsecurity/trunk/web/src/org/jsecurity/web/filter/PathMatchingFilter.java
    incubator/jsecurity/trunk/web/test/org/jsecurity/web/   (props changed)
    incubator/jsecurity/trunk/web/test/org/jsecurity/web/attr/CookieAttributeTest.java

Modified: incubator/jsecurity/trunk/common.ant.xml
URL: http://svn.apache.org/viewvc/incubator/jsecurity/trunk/common.ant.xml?rev=749350&r1=749349&r2=749350&view=diff
==============================================================================
--- incubator/jsecurity/trunk/common.ant.xml (original)
+++ incubator/jsecurity/trunk/common.ant.xml Mon Mar  2 16:39:37 2009
@@ -95,9 +95,10 @@
                 <fileset dir="@{srcdir}">
                     <include name="**/*"/>
                     <exclude name="**/*.java"/>
+                    <exclude name="**/*.tld"/>
                 </fileset>
             </copy>
-            <copy todir="@{destdir}" preservelastmodified="true">
+            <copy todir="@{destdir}/META-INF" flatten="true" preservelastmodified="true">
                 <fileset dir="@{srcdir}">
                     <include name="**/*.tld"/>
                 </fileset>
@@ -120,6 +121,7 @@
         <jar jarfile="${dist.jar}">
             <fileset dir="${classes.dir}">
                 <include name="**"/>
+                <exclude name="META-INF/**"/>
             </fileset>
             <metainf dir="${classes.dir}/META-INF">
                 <include name="**"/>

Propchange: incubator/jsecurity/trunk/core/src/
------------------------------------------------------------------------------
    svn:mergeinfo = /incubator/jsecurity/import/trunk/src:711429-749338

Modified: incubator/jsecurity/trunk/core/src/org/jsecurity/authc/pam/AbstractAuthenticationStrategy.java
URL: http://svn.apache.org/viewvc/incubator/jsecurity/trunk/core/src/org/jsecurity/authc/pam/AbstractAuthenticationStrategy.java?rev=749350&r1=749349&r2=749350&view=diff
==============================================================================
--- incubator/jsecurity/trunk/core/src/org/jsecurity/authc/pam/AbstractAuthenticationStrategy.java (original)
+++ incubator/jsecurity/trunk/core/src/org/jsecurity/authc/pam/AbstractAuthenticationStrategy.java Mon Mar  2 16:39:37 2009
@@ -24,14 +24,14 @@
 import java.util.Collection;
 
 /**
- * Abstract base implementation for JSecurity's concrete <code>ModularAuthenticationStrategy</code>
+ * Abstract base implementation for JSecurity's concrete <code>AuthenticationStrategy</code>
  * implementations.
  *
  * @author Jeremy Haile
  * @author Les Hazlewood
  * @since 0.9
  */
-public abstract class AbstractAuthenticationStrategy implements ModularAuthenticationStrategy {
+public abstract class AbstractAuthenticationStrategy implements AuthenticationStrategy {
 
     /**
      * Simply returns <code>new {@link SimpleAuthenticationInfo SimpleAuthenticationInfo}();</code>, which supports

Modified: incubator/jsecurity/trunk/core/src/org/jsecurity/authc/pam/ModularRealmAuthenticator.java
URL: http://svn.apache.org/viewvc/incubator/jsecurity/trunk/core/src/org/jsecurity/authc/pam/ModularRealmAuthenticator.java?rev=749350&r1=749349&r2=749350&view=diff
==============================================================================
--- incubator/jsecurity/trunk/core/src/org/jsecurity/authc/pam/ModularRealmAuthenticator.java (original)
+++ incubator/jsecurity/trunk/core/src/org/jsecurity/authc/pam/ModularRealmAuthenticator.java Mon Mar  2 16:39:37 2009
@@ -46,7 +46,7 @@
  * authenticator allows customized behavior for interpreting what happens when interacting with multiple realms - for
  * example, you might require all realms to be successful during the attempt, or perhaps only at least one must be
  * successful, or some other interpretation.  This customized behavior can be performed via the use of a
- * {@link #setModularAuthenticationStrategy(ModularAuthenticationStrategy) ModularAuthenticationStrategy}, which
+ * {@link #setAuthenticationStrategy(AuthenticationStrategy) AuthenticationStrategy}, which
  * you can inject as a property of this class.
  *
  * <p>The strategy object provides callback methods that allow you to
@@ -54,13 +54,13 @@
  * in a mult-realm scenario, the strategy object is only utilized when more than one Realm is configured.
  *
  * <p>For greater security in a multi-realm configuration, unless overridden, the default implementation is the
- * {@link AllSuccessfulModularAuthenticationStrategy AllSuccessfulModularAuthenticationStrategy}
+ * {@link AllSuccessfulStrategy AllSuccessfulAuthenticationStrategy}
  *
  * @author Jeremy Haile
  * @author Les Hazlewood
  * @see #setRealms
- * @see AllSuccessfulModularAuthenticationStrategy
- * @see AtLeastOneSuccessfulModularAuthenticationStrategy
+ * @see AllSuccessfulStrategy
+ * @see AtLeastOneSuccessfulStrategy
  * @since 0.1
  */
 public class ModularRealmAuthenticator extends AbstractAuthenticator {
@@ -81,27 +81,27 @@
     /**
      * The authentication strategy to use during authentication attempts.
      */
-    private ModularAuthenticationStrategy modularAuthenticationStrategy;
+    private AuthenticationStrategy authenticationStrategy;
 
     /*--------------------------------------------
     |         C O N S T R U C T O R S           |
     ============================================*/
     /**
      * Default no-argument constructor which
-     * {@link #setModularAuthenticationStrategy(ModularAuthenticationStrategy) enables}  a
-     * {@link org.jsecurity.authc.pam.AllSuccessfulModularAuthenticationStrategy AllSuccessfulModularAuthenticationStrategy}
+     * {@link #setAuthenticationStrategy(AuthenticationStrategy) enables}  a
+     * {@link AllSuccessfulStrategy AllSuccessfulAuthenticationStrategy}
      * by default.
      */
     public ModularRealmAuthenticator() {
-        ModularAuthenticationStrategy strategy = new AllSuccessfulModularAuthenticationStrategy();
-        setModularAuthenticationStrategy(strategy);
+        AuthenticationStrategy strategy = new AllSuccessfulStrategy();
+        setAuthenticationStrategy(strategy);
     }
 
     /**
      * Constructor which initializes this <code>Authenticator</code> with a single realm to use during
      * an authentiation attempt.  Because
-     * this would set a single realm, no {@link #setModularAuthenticationStrategy(ModularAuthenticationStrategy)
-     * modularAuthenticationStrategy} would be used during authentication attempts.
+     * this would set a single realm, no {@link #setAuthenticationStrategy(AuthenticationStrategy)
+     * AuthenticationStrategy} would be used during authentication attempts.
      *
      * @param realm the realm to consult during an authentication attempt.
      */
@@ -113,7 +113,7 @@
      * Constructor which initializes this <code>Authenticator</code> with multiple realms that will be
      * consulted during an authentication attempt, effectively enabling PAM (Pluggable Authentication Module)
      * behavior according to the configured
-     * {@link #setModularAuthenticationStrategy(ModularAuthenticationStrategy) ModularAuthenticationStrategy}.
+     * {@link #setAuthenticationStrategy(AuthenticationStrategy) AuthenticationStrategy}.
      *
      * @param realms the realms to consult during an authentication attempt.
      */
@@ -155,29 +155,29 @@
     }
 
     /**
-     * Returns the <tt>ModularAuthenticationStrategy</tt> utilized by this modular authenticator during a multi-realm
+     * Returns the <tt>AuthenticationStrategy</tt> utilized by this modular authenticator during a multi-realm
      * log-in attempt.  This object is only used when two or more Realms are configured.
      *
      * <p>Unless overridden by
-     * the {@link #setModularAuthenticationStrategy(ModularAuthenticationStrategy)} method, the default implementation
-     * is the {@link AllSuccessfulModularAuthenticationStrategy}.
+     * the {@link #setAuthenticationStrategy(AuthenticationStrategy)} method, the default implementation
+     * is the {@link AllSuccessfulStrategy}.
      *
-     * @return the <tt>ModularAuthenticationStrategy</tt> utilized by this modular authenticator during a log-in attempt.
+     * @return the <tt>AuthenticationStrategy</tt> utilized by this modular authenticator during a log-in attempt.
      * @since 0.2
      */
-    public ModularAuthenticationStrategy getModularAuthenticationStrategy() {
-        return modularAuthenticationStrategy;
+    public AuthenticationStrategy getAuthenticationStrategy() {
+        return authenticationStrategy;
     }
 
     /**
-     * Allows overriding the default <tt>ModularAuthenticationStrategy</tt> utilized during multi-realm log-in attempts.
+     * Allows overriding the default <tt>AuthenticationStrategy</tt> utilized during multi-realm log-in attempts.
      * This object is only used when two or more Realms are configured.
      *
-     * @param modularAuthenticationStrategy the strategy implementation to use during log-in attempts.
+     * @param authenticationStrategy the strategy implementation to use during log-in attempts.
      * @since 0.2
      */
-    public void setModularAuthenticationStrategy(ModularAuthenticationStrategy modularAuthenticationStrategy) {
-        this.modularAuthenticationStrategy = modularAuthenticationStrategy;
+    public void setAuthenticationStrategy(AuthenticationStrategy authenticationStrategy) {
+        this.authenticationStrategy = authenticationStrategy;
     }
 
     /*--------------------------------------------
@@ -223,7 +223,7 @@
     }
 
     /**
-     * Performs the multi-realm authentication attempt by calling back to a {@link ModularAuthenticationStrategy} object
+     * Performs the multi-realm authentication attempt by calling back to a {@link AuthenticationStrategy} object
      * as each realm is consulted for <tt>AuthenticationInfo</tt> for the specified <tt>token</tt>.
      *
      * @param realms the multiple realms configured on this Authenticator instance.
@@ -233,7 +233,7 @@
      */
     protected AuthenticationInfo doMultiRealmAuthentication(Collection<Realm> realms, AuthenticationToken token) {
 
-        ModularAuthenticationStrategy strategy = getModularAuthenticationStrategy();
+        AuthenticationStrategy strategy = getAuthenticationStrategy();
 
         AuthenticationInfo aggregate = strategy.beforeAllAttempts(realms, token);
 

Modified: incubator/jsecurity/trunk/core/src/org/jsecurity/authc/pam/UnsupportedTokenException.java
URL: http://svn.apache.org/viewvc/incubator/jsecurity/trunk/core/src/org/jsecurity/authc/pam/UnsupportedTokenException.java?rev=749350&r1=749349&r2=749350&view=diff
==============================================================================
--- incubator/jsecurity/trunk/core/src/org/jsecurity/authc/pam/UnsupportedTokenException.java (original)
+++ incubator/jsecurity/trunk/core/src/org/jsecurity/authc/pam/UnsupportedTokenException.java Mon Mar  2 16:39:37 2009
@@ -26,7 +26,7 @@
  * supported by one or more configured {@link org.jsecurity.realm.Realm Realm}s.
  *
  * @author Les Hazlewood
- * @see ModularAuthenticationStrategy
+ * @see AuthenticationStrategy
  * @since 0.2
  */
 public class UnsupportedTokenException extends AuthenticationException {

Modified: incubator/jsecurity/trunk/core/src/org/jsecurity/authc/pam/package-info.java
URL: http://svn.apache.org/viewvc/incubator/jsecurity/trunk/core/src/org/jsecurity/authc/pam/package-info.java?rev=749350&r1=749349&r2=749350&view=diff
==============================================================================
--- incubator/jsecurity/trunk/core/src/org/jsecurity/authc/pam/package-info.java (original)
+++ incubator/jsecurity/trunk/core/src/org/jsecurity/authc/pam/package-info.java Mon Mar  2 16:39:37 2009
@@ -27,6 +27,6 @@
  * <p/>
  * How the <code>ModularRealmAuthenticator</code> actually coordinates this behavior is configurable based on your
  * application's needs using an injectible
- * {@link org.jsecurity.authc.pam.ModularAuthenticationStrategy ModularAuthenticationStrategy}.
+ * {@link AuthenticationStrategy}.
  */
 package org.jsecurity.authc.pam;
\ No newline at end of file

Modified: incubator/jsecurity/trunk/core/src/org/jsecurity/mgt/AuthenticatingSecurityManager.java
URL: http://svn.apache.org/viewvc/incubator/jsecurity/trunk/core/src/org/jsecurity/mgt/AuthenticatingSecurityManager.java?rev=749350&r1=749349&r2=749350&view=diff
==============================================================================
--- incubator/jsecurity/trunk/core/src/org/jsecurity/mgt/AuthenticatingSecurityManager.java (original)
+++ incubator/jsecurity/trunk/core/src/org/jsecurity/mgt/AuthenticatingSecurityManager.java Mon Mar  2 16:39:37 2009
@@ -19,7 +19,7 @@
 package org.jsecurity.mgt;
 
 import org.jsecurity.authc.*;
-import org.jsecurity.authc.pam.ModularAuthenticationStrategy;
+import org.jsecurity.authc.pam.AuthenticationStrategy;
 import org.jsecurity.authc.pam.ModularRealmAuthenticator;
 import org.jsecurity.util.LifecycleUtils;
 
@@ -89,20 +89,20 @@
     }
 
     /**
-     * Sets the {@link org.jsecurity.authc.pam.ModularAuthenticationStrategy ModularAuthenticationStrategy} to use
+     * Sets the {@link org.jsecurity.authc.pam.AuthenticationStrategy} to use
      * in multi-realm environments.
      *
-     * @param strategy the <code>ModularAuthenticationStrategy</code> to use in multi-realm environments.
+     * @param strategy the <code>AuthenticationStrategy</code> to use in multi-realm environments.
      */
-    public void setModularAuthenticationStrategy(ModularAuthenticationStrategy strategy) {
+    public void setAuthenticationStrategy(AuthenticationStrategy strategy) {
         if (!(this.authenticator instanceof ModularRealmAuthenticator)) {
-            String msg = "Configuring a ModularAuthenticationStrategy is only applicable when the underlying " +
+            String msg = "Configuring a AuthenticationStrategy is only applicable when the underlying " +
                     "Authenticator implementation is a " + ModularRealmAuthenticator.class.getName() +
                     " implementation.  This SecurityManager has been configured with an Authenticator of type " +
                     this.authenticator.getClass().getName();
             throw new IllegalStateException(msg);
         }
-        ((ModularRealmAuthenticator) this.authenticator).setModularAuthenticationStrategy(strategy);
+        ((ModularRealmAuthenticator) this.authenticator).setAuthenticationStrategy(strategy);
     }
 
     /**
@@ -130,7 +130,7 @@
     public void setAuthenticationListeners(Collection<AuthenticationListener> listeners) {
         assertAuthenticatorListenerSupport();
         if (!(this.authenticator instanceof AuthenticationListenerRegistrar)) {
-            String msg = "Configuring a ModularAuthenticationStrategy is only applicable when the underlying " +
+            String msg = "Configuring a AuthenticationStrategy is only applicable when the underlying " +
                     "Authenticator implementation is a " + AuthenticationListenerRegistrar.class.getName() +
                     " implementation.  This SecurityManager has been configured with an Authenticator of type " +
                     this.authenticator.getClass().getName() + ", which does not implement that interface.";

Modified: incubator/jsecurity/trunk/core/src/org/jsecurity/realm/SimpleAccountRealm.java
URL: http://svn.apache.org/viewvc/incubator/jsecurity/trunk/core/src/org/jsecurity/realm/SimpleAccountRealm.java?rev=749350&r1=749349&r2=749350&view=diff
==============================================================================
--- incubator/jsecurity/trunk/core/src/org/jsecurity/realm/SimpleAccountRealm.java (original)
+++ incubator/jsecurity/trunk/core/src/org/jsecurity/realm/SimpleAccountRealm.java Mon Mar  2 16:39:37 2009
@@ -140,12 +140,16 @@
         UsernamePasswordToken upToken = (UsernamePasswordToken) token;
         SimpleAccount account = (SimpleAccount) getAuthorizationCache().get(upToken.getUsername());
 
-        if (account.isLocked()) {
-            throw new LockedAccountException("Account [" + account + "] is locked.");
-        }
-        if (account.isCredentialsExpired()) {
-            String msg = "The credentials for account [" + account + "] are expired";
-            throw new ExpiredCredentialsException(msg);
+        if( account != null ) {
+
+            if (account.isLocked()) {
+                throw new LockedAccountException("Account [" + account + "] is locked.");
+            }
+            if (account.isCredentialsExpired()) {
+                String msg = "The credentials for account [" + account + "] are expired";
+                throw new ExpiredCredentialsException(msg);
+            }
+            
         }
 
         return account;

Modified: incubator/jsecurity/trunk/core/src/org/jsecurity/realm/jdbc/JdbcRealm.java
URL: http://svn.apache.org/viewvc/incubator/jsecurity/trunk/core/src/org/jsecurity/realm/jdbc/JdbcRealm.java?rev=749350&r1=749349&r2=749350&view=diff
==============================================================================
--- incubator/jsecurity/trunk/core/src/org/jsecurity/realm/jdbc/JdbcRealm.java (original)
+++ incubator/jsecurity/trunk/core/src/org/jsecurity/realm/jdbc/JdbcRealm.java Mon Mar  2 16:39:37 2009
@@ -274,7 +274,9 @@
 
             // Retrieve roles and permissions from database
             roleNames = getRoleNamesForUser(conn, username);
-            permissions = getPermissions(conn, username, roleNames);
+            if( permissionsLookupEnabled ) {
+                permissions = getPermissions(conn, username, roleNames);
+            }
 
         } catch (SQLException e) {
             final String message = "There was a SQL error while authorizing user [" + username + "]";

Modified: incubator/jsecurity/trunk/core/src/org/jsecurity/realm/text/TextConfigurationRealm.java
URL: http://svn.apache.org/viewvc/incubator/jsecurity/trunk/core/src/org/jsecurity/realm/text/TextConfigurationRealm.java?rev=749350&r1=749349&r2=749350&view=diff
==============================================================================
--- incubator/jsecurity/trunk/core/src/org/jsecurity/realm/text/TextConfigurationRealm.java (original)
+++ incubator/jsecurity/trunk/core/src/org/jsecurity/realm/text/TextConfigurationRealm.java Mon Mar  2 16:39:37 2009
@@ -205,7 +205,9 @@
         Map<String, String> pairs = new HashMap<String, String>();
         for (String pairString : keyValuePairs) {
             String[] pair = StringUtils.splitKeyValue(pairString);
-            pairs.put(pair[0].trim(), pair[1].trim());
+            if( pair != null ) {
+                pairs.put(pair[0].trim(), pair[1].trim());
+            }
         }
 
         return pairs;

Propchange: incubator/jsecurity/trunk/core/test/
------------------------------------------------------------------------------
    svn:mergeinfo = /incubator/jsecurity/import/trunk/test:711429-749341

Modified: incubator/jsecurity/trunk/ivy.xml
URL: http://svn.apache.org/viewvc/incubator/jsecurity/trunk/ivy.xml?rev=749350&r1=749349&r2=749350&view=diff
==============================================================================
--- incubator/jsecurity/trunk/ivy.xml (original)
+++ incubator/jsecurity/trunk/ivy.xml Mon Mar  2 16:39:37 2009
@@ -71,6 +71,10 @@
         <dependency org="javax.servlet" name="jstl" rev="1.2" transitive="false" conf="samples"/>
         <dependency org="taglibs" name="standard" rev="1.1.2" transitive="false" conf="samples"/>
         <dependency org="hsqldb" name="hsqldb" rev="1.8.0.7" transitive="false" conf="samples"/>
+        <dependency org="org.hibernate" name="ejb3-persistence" rev="1.0.2.GA" conf="samples"/>
+        <dependency org="org.hibernate" name="hibernate-annotations" rev="3.2.1.ga" conf="samples">
+            <exclude org="javax.transaction"/>
+        </dependency>
         <dependency org="org.hibernate" name="hibernate" rev="3.2.6.ga" conf="samples">
             <!-- JTA 1.0.1b jar is not allowed in the Maven repo because of Sun's binary license, so we have to
                  download it explictly from another location (we use Geronimo's version) -->
@@ -87,99 +91,6 @@
             <artifact name="docbook-libs" type="zip" ext="zip"/>
         </dependency>
 
-        <!-- TODO: move these contents (old library_versions.txt file) into appropriate places in this document. -->
-        <!-- This file lists all 3rd party libraries (and their versions!!!) that
-        are required to build or run the project.
-
-        If you're a developer editing this file, please keep all listings in alphabetical order for
-        convenient lookup.
-
-        Some notes:
-
-        - Each 3rd party library is stored in a directory named after the
-          open-source project or company that created it.  This makes for
-          easy organization of lots of libs.
-
-        - Jar files stored _do not_ have version numbers
-          actually in their file name.  If the jar originally comes as such,
-          it is renamed with the version number stripped off.  The version
-          number is instead maintained in this file.  The reason for this is
-          so that every time we need to upgrade any 3rd party library,
-          we don't have to edit any build.xml or properies files to reflect
-          a potential name change due to a version number - you just note
-          that change once in this file and overwrite the old jar, checking
-          in that overwrite to CVS in the process.
-
-        - Each 3rd party lib is listed here along with what it is
-          used for and if its needed for build-time, run-time or both.
-
-        - Thanks to the gents working on the Spring Framework (http://www.springframework.org)
-          that provided the template and the idea for this file.
-
-        * atunit/atunut.jar
-        - AtUnit 1.0
-        - Used in unit tests
-
-        * easymock/easymock.jar, easymockclassextension.jar
-        - EasyMock 2.2 w/ ClassExtension 2.2 (http://www.easymock.org)
-        - Used in test cases for creating dynamic mock objects
-
-        * ehcache/ehcache.jar
-        - ehcache 1.3.0 (http://ehcache.sourceforge.net/)
-        - Required for compiling, using ehcache cache manager, and for runtime session management
-
-        * google-collections/google-collect.jar
-        - Google Collections Snapshot 20071022
-        - Used in test cases for conveniently constructing collections
-
-        * hsqldb/hsqldb.jar
-        - HSQLDB 1.8.0.7 (http://www.hsqldb.org)
-        - Used in the sample application to show an example of a JDBC-based Realm.
-
-        * j2ee/jsp-api.jar
-        - JSP API 2.0 (http://java.sun.com/products/jsp)
-        - Required for building the RI tag libraries
-
-        * j2ee/servlet-api.jar
-        - Servlet API 2.4 (http://java.sun.com/products/servlet)
-        - required for building web support classes (Servlet Filters, etc)
-
-        * jakarta-commons/commons-beanutils-core.jar
-        - Commons BeanUtils 1.7.0 (http://jakarta.apache.org/commons/beanutils/index.html)
-        - required for building and running JSecurity
-        - used for constructing Permissions in the Reference Implementation's PermissionAnnotationAuthorizationModule
-
-        * jboss/jboss-aop.jar
-        - JBoss AOP jar from the JBoss 4.0.4.GA Application Server release
-        - Required at build time for JBoss integration support classes.
-
-        * jug/jug.jar
-        - Java Uuid Genrator (JUG) v. 2.0.0 (Apache 2.0 jar) (http://jug.safehaus.org/)
-        - used as a fallback UUID generator for memory-based session management if below Java 1.5
-
-        * junit/junit.jar
-        - JUnit Test Framework 4.1 (http://www.junit.org)
-        - Required for building and running test cases
-
-        * log4j/log4j.jar
-        - Log4J 1.2.9 (http://logging.apache.org/log4j)
-        - required by the RI during build and runtime for logging support
-
-        * quartz/quartz.jar
-        - Quartz 1.5.2 (http://www.opensymphony.com/quartz)
-        - required during build and runtime for Quartz-based session validation support
-
-        * retroweaver/retroweaver.jar,retroweaver-rt.jar
-        - Retroweaver 2.0 (http://retroweaver.sourceforge.net)
-        - required for retroweaving to support JDK 1.3 and 1.4
-        - rt jar is required at runtime if running in 1.3 or 1.4
-
-        * spring/spring.jar
-        - Spring Application Framework 2.0.2 (http://springframework.org)
-        - required to build Spring integration support and sample apps
-        -->
-
-
     </dependencies>
 
 </ivy-module>
\ No newline at end of file

Propchange: incubator/jsecurity/trunk/ivy.xml
------------------------------------------------------------------------------
    svn:mergeinfo = /incubator/jsecurity/import/trunk/ivy.xml:711429-749341

Propchange: incubator/jsecurity/trunk/samples/spring-hibernate/
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Mon Mar  2 16:39:37 2009
@@ -0,0 +1 @@
+/incubator/jsecurity/import/trunk/samples/spring-hibernate:720066-749338

Modified: incubator/jsecurity/trunk/samples/spring-hibernate/build.xml
URL: http://svn.apache.org/viewvc/incubator/jsecurity/trunk/samples/spring-hibernate/build.xml?rev=749350&r1=749349&r2=749350&view=diff
==============================================================================
--- incubator/jsecurity/trunk/samples/spring-hibernate/build.xml (original)
+++ incubator/jsecurity/trunk/samples/spring-hibernate/build.xml Mon Mar  2 16:39:37 2009
@@ -56,9 +56,11 @@
     <target name="compile" depends="compile.src"/> <!-- no test classes, no need to depend on compile.test -->
 
     <target name="war">
-        <war warfile="${dist.war}" webxml="WEB-INF/web.xml">
+            <echo message="DIST DIR: ${dist.dir}"/>
+        <war warfile="${dist.war}" webxml="web/WEB-INF/web.xml">
             <lib dir="${dist.dir}" includes="*.jar"/>
-            <lib dir="${root.dist.dir}" includes="jsecurity.jar"/>
+            <lib dir="${dist.dir}/samples" includes="jsecurity-samples-sprhib*.jar"/>
+            <lib dir="${dist.dir}/modules" includes="*.jar"/>
             <lib dir="${lib.dir}/samples">
                 <include name="jstl-*.jar"/>
                 <include name="standard-*.jar"/>
@@ -72,15 +74,16 @@
             <!-- Hibernate libs: -->
             <lib dir="${lib.dir}/samples">
                 <include name="hibernate-*.jar"/>
+                <include name="persistence-api-*.jar"/>
                 <include name="antlr-*.jar"/>
                 <include name="asm-attrs-*.jar"/>
                 <include name="asm-*.jar"/>
                 <include name="cglib-*.jar"/>
-                <include name="geronimo-jta_1.0.1B_spec.jar"/>
+                <include name="geronimo-jta_1.0.1B_spec-*.jar"/>
                 <include name="dom4j-*.jar"/>
                 <include name="commons-collections-*.jar"/>
             </lib>
-            <fileset dir="${base.dir}" includes="**" excludes="**/web.xml, **/build.xml"/>
+            <fileset dir="${base.dir}/web" includes="**" excludes="**/web.xml, **/build.xml"/>
         </war>
 
     </target>

Propchange: incubator/jsecurity/trunk/samples/spring-hibernate/build.xml
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Mon Mar  2 16:39:37 2009
@@ -0,0 +1 @@
+/incubator/jsecurity/import/trunk/samples/spring-hibernate/build.xml:711429-749342

Copied: incubator/jsecurity/trunk/samples/spring-hibernate/web/WEB-INF/classes/ehcache.xml (from r749338, incubator/jsecurity/import/trunk/samples/spring-hibernate/web/WEB-INF/classes/ehcache.xml)
URL: http://svn.apache.org/viewvc/incubator/jsecurity/trunk/samples/spring-hibernate/web/WEB-INF/classes/ehcache.xml?p2=incubator/jsecurity/trunk/samples/spring-hibernate/web/WEB-INF/classes/ehcache.xml&p1=incubator/jsecurity/import/trunk/samples/spring-hibernate/web/WEB-INF/classes/ehcache.xml&r1=749338&r2=749350&rev=749350&view=diff
==============================================================================
--- incubator/jsecurity/import/trunk/samples/spring-hibernate/web/WEB-INF/classes/ehcache.xml (original)
+++ incubator/jsecurity/trunk/samples/spring-hibernate/web/WEB-INF/classes/ehcache.xml Mon Mar  2 16:39:37 2009
@@ -38,9 +38,19 @@
         timeToLiveSeconds="0"
         overflowToDisk="true"/>
 
+    <cache name="org.jsecurity.samples.sprhib.model.Role.permissions"
+        maxElementsInMemory="100"
+        timeToLiveSeconds="0"
+        overflowToDisk="true"/>
+
     <cache name="org.jsecurity.samples.sprhib.model.User"
         maxElementsInMemory="1000"
         timeToLiveSeconds="3600"
         overflowToDisk="true"/>
 
+    <cache name="org.jsecurity.samples.sprhib.model.User.roles"
+        maxElementsInMemory="1000"
+        timeToLiveSeconds="3600"
+        overflowToDisk="true"/>
+
 </ehcache>
\ No newline at end of file

Propchange: incubator/jsecurity/trunk/web/src/org/jsecurity/web/
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Mon Mar  2 16:39:37 2009
@@ -0,0 +1 @@
+/incubator/jsecurity/import/trunk/src/org/jsecurity/web:720066-749338

Modified: incubator/jsecurity/trunk/web/src/org/jsecurity/web/attr/CookieAttribute.java
URL: http://svn.apache.org/viewvc/incubator/jsecurity/trunk/web/src/org/jsecurity/web/attr/CookieAttribute.java?rev=749350&r1=749349&r2=749350&view=diff
==============================================================================
--- incubator/jsecurity/trunk/web/src/org/jsecurity/web/attr/CookieAttribute.java (original)
+++ incubator/jsecurity/trunk/web/src/org/jsecurity/web/attr/CookieAttribute.java Mon Mar  2 16:39:37 2009
@@ -170,6 +170,29 @@
         return path;
     }
 
+
+    /**
+     * Returns the Cookie's calculated path setting.  If {@link Cookie#getPath() path} <tt>null</tt>, then the
+     * <tt>request</tt>'s {@link javax.servlet.http.HttpServletRequest#getContextPath() context path}
+     * will be returned. If getContextPath() is the empty string or null then the ROOT_PATH constant is returned.
+     * <p/>
+     * <p>The default is <code>null</code>.</p>
+     *
+     * @return the path to be used as the path when the cookie is created or removed.
+     */
+    public String calculatePath(HttpServletRequest request) {
+        String calculatePath = getPath() != null ? getPath() : request.getContextPath();
+
+        //fix for http://issues.apache.org/jira/browse/JSEC-34:
+        calculatePath = StringUtils.clean(calculatePath);
+        if (calculatePath == null) {
+            calculatePath = ROOT_PATH;
+        }
+        log.trace ("calculatePath: returning=" + calculatePath);
+        return calculatePath;
+    }
+
+
     /**
      * Sets the Cookie's {@link Cookie#getPath() path} setting.  If the argument is <tt>null</tt>, the <tt>request</tt>'s
      * {@link javax.servlet.http.HttpServletRequest#getContextPath() context path} will be used.
@@ -263,7 +286,7 @@
 
         String name = getName();
         int maxAge = getMaxAge();
-        String path = getPath() != null ? getPath() : request.getContextPath();
+        String path = calculatePath(request);
 
         //fix for http://issues.apache.org/jira/browse/JSEC-34:
         path = StringUtils.clean(path);
@@ -280,6 +303,7 @@
         }
 
         response.addCookie(cookie);
+        
         if (log.isTraceEnabled()) {
             log.trace("Added Cookie [" + name + "] to path [" + path + "] with value [" +
                     stringValue + "] to the HttpServletResponse.");
@@ -289,13 +313,17 @@
     public void removeValue(ServletRequest servletRequest, ServletResponse response) {
         HttpServletRequest request = toHttp(servletRequest);
         Cookie cookie = getCookie(request, getName());
+
         if (cookie != null) {
             cookie.setMaxAge(0);
+            cookie.setValue("forgetme");
             //JSEC-94: Must set the path on the outgoing cookie (some browsers don't retain it from the
             //retrieved cookie?)
-            cookie.setPath(getPath() == null ? request.getContextPath() : getPath());
+            // my testing shows none of these browsers will remove cookie if setPath() is not invoked: FF3, Chrome, IE7, Safari windows
+            cookie.setPath(calculatePath(request));
             cookie.setSecure(isSecure());
             toHttp(response).addCookie(cookie);
+            log.trace("Removed cookie[" + getName() + "] with path [" + calculatePath(request) + "] from HttpServletResponse.");
         }
     }
 }

Modified: incubator/jsecurity/trunk/web/src/org/jsecurity/web/filter/PathConfigProcessor.java
URL: http://svn.apache.org/viewvc/incubator/jsecurity/trunk/web/src/org/jsecurity/web/filter/PathConfigProcessor.java?rev=749350&r1=749349&r2=749350&view=diff
==============================================================================
--- incubator/jsecurity/trunk/web/src/org/jsecurity/web/filter/PathConfigProcessor.java (original)
+++ incubator/jsecurity/trunk/web/src/org/jsecurity/web/filter/PathConfigProcessor.java Mon Mar  2 16:39:37 2009
@@ -18,6 +18,8 @@
  */
 package org.jsecurity.web.filter;
 
+import javax.servlet.Filter;
+
 /**
  * A PathConfigProcessor processes configuration entries on a per path (per url) basis.
  *
@@ -28,5 +30,5 @@
 
     //TODO - complete JavaDoc
 
-    void processPathConfig(String path, String config);
+    Filter processPathConfig(String path, String config);
 }

Modified: incubator/jsecurity/trunk/web/src/org/jsecurity/web/filter/PathMatchingFilter.java
URL: http://svn.apache.org/viewvc/incubator/jsecurity/trunk/web/src/org/jsecurity/web/filter/PathMatchingFilter.java?rev=749350&r1=749349&r2=749350&view=diff
==============================================================================
--- incubator/jsecurity/trunk/web/src/org/jsecurity/web/filter/PathMatchingFilter.java (original)
+++ incubator/jsecurity/trunk/web/src/org/jsecurity/web/filter/PathMatchingFilter.java Mon Mar  2 16:39:37 2009
@@ -26,6 +26,7 @@
 import org.jsecurity.web.WebUtils;
 import org.jsecurity.web.servlet.AdviceFilter;
 
+import javax.servlet.Filter;
 import javax.servlet.ServletRequest;
 import javax.servlet.ServletResponse;
 import java.util.LinkedHashMap;
@@ -76,14 +77,16 @@
      *
      * @param path   the application context path to match for executing this filter.
      * @param config the specified for <em>this particular filter only</em> for the given <code>path</code>
+     * @return this configured filter.
      */
-    public void processPathConfig(String path, String config) {
+    public Filter processPathConfig(String path, String config) {
         String[] values = null;
         if (config != null) {
             values = split(config);
         }
 
         this.appliedPaths.put(path, values);
+        return this;
     }
 
     /**

Propchange: incubator/jsecurity/trunk/web/test/org/jsecurity/web/
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Mon Mar  2 16:39:37 2009
@@ -0,0 +1 @@
+/incubator/jsecurity/import/trunk/test/org/jsecurity/web:720066-749341

Modified: incubator/jsecurity/trunk/web/test/org/jsecurity/web/attr/CookieAttributeTest.java
URL: http://svn.apache.org/viewvc/incubator/jsecurity/trunk/web/test/org/jsecurity/web/attr/CookieAttributeTest.java?rev=749350&r1=749349&r2=749350&view=diff
==============================================================================
--- incubator/jsecurity/trunk/web/test/org/jsecurity/web/attr/CookieAttributeTest.java (original)
+++ incubator/jsecurity/trunk/web/test/org/jsecurity/web/attr/CookieAttributeTest.java Mon Mar  2 16:39:37 2009
@@ -55,7 +55,7 @@
 
         expect(mockRequest.getCookies()).andReturn(cookies);
         //no path set on the cookie, so we expect to retrieve it from the context path
-        expect(mockRequest.getContextPath()).andReturn("/somepath");
+        expect(mockRequest.getContextPath()).andReturn("/somepath").times(2);
         mockResponse.addCookie(cookie);
         replay(mockRequest);
         replay(mockResponse);
@@ -121,4 +121,29 @@
         });
         return null;
     }
+
+    @Test
+    //Verifies fix for JSEC-64
+    public void testRemoveValueWithNullContext() throws Exception {
+
+        Cookie cookie = new Cookie("test", "blah");
+        cookie.setMaxAge(2351234); //doesn't matter what the time is
+        Cookie[] cookies = new Cookie[]{cookie};
+
+        expect(mockRequest.getCookies()).andReturn(cookies);
+        //no path set on the cookie, so we expect to retrieve it from the context path
+        expect(mockRequest.getContextPath()).andReturn(null).times(2);
+        mockResponse.addCookie(cookie);
+        replay(mockRequest);
+        replay(mockResponse);
+
+        cookieAttribute.removeValue(mockRequest, mockResponse);
+
+        verify(mockRequest);
+        verify(mockResponse);
+
+        assertTrue(cookie.getMaxAge() == 0);
+        assertTrue(cookie.getPath().equals("/"));
+    }
+
 }



Mime
View raw message