portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject cvs commit: jakarta-jetspeed-2/components/security/src/java/org/apache/jetspeed/security/spi/impl SimpleCredentialPasswordValidator.java InternalPasswordCredentialHistoryHandlingInterceptor.java DefaultCredentialPasswordValidator.java
Date Thu, 03 Feb 2005 01:24:09 GMT
ate         2005/02/02 17:24:09

  Modified:    components/security/src/java/org/apache/jetspeed/security/spi/impl
                        SimpleCredentialPasswordValidator.java
                        InternalPasswordCredentialHistoryHandlingInterceptor.java
                        DefaultCredentialPasswordValidator.java
  Log:
  Throw more specialized SecurityExceptions to allow easier localization
  
  Revision  Changes    Path
  1.3       +4 -3      jakarta-jetspeed-2/components/security/src/java/org/apache/jetspeed/security/spi/impl/SimpleCredentialPasswordValidator.java
  
  Index: SimpleCredentialPasswordValidator.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/components/security/src/java/org/apache/jetspeed/security/spi/impl/SimpleCredentialPasswordValidator.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- SimpleCredentialPasswordValidator.java	8 Nov 2004 22:35:41 -0000	1.2
  +++ SimpleCredentialPasswordValidator.java	3 Feb 2005 01:24:09 -0000	1.3
  @@ -14,6 +14,7 @@
   */
   package org.apache.jetspeed.security.spi.impl;
   
  +import org.apache.jetspeed.security.InvalidPasswordException;
   import org.apache.jetspeed.security.SecurityException;
   import org.apache.jetspeed.security.spi.CredentialPasswordValidator;
   
  @@ -50,7 +51,7 @@
   
           if ( minPasswordLength > 0 && pwd.length < minPasswordLength )
           {
  -            throw new SecurityException(SecurityException.INVALID_PASSWORD);
  +            throw new InvalidPasswordException();
           }
   
           if ( minNumberOfDigits > 0)
  @@ -64,7 +65,7 @@
               }
               if (digits < minNumberOfDigits)
               {
  -                throw new SecurityException(SecurityException.INVALID_PASSWORD);
  +                throw new InvalidPasswordException();
               }
           }
       }
  
  
  
  1.3       +3 -2      jakarta-jetspeed-2/components/security/src/java/org/apache/jetspeed/security/spi/impl/InternalPasswordCredentialHistoryHandlingInterceptor.java
  
  Index: InternalPasswordCredentialHistoryHandlingInterceptor.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/components/security/src/java/org/apache/jetspeed/security/spi/impl/InternalPasswordCredentialHistoryHandlingInterceptor.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- InternalPasswordCredentialHistoryHandlingInterceptor.java	25 Nov 2004 02:25:57 -0000
1.2
  +++ InternalPasswordCredentialHistoryHandlingInterceptor.java	3 Feb 2005 01:24:09 -0000
1.3
  @@ -22,6 +22,7 @@
   import java.util.Date;
   import java.util.Iterator;
   
  +import org.apache.jetspeed.security.PasswordAlreadyUsedException;
   import org.apache.jetspeed.security.SecurityException;
   import org.apache.jetspeed.security.om.InternalCredential;
   import org.apache.jetspeed.security.om.InternalUserPrincipal;
  @@ -100,7 +101,7 @@
                   if ( historicalPasswordCredential.getValue() != null &&
                           historicalPasswordCredential.getValue().equals(password) )
                   {
  -                    throw new SecurityException(SecurityException.PASSWORD_ALREADY_USED);
  +                    throw new PasswordAlreadyUsedException();
                   }
               }
           }
  
  
  
  1.3       +3 -2      jakarta-jetspeed-2/components/security/src/java/org/apache/jetspeed/security/spi/impl/DefaultCredentialPasswordValidator.java
  
  Index: DefaultCredentialPasswordValidator.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/components/security/src/java/org/apache/jetspeed/security/spi/impl/DefaultCredentialPasswordValidator.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- DefaultCredentialPasswordValidator.java	8 Nov 2004 22:35:41 -0000	1.2
  +++ DefaultCredentialPasswordValidator.java	3 Feb 2005 01:24:09 -0000	1.3
  @@ -14,6 +14,7 @@
   */
   package org.apache.jetspeed.security.spi.impl;
   
  +import org.apache.jetspeed.security.InvalidPasswordException;
   import org.apache.jetspeed.security.SecurityException;
   import org.apache.jetspeed.security.spi.CredentialPasswordValidator;
   
  @@ -37,6 +38,6 @@
       public void validate(String clearTextPassword) throws SecurityException
       {
           if ( clearTextPassword == null || clearTextPassword.length() == 0)
  -            throw new SecurityException(SecurityException.INVALID_PASSWORD);
  +            throw new InvalidPasswordException();
       }
   }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org


Mime
View raw message