You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by er...@apache.org on 2005/09/30 06:18:47 UTC

svn commit: r292621 - in /directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos: exceptions/KerberosException.java service/ErrorMessageHandler.java

Author: erodriguez
Date: Thu Sep 29 21:18:42 2005
New Revision: 292621

URL: http://svn.apache.org/viewcvs?rev=292621&view=rev
Log:
Updates to kerberos-common to support DIRCHANGEPW-2 (Add basic password policy check):
o  Added support for explanatory data in the exception hierarchy.
o  Updated comments.

http://issues.apache.org/jira/browse/DIRCHANGEPW-2

Modified:
    directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/exceptions/KerberosException.java
    directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/service/ErrorMessageHandler.java

Modified: directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/exceptions/KerberosException.java
URL: http://svn.apache.org/viewcvs/directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/exceptions/KerberosException.java?rev=292621&r1=292620&r2=292621&view=diff
==============================================================================
--- directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/exceptions/KerberosException.java (original)
+++ directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/exceptions/KerberosException.java Thu Sep 29 21:18:42 2005
@@ -68,10 +68,25 @@
     }
 
     /**
-     * Creates a KerberosException with an error code and a message.
+     * Creates a KerberosException with an error code, a message, and data
+     * helping to explain what caused this fault.
      *
      * @param errorCode the error code associated with this KerberosException
      * @param msg the standard Kerberos error message for this KerberosException
+     * @param explanatoryData data helping to explain this fault, if any
+     */
+    public KerberosException( int errorCode, String msg, byte[] explanatoryData )
+    {
+        super( msg );
+
+        this.errorCode = errorCode;
+        this.explanatoryData = explanatoryData;
+    }
+
+    /**
+     * Creates a KerberosException with an error type.
+     *
+     * @param errorType the error type associated with this KerberosException
      */
     public KerberosException( ErrorType errorType )
     {
@@ -81,9 +96,9 @@
     }
 
     /**
-     * Creates a KerberosException with an error code and a custom error message.
+     * Creates a KerberosException with an error type and a custom error message.
      *
-     * @param errorCode the error code associated with this KerberosException
+     * @param errorType the error type associated with this KerberosException
      * @param msg a custom error message for this KerberosException
      */
     public KerberosException( ErrorType errorType, String msg )
@@ -94,11 +109,10 @@
     }
 
     /**
-     * Creates a KerberosException with an error code, a message, and
-     * data helping to explain what caused this fault.
+     * Creates a KerberosException with an error type and data helping to
+     * explain what caused this fault.
      *
-     * @param errorCode the error code associated with this KerberosException
-     * @param msg the standard Kerberos error message for this KerberosException
+     * @param errorType the error type associated with this KerberosException
      * @param explanatoryData data helping to explain this fault, if any
      */
     public KerberosException( ErrorType errorType, byte[] explanatoryData )

Modified: directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/service/ErrorMessageHandler.java
URL: http://svn.apache.org/viewcvs/directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/service/ErrorMessageHandler.java?rev=292621&r1=292620&r2=292621&view=diff
==============================================================================
--- directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/service/ErrorMessageHandler.java (original)
+++ directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/service/ErrorMessageHandler.java Thu Sep 29 21:18:42 2005
@@ -18,6 +18,7 @@
 
 import javax.security.auth.kerberos.KerberosPrincipal;
 
+import org.apache.kerberos.chain.Command;
 import org.apache.kerberos.chain.Filter;
 import org.apache.kerberos.chain.impl.CommandBase;
 import org.apache.kerberos.exceptions.KerberosException;
@@ -26,9 +27,8 @@
 import org.apache.kerberos.messages.value.KerberosTime;
 
 /**
- * A {@link CommandBase} for helping convert a {@link KerberosException} into
- * an {@link ErrorMessage} to be returned to clients.  Used by the KDC Authentication
- * Service, Ticket Granting Service, and the Change Password Service.
+ * A {@link Command} for helping convert a {@link KerberosException} into
+ * an {@link ErrorMessage} to be returned to clients.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$