directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From erodrig...@apache.org
Subject svn commit: r540371 [2/7] - in /directory/apacheds/trunk: kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/crypto/checksum/ kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/crypto/encryption/ kerberos-s...
Date Tue, 22 May 2007 00:00:59 GMT
Modified: directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/exceptions/ErrorType.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/exceptions/ErrorType.java?view=diff&rev=540371&r1=540370&r2=540371
==============================================================================
--- directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/exceptions/ErrorType.java (original)
+++ directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/exceptions/ErrorType.java Mon May 21 17:00:43 2007
@@ -26,103 +26,364 @@
 
 
 /**
- * Type safe enumeration of Kerberos error types
+ * A type-safe enumeration of Kerberos error types.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
 public final class ErrorType implements Comparable
 {
-    /*
-     * Enumeration elements are constructed once upon class loading.
-     * Order of appearance here determines the order of compareTo.
+    /**
+     * No error.
      */
     public static final ErrorType KDC_ERR_NONE = new ErrorType( 0, "No error" );
+
+    /**
+     * Client's entry in database expired.
+     */
     public static final ErrorType KDC_ERR_NAME_EXP = new ErrorType( 1, "Client's entry in database expired" );
+
+    /**
+     * Server's entry in database has expired.
+     */
     public static final ErrorType KDC_ERR_SERVICE_EXP = new ErrorType( 2, "Server's entry in database has expired" );
+
+    /**
+     * Requested protocol version number not supported.
+     */
     public static final ErrorType KDC_ERR_BAD_PVNO = new ErrorType( 3,
         "Requested protocol version number not supported" );
+
+    /**
+     * Client's key encrypted in old master key.
+     */
     public static final ErrorType KDC_ERR_C_OLD_MAST_KVNO = new ErrorType( 4,
         "Client's key encrypted in old master key" );
+
+    /**
+     * Server's key encrypted in old master key.
+     */
     public static final ErrorType KDC_ERR_S_OLD_MAST_KVNO = new ErrorType( 5,
         "Server's key encrypted in old master key" );
+
+    /**
+     * Client not found in Kerberos database.
+     */
     public static final ErrorType KDC_ERR_C_PRINCIPAL_UNKNOWN = new ErrorType( 6,
         "Client not found in Kerberos database" );
+
+    /**
+     * Server not found in Kerberos database.
+     */
     public static final ErrorType KDC_ERR_S_PRINCIPAL_UNKNOWN = new ErrorType( 7,
         "Server not found in Kerberos database" );
+
+    /**
+     * Multiple principal entries in database.
+     */
     public static final ErrorType KDC_ERR_PRINCIPAL_NOT_UNIQUE = new ErrorType( 8,
         "Multiple principal entries in database" );
+
+    /**
+     * The client or server has a null key.
+     */
     public static final ErrorType KDC_ERR_NULL_KEY = new ErrorType( 9, "The client or server has a null key" );
+
+    /**
+     * Ticket not eligible for postdating.
+     */
     public static final ErrorType KDC_ERR_CANNOT_POSTDATE = new ErrorType( 10, "Ticket not eligible for postdating" );
+
+    /**
+     * Requested start time is later than end time.
+     */
     public static final ErrorType KDC_ERR_NEVER_VALID = new ErrorType( 11,
         "Requested start time is later than end time" );
+
+    /**
+     * KDC policy rejects request.
+     */
     public static final ErrorType KDC_ERR_POLICY = new ErrorType( 12, "KDC policy rejects request" );
+
+    /**
+     * KDC cannot accommodate requested option.
+     */
     public static final ErrorType KDC_ERR_BADOPTION = new ErrorType( 13, "KDC cannot accommodate requested option" );
+
+    /**
+     * KDC has no support for encryption type.
+     */
     public static final ErrorType KDC_ERR_ETYPE_NOSUPP = new ErrorType( 14, "KDC has no support for encryption type" );
+
+    /**
+     * KDC has no support for checksum type.
+     */
     public static final ErrorType KDC_ERR_SUMTYPE_NOSUPP = new ErrorType( 15, "KDC has no support for checksum type" );
+
+    /**
+     * KDC has no support for padata type.
+     */
     public static final ErrorType KDC_ERR_PADATA_TYPE_NOSUPP = new ErrorType( 16, "KDC has no support for padata type" );
+
+    /**
+     * KDC has no support for transitedEncoding type.
+     */
     public static final ErrorType KDC_ERR_TRTYPE_NOSUPP = new ErrorType( 17,
         "KDC has no support for transitedEncoding type" );
+
+    /**
+     * Clients credentials have been revoked.
+     */
     public static final ErrorType KDC_ERR_CLIENT_REVOKED = new ErrorType( 18, "Clients credentials have been revoked" );
+
+    /**
+     * Credentials for server have been revoked.
+     */
     public static final ErrorType KDC_ERR_SERVICE_REVOKED = new ErrorType( 19,
         "Credentials for server have been revoked" );
+
+    /**
+     * TGT has been revoked.
+     */
     public static final ErrorType KDC_ERR_TGT_REVOKED = new ErrorType( 20, "TGT has been revoked" );
+
+    /**
+     * Client not yet valid - try again later.
+     */
     public static final ErrorType KDC_ERR_CLIENT_NOTYET = new ErrorType( 21, "Client not yet valid - try again later" );
+
+    /**
+     * Server not yet valid - try again later.
+     */
     public static final ErrorType KDC_ERR_SERVICE_NOTYET = new ErrorType( 22, "Server not yet valid - try again later" );
+
+    /**
+     * Password has expired - change password to reset.
+     */
     public static final ErrorType KDC_ERR_KEY_EXPIRED = new ErrorType( 23,
         "Password has expired - change password to reset" );
+
+    /**
+     * Pre-authentication information was invalid.
+     */
     public static final ErrorType KDC_ERR_PREAUTH_FAILED = new ErrorType( 24,
         "Pre-authentication information was invalid" );
+
+    /**
+     * Additional pre-authentication required.
+     */
     public static final ErrorType KDC_ERR_PREAUTH_REQUIRED = new ErrorType( 25,
         "Additional pre-authentication required" );
+
+    /**
+     * Requested server and ticket don't match.
+     */
     public static final ErrorType KDC_ERR_SERVER_NOMATCH = new ErrorType( 26, "Requested server and ticket don't match" );
+
+    /**
+     * Server valid for user2user only.
+     */
     public static final ErrorType KDC_ERR_MUST_USE_USER2USER = new ErrorType( 27, "Server valid for user2user only" );
+
+    /**
+     * KDC Policy rejects transitedEncoding path.
+     */
     public static final ErrorType KDC_ERR_PATH_NOT_ACCEPTED = new ErrorType( 28,
         "KDC Policy rejects transitedEncoding path" );
+
+    /**
+     * A service is not available.
+     */
     public static final ErrorType KDC_ERR_SVC_UNAVAILABLE = new ErrorType( 29, "A service is not available" );
+
+    /**
+     * Integrity check on decrypted field failed.
+     */
     public static final ErrorType KRB_AP_ERR_BAD_INTEGRITY = new ErrorType( 31,
         "Integrity check on decrypted field failed" );
+
+    /**
+     * Ticket expired.
+     */
     public static final ErrorType KRB_AP_ERR_TKT_EXPIRED = new ErrorType( 32, "Ticket expired" );
+
+    /**
+     * Ticket not yet valid.
+     */
     public static final ErrorType KRB_AP_ERR_TKT_NYV = new ErrorType( 33, "Ticket not yet valid" );
+
+    /**
+     * Request is a replay.
+     */
     public static final ErrorType KRB_AP_ERR_REPEAT = new ErrorType( 34, "Request is a replay" );
+
+    /**
+     * The ticket isn't for us.
+     */
     public static final ErrorType KRB_AP_ERR_NOT_US = new ErrorType( 35, "The ticket isn't for us" );
+
+    /**
+     * Ticket and authenticator don't match.
+     */
     public static final ErrorType KRB_AP_ERR_BADMATCH = new ErrorType( 36, "Ticket and authenticator don't match" );
+
+    /**
+     * Clock skew too great.
+     */
     public static final ErrorType KRB_AP_ERR_SKEW = new ErrorType( 37, "Clock skew too great" );
+
+    /**
+     * Incorrect net address.
+     */
     public static final ErrorType KRB_AP_ERR_BADADDR = new ErrorType( 38, "Incorrect net address" );
+
+    /**
+     * Protocol version mismatch.
+     */
     public static final ErrorType KRB_AP_ERR_BADVERSION = new ErrorType( 39, "Protocol version mismatch" );
+
+    /**
+     * Invalid msg type.
+     */
     public static final ErrorType KRB_AP_ERR_MSG_TYPE = new ErrorType( 40, "Invalid msg type" );
+
+    /**
+     * Message stream modified.
+     */
     public static final ErrorType KRB_AP_ERR_MODIFIED = new ErrorType( 41, "Message stream modified" );
+
+    /**
+     * Message out of order.
+     */
     public static final ErrorType KRB_AP_ERR_BADORDER = new ErrorType( 42, "Message out of order" );
+
+    /**
+     * Specified version of key is not available.
+     */
     public static final ErrorType KRB_AP_ERR_BADKEYVER = new ErrorType( 44, "Specified version of key is not available" );
+
+    /**
+     * Service key not available.
+     */
     public static final ErrorType KRB_AP_ERR_NOKEY = new ErrorType( 45, "Service key not available" );
+
+    /**
+     * Mutual authentication failed.
+     */
     public static final ErrorType KRB_AP_ERR_MUT_FAIL = new ErrorType( 46, "Mutual authentication failed" );
+
+    /**
+     * Incorrect message direction.
+     */
     public static final ErrorType KRB_AP_ERR_BADDIRECTION = new ErrorType( 47, "Incorrect message direction" );
+
+    /**
+     * Alternative authentication method required.
+     */
     public static final ErrorType KRB_AP_ERR_METHOD = new ErrorType( 48, "Alternative authentication method required" );
+
+    /**
+     * Incorrect sequence number in message.
+     */
     public static final ErrorType KRB_AP_ERR_BADSEQ = new ErrorType( 49, "Incorrect sequence number in message" );
+
+    /**
+     * Inappropriate type of checksum in message.
+     */
     public static final ErrorType KRB_AP_ERR_INAPP_CKSUM = new ErrorType( 50,
         "Inappropriate type of checksum in message" );
+
+    /**
+     * Generic error (description in e-text).
+     */
     public static final ErrorType KRB_ERR_GENERIC = new ErrorType( 60, "Generic error (description in e-text)" );
+
+    /**
+     * Field is too long for this implementation.
+     */
     public static final ErrorType KRB_ERR_FIELD_TOOLONG = new ErrorType( 61,
         "Field is too long for this implementation" );
+
+    /**
+     * Client is not trusted.
+     */
     public static final ErrorType KRB_ERR_CLIENT_NOT_TRUSTED = new ErrorType( 62, "Client is not trusted" );
+
+    /**
+     * KDC is not trusted.
+     */
     public static final ErrorType KRB_ERR_KDC_NOT_TRUSTED = new ErrorType( 63, "KDC is not trusted" );
+
+    /**
+     * Signature is invalid.
+     */
     public static final ErrorType KRB_ERR_INVALID_SIG = new ErrorType( 64, "Signature is invalid" );
+
+    /**
+     * Key too weak.
+     */
     public static final ErrorType KRB_ERR_KEY_TOO_WEAK = new ErrorType( 65, "Key too weak" );
+
+    /**
+     * Certificates do not match.
+     */
     public static final ErrorType KRB_ERR_CERTIFICATE_MISMATCH = new ErrorType( 66, "Certificates do not match" );
+
+    /**
+     * No tgt for user-to-user authentication.
+     */
     public static final ErrorType KRB_AP_ERR_NO_TGT = new ErrorType( 67, "No tgt for user-to-user authentication" );
+
+    /**
+     * Wrong realm.
+     */
     public static final ErrorType KRB_ERR_WRONG_REALM = new ErrorType( 68, "Wrong realm" );
+
+    /**
+     * User-to-user authentication required.
+     */
     public static final ErrorType KRB_AP_ERR_USER_TO_USER_REQUIRED = new ErrorType( 69,
         "User-to-user authentication required" );
+
+    /**
+     * Can't verify certificate.
+     */
     public static final ErrorType KRB_ERR_CANT_VERIFY_CERTIFICATE = new ErrorType( 70, "Can't verify certificate" );
+
+    /**
+     * Invalid certificate.
+     */
     public static final ErrorType KRB_ERR_INVALID_CERTIFICATE = new ErrorType( 71, "Invalid certificate" );
+
+    /**
+     * Revoked certificate.
+     */
     public static final ErrorType KRB_ERR_REVOKED_CERTIFICATE = new ErrorType( 72, "Revoked certificate" );
+
+    /**
+     * Revocation status unknown.
+     */
     public static final ErrorType KRB_ERR_REVOCATION_STATUS_UNKNOWN = new ErrorType( 73, "Revocation status unknown" );
+
+    /**
+     * Revocation status unavailable.
+     */
     public static final ErrorType KRB_ERR_REVOCATION_STATUS_UNAVAILABLE = new ErrorType( 74,
         "Revocation status unavailable" );
+
+    /**
+     * Client names do not match.
+     */
     public static final ErrorType KRB_ERR_CLIENT_NAME_MISMATCH = new ErrorType( 75, "Client names do not match" );
+
+    /**
+     * KDC names do not match.
+     */
     public static final ErrorType KRB_ERR_KDC_NAME_MISMATCH = new ErrorType( 76, "KDC names do not match" );
 
-    /** Array for building a List of VALUES. */
+    /**
+     * Array for building a List of VALUES.
+     */
     private static final ErrorType[] values =
         { KDC_ERR_NONE, KDC_ERR_NAME_EXP, KDC_ERR_SERVICE_EXP, KDC_ERR_BAD_PVNO, KDC_ERR_C_OLD_MAST_KVNO,
             KDC_ERR_S_OLD_MAST_KVNO, KDC_ERR_C_PRINCIPAL_UNKNOWN, KDC_ERR_S_PRINCIPAL_UNKNOWN,
@@ -142,20 +403,26 @@
             KRB_ERR_REVOCATION_STATUS_UNKNOWN, KRB_ERR_REVOCATION_STATUS_UNAVAILABLE, KRB_ERR_CLIENT_NAME_MISMATCH,
             KRB_ERR_KDC_NAME_MISMATCH };
 
-    /** a list of all the error type constants */
+    /**
+     * A List of all the error type constants.
+     */
     public static final List VALUES = Collections.unmodifiableList( Arrays.asList( values ) );
 
-    /** the name of the error type */
+    /**
+     * The name of the error type.
+     */
     private final String name;
 
-    /** the value/code for the error type */
+    /**
+     * The value/code for the error type.
+     */
     private final int ordinal;
 
 
     /**
      * Private constructor prevents construction outside of this class.
      */
-    private ErrorType(int ordinal, String name)
+    private ErrorType( int ordinal, String name )
     {
         this.ordinal = ordinal;
         this.name = name;

Modified: directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/decoder/ApplicationRequestDecoder.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/decoder/ApplicationRequestDecoder.java?view=diff&rev=540371&r1=540370&r2=540371
==============================================================================
--- directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/decoder/ApplicationRequestDecoder.java (original)
+++ directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/decoder/ApplicationRequestDecoder.java Mon May 21 17:00:43 2007
@@ -41,6 +41,13 @@
  */
 public class ApplicationRequestDecoder
 {
+    /**
+     * Decodes a byte array into an {@link ApplicationRequest}.
+     *
+     * @param encodedAuthHeader
+     * @return The {@link ApplicationRequest}.
+     * @throws IOException
+     */
     public ApplicationRequest decode( byte[] encodedAuthHeader ) throws IOException
     {
         ASN1InputStream ais = new ASN1InputStream( encodedAuthHeader );

Modified: directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/decoder/ChecksumDecoder.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/decoder/ChecksumDecoder.java?view=diff&rev=540371&r1=540370&r2=540371
==============================================================================
--- directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/decoder/ChecksumDecoder.java (original)
+++ directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/decoder/ChecksumDecoder.java Mon May 21 17:00:43 2007
@@ -42,6 +42,8 @@
      *          cksumtype[0]   INTEGER,
      *          checksum[1]    OCTET STRING
      * }
+     * @param sequence 
+     * @return The {@link Checksum}.
      */
     public static Checksum decode( DERSequence sequence )
     {

Modified: directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/decoder/Decoder.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/decoder/Decoder.java?view=diff&rev=540371&r1=540370&r2=540371
==============================================================================
--- directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/decoder/Decoder.java (original)
+++ directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/decoder/Decoder.java Mon May 21 17:00:43 2007
@@ -32,5 +32,12 @@
  */
 public interface Decoder
 {
+    /**
+     * Decodes the byte array into an {@link Encodable} object.
+     *
+     * @param object
+     * @return The {@link Encodable} object.
+     * @throws IOException
+     */
     public Encodable decode( byte[] object ) throws IOException;
 }

Modified: directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/decoder/DecoderFactory.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/decoder/DecoderFactory.java?view=diff&rev=540371&r1=540370&r2=540371
==============================================================================
--- directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/decoder/DecoderFactory.java (original)
+++ directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/decoder/DecoderFactory.java Mon May 21 17:00:43 2007
@@ -27,5 +27,10 @@
  */
 public interface DecoderFactory
 {
+    /**
+     * Returns the {@link Decoder}.
+     *
+     * @return The {@link Decoder}.
+     */
     public Decoder getDecoder();
 }

Modified: directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/decoder/EncryptedDataDecoder.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/decoder/EncryptedDataDecoder.java?view=diff&rev=540371&r1=540370&r2=540371
==============================================================================
--- directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/decoder/EncryptedDataDecoder.java (original)
+++ directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/decoder/EncryptedDataDecoder.java Mon May 21 17:00:43 2007
@@ -40,6 +40,13 @@
  */
 public class EncryptedDataDecoder
 {
+    /**
+     * Decodes a byte array into an {@link EncryptedData}.
+     *
+     * @param encodedEncryptedData
+     * @return The {@link EncryptedData}.
+     * @throws IOException
+     */
     public static EncryptedData decode( byte[] encodedEncryptedData ) throws IOException
     {
         ASN1InputStream ais = new ASN1InputStream( encodedEncryptedData );
@@ -51,11 +58,16 @@
 
 
     /**
+     * Decodes a {@link DERSequence} into an {@link EncryptedData}.
+     * 
      * EncryptedData ::=   SEQUENCE {
      *             etype[0]     INTEGER, -- EncryptionEngine
      *             kvno[1]      INTEGER OPTIONAL,
      *             cipher[2]    OCTET STRING -- ciphertext
      * }
+     * 
+     * @param sequence 
+     * @return The {@link EncryptedData}.
      */
     public static EncryptedData decode( DERSequence sequence )
     {

Modified: directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/decoder/EncryptionKeyDecoder.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/decoder/EncryptionKeyDecoder.java?view=diff&rev=540371&r1=540370&r2=540371
==============================================================================
--- directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/decoder/EncryptionKeyDecoder.java (original)
+++ directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/decoder/EncryptionKeyDecoder.java Mon May 21 17:00:43 2007
@@ -20,10 +20,12 @@
 package org.apache.directory.server.kerberos.shared.io.decoder;
 
 
+import java.io.IOException;
 import java.util.Enumeration;
 
 import org.apache.directory.server.kerberos.shared.crypto.encryption.EncryptionType;
 import org.apache.directory.server.kerberos.shared.messages.value.EncryptionKey;
+import org.apache.directory.shared.asn1.der.ASN1InputStream;
 import org.apache.directory.shared.asn1.der.DEREncodable;
 import org.apache.directory.shared.asn1.der.DERInteger;
 import org.apache.directory.shared.asn1.der.DEROctetString;
@@ -37,6 +39,23 @@
  */
 public class EncryptionKeyDecoder
 {
+    /**
+     * Decodes a byte array into an {@link EncryptionKey}.
+     *
+     * @param encodedEncryptionKey
+     * @return The {@link EncryptionKey}.
+     * @throws IOException
+     */
+    public static EncryptionKey decode( byte[] encodedEncryptionKey ) throws IOException
+    {
+        ASN1InputStream ais = new ASN1InputStream( encodedEncryptionKey );
+
+        DERSequence sequence = ( DERSequence ) ais.readObject();
+
+        return decode( sequence );
+    }
+
+
     /**
      * EncryptionKey ::=   SEQUENCE {
      *     keytype[0]    INTEGER,

Modified: directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/decoder/KdcRequestDecoder.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/decoder/KdcRequestDecoder.java?view=diff&rev=540371&r1=540370&r2=540371
==============================================================================
--- directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/decoder/KdcRequestDecoder.java (original)
+++ directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/decoder/KdcRequestDecoder.java Mon May 21 17:00:43 2007
@@ -47,6 +47,13 @@
  */
 public class KdcRequestDecoder
 {
+    /**
+     * Decodes a {@link ByteBuffer} into a {@link KdcRequest}.
+     *
+     * @param in
+     * @return The {@link KdcRequest}.
+     * @throws IOException
+     */
     public KdcRequest decode( ByteBuffer in ) throws IOException
     {
         ASN1InputStream ais = new ASN1InputStream( in );

Modified: directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/decoder/PreAuthenticationDataDecoder.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/decoder/PreAuthenticationDataDecoder.java?view=diff&rev=540371&r1=540370&r2=540371
==============================================================================
--- directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/decoder/PreAuthenticationDataDecoder.java (original)
+++ directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/decoder/PreAuthenticationDataDecoder.java Mon May 21 17:00:43 2007
@@ -40,6 +40,13 @@
  */
 public class PreAuthenticationDataDecoder
 {
+    /**
+     * Decodes a byte array into {@link PreAuthenticationData}.
+     *
+     * @param encodedPreAuthData
+     * @return The {@link PreAuthenticationData}.
+     * @throws IOException
+     */
     public PreAuthenticationData decode( byte[] encodedPreAuthData ) throws IOException
     {
         ASN1InputStream ais = new ASN1InputStream( encodedPreAuthData );

Modified: directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/decoder/PrincipalNameDecoder.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/decoder/PrincipalNameDecoder.java?view=diff&rev=540371&r1=540370&r2=540371
==============================================================================
--- directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/decoder/PrincipalNameDecoder.java (original)
+++ directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/decoder/PrincipalNameDecoder.java Mon May 21 17:00:43 2007
@@ -38,10 +38,15 @@
 public class PrincipalNameDecoder
 {
     /**
+     * Decodes a {@link DERSequence} into a {@link PrincipalName}.
+     * 
      * PrincipalName ::=   SEQUENCE {
      *               name-type[0]     INTEGER,
      *               name-string[1]   SEQUENCE OF GeneralString
      * }
+     * 
+     * @param sequence 
+     * @return The {@link PrincipalName}.
      */
     public static PrincipalName decode( DERSequence sequence )
     {

Modified: directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/decoder/PrivateMessageDecoder.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/decoder/PrivateMessageDecoder.java?view=diff&rev=540371&r1=540370&r2=540371
==============================================================================
--- directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/decoder/PrivateMessageDecoder.java (original)
+++ directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/decoder/PrivateMessageDecoder.java Mon May 21 17:00:43 2007
@@ -39,6 +39,13 @@
  */
 public class PrivateMessageDecoder
 {
+    /**
+     * Decodes a byte array into a {@link PrivateMessage}.
+     *
+     * @param encodedPrivateMessage
+     * @return The {@link PrivateMessage}.
+     * @throws IOException
+     */
     public PrivateMessage decode( byte[] encodedPrivateMessage ) throws IOException
     {
         ASN1InputStream ais = new ASN1InputStream( encodedPrivateMessage );

Modified: directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/decoder/TicketDecoder.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/decoder/TicketDecoder.java?view=diff&rev=540371&r1=540370&r2=540371
==============================================================================
--- directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/decoder/TicketDecoder.java (original)
+++ directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/decoder/TicketDecoder.java Mon May 21 17:00:43 2007
@@ -39,6 +39,13 @@
  */
 public class TicketDecoder
 {
+    /**
+     * Decodes a {@link DERSequence} into an array of {@link Ticket}s.
+     *
+     * @param sequence
+     * @return The array of {@link Ticket}s.
+     * @throws IOException
+     */
     public static Ticket[] decodeSequence( DERSequence sequence ) throws IOException
     {
         Ticket[] tickets = new Ticket[sequence.size()];

Modified: directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/encoder/ApplicationReplyEncoder.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/encoder/ApplicationReplyEncoder.java?view=diff&rev=540371&r1=540370&r2=540371
==============================================================================
--- directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/encoder/ApplicationReplyEncoder.java (original)
+++ directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/encoder/ApplicationReplyEncoder.java Mon May 21 17:00:43 2007
@@ -37,9 +37,19 @@
  */
 public class ApplicationReplyEncoder
 {
+    /**
+     * Application code constant for the {@link ApplicationReply} (15).
+     */
     public static final int APPLICATION_CODE = 15;
 
 
+    /**
+     * Encodes an {@link ApplicationReply} into a byte array.
+     *
+     * @param reply
+     * @return The byte array.
+     * @throws IOException
+     */
     public byte[] encode( ApplicationReply reply ) throws IOException
     {
         ByteArrayOutputStream baos = new ByteArrayOutputStream();

Modified: directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/encoder/ChecksumEncoder.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/encoder/ChecksumEncoder.java?view=diff&rev=540371&r1=540370&r2=540371
==============================================================================
--- directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/encoder/ChecksumEncoder.java (original)
+++ directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/encoder/ChecksumEncoder.java Mon May 21 17:00:43 2007
@@ -34,10 +34,15 @@
 public class ChecksumEncoder
 {
     /**
+     * Encodes a {@link Checksum} into a {@link DERSequence}.
+     * 
      * Checksum ::=   SEQUENCE {
      *          cksumtype[0]   INTEGER,
      *          checksum[1]    OCTET STRING
      * }
+     * 
+     * @param checksum 
+     * @return The {@link DERSequence}.
      */
     public static DERSequence encode( Checksum checksum )
     {

Modified: directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/encoder/EncApRepPartEncoder.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/encoder/EncApRepPartEncoder.java?view=diff&rev=540371&r1=540370&r2=540371
==============================================================================
--- directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/encoder/EncApRepPartEncoder.java (original)
+++ directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/encoder/EncApRepPartEncoder.java Mon May 21 17:00:43 2007
@@ -38,6 +38,9 @@
  */
 public class EncApRepPartEncoder implements Encoder, EncoderFactory
 {
+    /**
+     * The application code constant for the {@link EncApRepPart} (27).
+     */
     public static final int APPLICATION_CODE = 27;
 
 
@@ -69,7 +72,7 @@
 
         if ( message.getSubSessionKey() != null )
         {
-            sequence.add( new DERTaggedObject( 2, EncryptionKeyEncoder.encode( message.getSubSessionKey() ) ) );
+            sequence.add( new DERTaggedObject( 2, EncryptionKeyEncoder.encodeSequence( message.getSubSessionKey() ) ) );
         }
 
         if ( message.getSequenceNumber() != null )

Modified: directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/encoder/EncAsRepPartEncoder.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/encoder/EncAsRepPartEncoder.java?view=diff&rev=540371&r1=540370&r2=540371
==============================================================================
--- directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/encoder/EncAsRepPartEncoder.java (original)
+++ directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/encoder/EncAsRepPartEncoder.java Mon May 21 17:00:43 2007
@@ -20,18 +20,26 @@
 package org.apache.directory.server.kerberos.shared.io.encoder;
 
 
+import org.apache.directory.server.kerberos.shared.messages.components.EncAsRepPart;
+
+
 /**
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
 public class EncAsRepPartEncoder extends EncKdcRepPartEncoder implements EncoderFactory
 {
-    /*
+    /**
+     * The application code constant for an {@link EncAsRepPart}.
+     * 
      * EncASRepPart ::=    [APPLICATION 25[25]] EncKDCRepPart
      */
     public static final int APPLICATION_CODE = 25;
 
 
+    /**
+     * Creates a new instance of EncAsRepPartEncoder.
+     */
     public EncAsRepPartEncoder()
     {
         super( APPLICATION_CODE );

Modified: directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/encoder/EncKdcRepPartEncoder.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/encoder/EncKdcRepPartEncoder.java?view=diff&rev=540371&r1=540370&r2=540371
==============================================================================
--- directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/encoder/EncKdcRepPartEncoder.java (original)
+++ directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/encoder/EncKdcRepPartEncoder.java Mon May 21 17:00:43 2007
@@ -82,7 +82,7 @@
     {
         DERSequence sequence = new DERSequence();
 
-        sequence.add( new DERTaggedObject( 0, EncryptionKeyEncoder.encode( reply.getKey() ) ) );
+        sequence.add( new DERTaggedObject( 0, EncryptionKeyEncoder.encodeSequence( reply.getKey() ) ) );
         sequence.add( new DERTaggedObject( 1, LastRequestEncoder.encode( reply.getLastRequest() ) ) );
         sequence.add( new DERTaggedObject( 2, DERInteger.valueOf( reply.getNonce() ) ) );
 

Modified: directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/encoder/EncTgsRepPartEncoder.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/encoder/EncTgsRepPartEncoder.java?view=diff&rev=540371&r1=540370&r2=540371
==============================================================================
--- directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/encoder/EncTgsRepPartEncoder.java (original)
+++ directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/encoder/EncTgsRepPartEncoder.java Mon May 21 17:00:43 2007
@@ -32,6 +32,9 @@
     public static final int APPLICATION_CODE = 26;
 
 
+    /**
+     * Creates a new instance of EncTgsRepPartEncoder.
+     */
     public EncTgsRepPartEncoder()
     {
         super( APPLICATION_CODE );

Modified: directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/encoder/EncTicketPartEncoder.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/encoder/EncTicketPartEncoder.java?view=diff&rev=540371&r1=540370&r2=540371
==============================================================================
--- directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/encoder/EncTicketPartEncoder.java (original)
+++ directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/encoder/EncTicketPartEncoder.java Mon May 21 17:00:43 2007
@@ -62,6 +62,8 @@
 
 
     /**
+     * Encodes an {@link EncTicketPart} into a {@link DERSequence}.
+     * 
      * -- Encrypted part of ticket
      * EncTicketPart ::=     [APPLICATION 3] SEQUENCE {
      *                       flags[0]             TicketFlags,
@@ -76,13 +78,16 @@
      *                       caddr[9]             HostAddresses OPTIONAL,
      *                       authorization-data[10]   AuthorizationData OPTIONAL
      * }
+     * 
+     * @param ticketPart 
+     * @return The {@link DERSequence}.
      */
     public DERSequence encodeInitialSequence( EncTicketPart ticketPart )
     {
         DERSequence sequence = new DERSequence();
 
         sequence.add( new DERTaggedObject( 0, new DERBitString( ticketPart.getFlags().getBytes() ) ) );
-        sequence.add( new DERTaggedObject( 1, EncryptionKeyEncoder.encode( ticketPart.getSessionKey() ) ) );
+        sequence.add( new DERTaggedObject( 1, EncryptionKeyEncoder.encodeSequence( ticketPart.getSessionKey() ) ) );
         sequence.add( new DERTaggedObject( 2, DERGeneralString.valueOf( ticketPart.getClientRealm().toString() ) ) );
         sequence.add( new DERTaggedObject( 3, PrincipalNameEncoder.encode( ticketPart.getClientPrincipal() ) ) );
         sequence.add( new DERTaggedObject( 4, TransitedEncodingEncoder.encode( ticketPart.getTransitedEncoding() ) ) );

Modified: directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/encoder/Encoder.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/encoder/Encoder.java?view=diff&rev=540371&r1=540370&r2=540371
==============================================================================
--- directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/encoder/Encoder.java (original)
+++ directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/encoder/Encoder.java Mon May 21 17:00:43 2007
@@ -32,5 +32,12 @@
  */
 public interface Encoder
 {
+    /**
+     * Encodes an ASN.1 {@link Encodable} object into a byte array.
+     *
+     * @param object
+     * @return The byte array.
+     * @throws IOException
+     */
     public byte[] encode( Encodable object ) throws IOException;
 }

Modified: directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/encoder/EncoderFactory.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/encoder/EncoderFactory.java?view=diff&rev=540371&r1=540370&r2=540371
==============================================================================
--- directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/encoder/EncoderFactory.java (original)
+++ directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/encoder/EncoderFactory.java Mon May 21 17:00:43 2007
@@ -27,5 +27,10 @@
  */
 public interface EncoderFactory
 {
+    /**
+     * Returns an {@link Encoder}.
+     *
+     * @return The {@link Encoder}.
+     */
     public Encoder getEncoder();
 }

Modified: directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/encoder/EncryptedDataEncoder.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/encoder/EncryptedDataEncoder.java?view=diff&rev=540371&r1=540370&r2=540371
==============================================================================
--- directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/encoder/EncryptedDataEncoder.java (original)
+++ directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/encoder/EncryptedDataEncoder.java Mon May 21 17:00:43 2007
@@ -37,6 +37,13 @@
  */
 public class EncryptedDataEncoder
 {
+    /**
+     * Encodes an {@link EncryptedData} into a byte array.
+     *
+     * @param encryptedData
+     * @return The byte array.
+     * @throws IOException
+     */
     public static byte[] encode( EncryptedData encryptedData ) throws IOException
     {
         ByteArrayOutputStream baos = new ByteArrayOutputStream();
@@ -50,11 +57,16 @@
 
 
     /**
+     * Encodes an {@link EncryptedData} into a {@link DERSequence}.
+     * 
      * EncryptedData ::=   SEQUENCE {
      *             etype[0]     INTEGER, -- EncryptionEngine
      *             kvno[1]      INTEGER OPTIONAL,
      *             cipher[2]    OCTET STRING -- ciphertext
      * }
+     * 
+     * @param encryptedData 
+     * @return The {@link DERSequence}.
      */
     public static DERSequence encodeSequence( EncryptedData encryptedData )
     {

Modified: directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/encoder/EncryptedTimestampEncoder.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/encoder/EncryptedTimestampEncoder.java?view=diff&rev=540371&r1=540370&r2=540371
==============================================================================
--- directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/encoder/EncryptedTimestampEncoder.java (original)
+++ directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/encoder/EncryptedTimestampEncoder.java Mon May 21 17:00:43 2007
@@ -23,6 +23,7 @@
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
 
+import org.apache.directory.server.kerberos.shared.messages.Encodable;
 import org.apache.directory.server.kerberos.shared.messages.value.EncryptedTimeStamp;
 import org.apache.directory.shared.asn1.der.ASN1OutputStream;
 import org.apache.directory.shared.asn1.der.DERInteger;
@@ -34,17 +35,23 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
-public class EncryptedTimestampEncoder
+public class EncryptedTimestampEncoder implements Encoder, EncoderFactory
 {
-    public byte[] encode( EncryptedTimeStamp encryptedTimestamp ) throws IOException
+    public byte[] encode( Encodable encryptedTimestamp ) throws IOException
     {
         ByteArrayOutputStream baos = new ByteArrayOutputStream();
         ASN1OutputStream aos = new ASN1OutputStream( baos );
 
-        aos.writeObject( encodeTimestamp( encryptedTimestamp ) );
+        aos.writeObject( encodeTimestamp( ( EncryptedTimeStamp ) encryptedTimestamp ) );
         aos.close();
 
         return baos.toByteArray();
+    }
+
+
+    public Encoder getEncoder()
+    {
+        return new EncryptedTimestampEncoder();
     }
 
 

Modified: directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/encoder/EncryptionKeyEncoder.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/encoder/EncryptionKeyEncoder.java?view=diff&rev=540371&r1=540370&r2=540371
==============================================================================
--- directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/encoder/EncryptionKeyEncoder.java (original)
+++ directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/encoder/EncryptionKeyEncoder.java Mon May 21 17:00:43 2007
@@ -20,7 +20,11 @@
 package org.apache.directory.server.kerberos.shared.io.encoder;
 
 
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+
 import org.apache.directory.server.kerberos.shared.messages.value.EncryptionKey;
+import org.apache.directory.shared.asn1.der.ASN1OutputStream;
 import org.apache.directory.shared.asn1.der.DERInteger;
 import org.apache.directory.shared.asn1.der.DEROctetString;
 import org.apache.directory.shared.asn1.der.DERSequence;
@@ -33,7 +37,26 @@
  */
 public class EncryptionKeyEncoder
 {
-    protected static DERSequence encode( EncryptionKey key )
+    /**
+     * Encodes an {@link EncryptionKey} into a byte array.
+     *
+     * @param key
+     * @return The byte array.
+     * @throws IOException
+     */
+    public static byte[] encode( EncryptionKey key ) throws IOException
+    {
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        ASN1OutputStream aos = new ASN1OutputStream( baos );
+
+        aos.writeObject( encodeSequence( key ) );
+        aos.close();
+
+        return baos.toByteArray();
+    }
+
+
+    protected static DERSequence encodeSequence( EncryptionKey key )
     {
         DERSequence vector = new DERSequence();
 

Modified: directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/encoder/EncryptionTypeInfoEncoder.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/encoder/EncryptionTypeInfoEncoder.java?view=diff&rev=540371&r1=540370&r2=540371
==============================================================================
--- directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/encoder/EncryptionTypeInfoEncoder.java (original)
+++ directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/encoder/EncryptionTypeInfoEncoder.java Mon May 21 17:00:43 2007
@@ -37,6 +37,13 @@
  */
 public class EncryptionTypeInfoEncoder
 {
+    /**
+     * Encodes an array of {@link EncryptionTypeInfoEntry}s into a byte array.
+     *
+     * @param entries
+     * @return The byte array.
+     * @throws IOException
+     */
     public static byte[] encode( EncryptionTypeInfoEntry[] entries ) throws IOException
     {
         ByteArrayOutputStream baos = new ByteArrayOutputStream();

Modified: directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/encoder/ErrorMessageEncoder.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/encoder/ErrorMessageEncoder.java?view=diff&rev=540371&r1=540370&r2=540371
==============================================================================
--- directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/encoder/ErrorMessageEncoder.java (original)
+++ directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/encoder/ErrorMessageEncoder.java Mon May 21 17:00:43 2007
@@ -40,6 +40,13 @@
  */
 public class ErrorMessageEncoder
 {
+    /**
+     * Encodes an {@link ErrorMessage} into a {@link ByteBuffer}.
+     *
+     * @param message
+     * @param out
+     * @throws IOException
+     */
     public void encode( ErrorMessage message, ByteBuffer out ) throws IOException
     {
         ASN1OutputStream aos = new ASN1OutputStream( out );
@@ -51,6 +58,13 @@
     }
 
 
+    /**
+     * Encodes an {@link ErrorMessage} into a byte array.
+     *
+     * @param message
+     * @return The byte array.
+     * @throws IOException
+     */
     public byte[] encode( ErrorMessage message ) throws IOException
     {
         ByteArrayOutputStream baos = new ByteArrayOutputStream();

Modified: directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/encoder/KdcReplyEncoder.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/encoder/KdcReplyEncoder.java?view=diff&rev=540371&r1=540370&r2=540371
==============================================================================
--- directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/encoder/KdcReplyEncoder.java (original)
+++ directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/encoder/KdcReplyEncoder.java Mon May 21 17:00:43 2007
@@ -40,9 +40,15 @@
  */
 public class KdcReplyEncoder
 {
-    /*
-     AS-REP ::=    [APPLICATION 11] KDC-REP
-     TGS-REP ::=   [APPLICATION 13] KDC-REP
+    /**
+     * Encodes a {@link KdcReply} into a {@link ByteBuffer}.
+     * 
+     * AS-REP ::=    [APPLICATION 11] KDC-REP
+     * TGS-REP ::=   [APPLICATION 13] KDC-REP
+     *
+     * @param app
+     * @param out
+     * @throws IOException
      */
     public void encode( KdcReply app, ByteBuffer out ) throws IOException
     {

Modified: directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/encoder/KdcReqBodyEncoder.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/encoder/KdcReqBodyEncoder.java?view=diff&rev=540371&r1=540370&r2=540371
==============================================================================
--- directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/encoder/KdcReqBodyEncoder.java (original)
+++ directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/encoder/KdcReqBodyEncoder.java Mon May 21 17:00:43 2007
@@ -38,6 +38,13 @@
  */
 public class KdcReqBodyEncoder
 {
+    /**
+     * Encodes a {@link KdcRequest} into a byte array.
+     *
+     * @param request
+     * @return The byte array.
+     * @throws IOException
+     */
     public byte[] encode( KdcRequest request ) throws IOException
     {
         ByteArrayOutputStream baos = new ByteArrayOutputStream();

Modified: directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/encoder/PreAuthenticationDataEncoder.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/encoder/PreAuthenticationDataEncoder.java?view=diff&rev=540371&r1=540370&r2=540371
==============================================================================
--- directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/encoder/PreAuthenticationDataEncoder.java (original)
+++ directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/encoder/PreAuthenticationDataEncoder.java Mon May 21 17:00:43 2007
@@ -37,6 +37,13 @@
  */
 public class PreAuthenticationDataEncoder
 {
+    /**
+     * Encodes an array of {@link PreAuthenticationData}s into a byte array.
+     *
+     * @param preAuth
+     * @return The byte array.
+     * @throws IOException
+     */
     public static byte[] encode( PreAuthenticationData[] preAuth ) throws IOException
     {
         ByteArrayOutputStream baos = new ByteArrayOutputStream();

Modified: directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/encoder/PrivateMessageEncoder.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/encoder/PrivateMessageEncoder.java?view=diff&rev=540371&r1=540370&r2=540371
==============================================================================
--- directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/encoder/PrivateMessageEncoder.java (original)
+++ directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/encoder/PrivateMessageEncoder.java Mon May 21 17:00:43 2007
@@ -37,6 +37,13 @@
  */
 public class PrivateMessageEncoder
 {
+    /**
+     * Encodes a {@link PrivateMessage} into a byte array.
+     *
+     * @param message
+     * @return The byte array.
+     * @throws IOException
+     */
     public byte[] encode( PrivateMessage message ) throws IOException
     {
         ByteArrayOutputStream baos = new ByteArrayOutputStream();

Modified: directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/jaas/CallbackHandlerBean.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/jaas/CallbackHandlerBean.java?view=diff&rev=540371&r1=540370&r2=540371
==============================================================================
--- directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/jaas/CallbackHandlerBean.java (original)
+++ directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/jaas/CallbackHandlerBean.java Mon May 21 17:00:43 2007
@@ -39,7 +39,13 @@
     private String password;
 
 
-    public CallbackHandlerBean(String name, String password)
+    /**
+     * Creates a new instance of CallbackHandlerBean.
+     *
+     * @param name
+     * @param password
+     */
+    public CallbackHandlerBean( String name, String password )
     {
         this.name = name;
         this.password = password;

Modified: directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/jaas/Krb5LoginConfiguration.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/jaas/Krb5LoginConfiguration.java?view=diff&rev=540371&r1=540370&r2=540371
==============================================================================
--- directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/jaas/Krb5LoginConfiguration.java (original)
+++ directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/jaas/Krb5LoginConfiguration.java Mon May 21 17:00:43 2007
@@ -36,11 +36,14 @@
     private static AppConfigurationEntry[] configList = new AppConfigurationEntry[1];
 
 
+    /**
+     * Creates a new instance of Krb5LoginConfiguration.
+     */
     public Krb5LoginConfiguration()
     {
         String loginModule = "com.sun.security.auth.module.Krb5LoginModule";
         LoginModuleControlFlag flag = LoginModuleControlFlag.REQUIRED;
-        configList[0] = new AppConfigurationEntry( loginModule, flag, new HashMap() );
+        configList[0] = new AppConfigurationEntry( loginModule, flag, new HashMap<String, Object>() );
     }
 
 

Modified: directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/ApplicationRequest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/ApplicationRequest.java?view=diff&rev=540371&r1=540370&r2=540371
==============================================================================
--- directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/ApplicationRequest.java (original)
+++ directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/ApplicationRequest.java Mon May 21 17:00:43 2007
@@ -39,7 +39,7 @@
 
 
     /**
-     * Class constructors
+     * Creates a new instance of ApplicationRequest.
      */
     public ApplicationRequest()
     {
@@ -48,7 +48,14 @@
     }
 
 
-    public ApplicationRequest(ApOptions apOptions, Ticket ticket, EncryptedData encPart)
+    /**
+     * Creates a new instance of ApplicationRequest.
+     *
+     * @param apOptions
+     * @param ticket
+     * @param encPart
+     */
+    public ApplicationRequest( ApOptions apOptions, Ticket ticket, EncryptedData encPart )
     {
         super( MessageType.KRB_AP_REQ );
         this.apOptions = apOptions;
@@ -57,67 +64,122 @@
     }
 
 
+    /**
+     * Returns the {@link ApOptions}.
+     *
+     * @return The {@link ApOptions}.
+     */
     public ApOptions getApOptions()
     {
         return apOptions;
     }
 
 
+    /**
+     * Returns the {@link Authenticator}.
+     *
+     * @return The {@link Authenticator}.
+     */
     public Authenticator getAuthenticator()
     {
         return authenticator;
     }
 
 
+    /**
+     * Returns the {@link Ticket}.
+     *
+     * @return The {@link Ticket}.
+     */
     public Ticket getTicket()
     {
         return ticket;
     }
 
 
-    // delegate ApOptions methods
+    /**
+     * Returns the option at a specified index.
+     *
+     * @param option
+     * @return The option.
+     */
     public boolean getOption( int option )
     {
         return apOptions.get( option );
     }
 
 
+    /**
+     * Sets the option at a specified index.
+     *
+     * @param option
+     */
     public void setOption( int option )
     {
         apOptions.set( option );
     }
 
 
+    /**
+     * Clears the option at a specified index.
+     *
+     * @param option
+     */
     public void clearOption( int option )
     {
         apOptions.clear( option );
     }
 
 
+    /**
+     * Returns the {@link EncryptedData}.
+     *
+     * @return The {@link EncryptedData}.
+     */
     public EncryptedData getEncPart()
     {
         return encPart;
     }
 
 
+    /**
+     * Sets the {@link EncryptedData}.
+     *
+     * @param data
+     */
     public void setEncPart( EncryptedData data )
     {
         encPart = data;
     }
 
 
+    /**
+     * Sets the {@link ApOptions}.
+     *
+     * @param options
+     */
     public void setApOptions( ApOptions options )
     {
         apOptions = options;
     }
 
 
+    /**
+     * Sets the {@link Authenticator}.
+     *
+     * @param authenticator
+     */
     public void setAuthenticator( Authenticator authenticator )
     {
         this.authenticator = authenticator;
     }
 
 
+    /**
+     * Sets the {@link Ticket}.
+     *
+     * @param ticket
+     */
     public void setTicket( Ticket ticket )
     {
         this.ticket = ticket;

Modified: directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/AuthenticationReply.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/AuthenticationReply.java?view=diff&rev=540371&r1=540370&r2=540371
==============================================================================
--- directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/AuthenticationReply.java (original)
+++ directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/AuthenticationReply.java Mon May 21 17:00:43 2007
@@ -34,7 +34,7 @@
 public class AuthenticationReply extends KdcReply
 {
     /**
-     * Class constructors
+     * Creates a new instance of AuthenticationReply.
      */
     public AuthenticationReply()
     {
@@ -42,8 +42,16 @@
     }
 
 
-    public AuthenticationReply(PreAuthenticationData[] paData, KerberosPrincipal clientPrincipal, Ticket ticket,
-        EncryptedData encPart)
+    /**
+     * Creates a new instance of AuthenticationReply.
+     *
+     * @param paData
+     * @param clientPrincipal
+     * @param ticket
+     * @param encPart
+     */
+    public AuthenticationReply( PreAuthenticationData[] paData, KerberosPrincipal clientPrincipal, Ticket ticket,
+        EncryptedData encPart )
     {
         super( paData, clientPrincipal, ticket, encPart, MessageType.KRB_AS_REP );
     }

Modified: directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/ErrorMessage.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/ErrorMessage.java?view=diff&rev=540371&r1=540370&r2=540371
==============================================================================
--- directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/ErrorMessage.java (original)
+++ directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/ErrorMessage.java Mon May 21 17:00:43 2007
@@ -42,9 +42,22 @@
     private byte[] explanatoryData; //optional
 
 
-    public ErrorMessage(KerberosTime clientTime, Integer clientMicroSecond, KerberosTime serverTime,
+    /**
+     * Creates a new instance of ErrorMessage.
+     *
+     * @param clientTime
+     * @param clientMicroSecond
+     * @param serverTime
+     * @param serverMicroSecond
+     * @param errorCode
+     * @param clientPrincipal
+     * @param serverPrincipal
+     * @param explanatoryText
+     * @param explanatoryData
+     */
+    public ErrorMessage( KerberosTime clientTime, Integer clientMicroSecond, KerberosTime serverTime,
         int serverMicroSecond, int errorCode, KerberosPrincipal clientPrincipal, KerberosPrincipal serverPrincipal,
-        String explanatoryText, byte[] explanatoryData)
+        String explanatoryText, byte[] explanatoryData )
     {
         super( MessageType.KRB_ERROR );
 
@@ -60,54 +73,99 @@
     }
 
 
+    /**
+     * Returns the client {@link KerberosPrincipal}.
+     *
+     * @return The client {@link KerberosPrincipal}.
+     */
     public KerberosPrincipal getClientPrincipal()
     {
         return clientPrincipal;
     }
 
 
+    /**
+     * Returns the client {@link KerberosTime}.
+     *
+     * @return The client {@link KerberosTime}.
+     */
     public KerberosTime getClientTime()
     {
         return clientTime;
     }
 
 
+    /**
+     * Returns the client microsecond.
+     *
+     * @return The client microsecond.
+     */
     public Integer getClientMicroSecond()
     {
         return clientMicroSecond;
     }
 
 
+    /**
+     * Returns the explanatory data.
+     *
+     * @return The explanatory data.
+     */
     public byte[] getExplanatoryData()
     {
         return explanatoryData;
     }
 
 
+    /**
+     * Returns the error code.
+     *
+     * @return The error code.
+     */
     public int getErrorCode()
     {
         return errorCode;
     }
 
 
+    /**
+     * Returns the explanatory text.
+     *
+     * @return The explanatory text.
+     */
     public String getExplanatoryText()
     {
         return explanatoryText;
     }
 
 
+    /**
+     * Returns the server {@link KerberosPrincipal}.
+     *
+     * @return The server {@link KerberosPrincipal}.
+     */
     public KerberosPrincipal getServerPrincipal()
     {
         return serverPrincipal;
     }
 
 
+    /**
+     * Returns the server {@link KerberosTime}.
+     *
+     * @return The server {@link KerberosTime}.
+     */
     public KerberosTime getServerTime()
     {
         return serverTime;
     }
 
 
+    /**
+     * Returns the server microsecond.
+     *
+     * @return The server microsecond.
+     */
     public int getServerMicroSecond()
     {
         return serverMicroSecond;

Modified: directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/ErrorMessageModifier.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/ErrorMessageModifier.java?view=diff&rev=540371&r1=540370&r2=540371
==============================================================================
--- directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/ErrorMessageModifier.java (original)
+++ directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/ErrorMessageModifier.java Mon May 21 17:00:43 2007
@@ -42,6 +42,11 @@
     private byte[] explanatoryData; //optional
 
 
+    /**
+     * Returns the {@link ErrorMessage}.
+     *
+     * @return The {@link ErrorMessage}.
+     */
     public ErrorMessage getErrorMessage()
     {
         return new ErrorMessage( clientTime, clientMicroSecond, serverTime, serverMicroSecond, errorCode,
@@ -49,54 +54,99 @@
     }
 
 
+    /**
+     * Sets the client {@link KerberosPrincipal}.
+     *
+     * @param principal
+     */
     public void setClientPrincipal( KerberosPrincipal principal )
     {
         this.clientPrincipal = principal;
     }
 
 
+    /**
+     * Sets the client {@link KerberosTime}.
+     *
+     * @param time
+     */
     public void setClientTime( KerberosTime time )
     {
         this.clientTime = time;
     }
 
 
+    /**
+     * Sets the client microsecond.
+     *
+     * @param clientMicroSecond
+     */
     public void setClientMicroSecond( Integer clientMicroSecond )
     {
         this.clientMicroSecond = clientMicroSecond;
     }
 
 
+    /**
+     * Sets the explanatory data.
+     *
+     * @param data
+     */
     public void setExplanatoryData( byte[] data )
     {
         this.explanatoryData = data;
     }
 
 
+    /**
+     * Sets the error code.
+     *
+     * @param code
+     */
     public void setErrorCode( int code )
     {
         this.errorCode = code;
     }
 
 
+    /**
+     * Sets the explanatory text.
+     *
+     * @param text
+     */
     public void setExplanatoryText( String text )
     {
         this.explanatoryText = text;
     }
 
 
+    /**
+     * Sets the server {@link KerberosPrincipal}.
+     *
+     * @param principal
+     */
     public void setServerPrincipal( KerberosPrincipal principal )
     {
         this.serverPrincipal = principal;
     }
 
 
+    /**
+     * Sets the server {@link KerberosTime}.
+     *
+     * @param time
+     */
     public void setServerTime( KerberosTime time )
     {
         this.serverTime = time;
     }
 
 
+    /**
+     * Sets the server microsecond.
+     *
+     * @param serverMicroSecond
+     */
     public void setServerMicroSecond( int serverMicroSecond )
     {
         this.serverMicroSecond = serverMicroSecond;

Modified: directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/KdcReply.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/KdcReply.java?view=diff&rev=540371&r1=540370&r2=540371
==============================================================================
--- directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/KdcReply.java (original)
+++ directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/KdcReply.java Mon May 21 17:00:43 2007
@@ -47,14 +47,28 @@
     private EncryptedData encPart;
 
 
-    public KdcReply(MessageType msgType)
+    /**
+     * Creates a new instance of KdcReply.
+     *
+     * @param msgType
+     */
+    public KdcReply( MessageType msgType )
     {
         super( msgType );
     }
 
 
-    public KdcReply(PreAuthenticationData[] paData, KerberosPrincipal clientPrincipal, Ticket ticket,
-        EncryptedData encPart, MessageType msgType)
+    /**
+     * Creates a new instance of KdcReply.
+     *
+     * @param paData
+     * @param clientPrincipal
+     * @param ticket
+     * @param encPart
+     * @param msgType
+     */
+    public KdcReply( PreAuthenticationData[] paData, KerberosPrincipal clientPrincipal, Ticket ticket,
+        EncryptedData encPart, MessageType msgType )
     {
         this( msgType );
         this.paData = paData;
@@ -64,62 +78,110 @@
     }
 
 
-    // getters
+    /**
+     * Returns the client {@link KerberosPrincipal}.
+     *
+     * @return The client {@link KerberosPrincipal}.
+     */
     public KerberosPrincipal getClientPrincipal()
     {
         return clientPrincipal;
     }
 
 
+    /**
+     * Returns the client realm.
+     *
+     * @return The client realm.
+     */
     public String getClientRealm()
     {
         return clientPrincipal.getRealm();
     }
 
 
+    /**
+     * Returns the {@link EncryptedData}.
+     *
+     * @return The {@link EncryptedData}.
+     */
     public EncryptedData getEncPart()
     {
         return encPart;
     }
 
 
+    /**
+     * Returns an array of {@link PreAuthenticationData}s.
+     *
+     * @return The array of {@link PreAuthenticationData}s.
+     */
     public PreAuthenticationData[] getPaData()
     {
         return paData;
     }
 
 
+    /**
+     * Returns the {@link Ticket}.
+     *
+     * @return The {@link Ticket}.
+     */
     public Ticket getTicket()
     {
         return ticket;
     }
 
 
-    // setters
+    /**
+     * Sets the client {@link KerberosPrincipal}.
+     *
+     * @param clientPrincipal
+     */
     public void setClientPrincipal( KerberosPrincipal clientPrincipal )
     {
         this.clientPrincipal = clientPrincipal;
     }
 
 
+    /**
+     * Sets the {@link EncKdcRepPart}.
+     *
+     * @param repPart
+     */
     public void setEncKDCRepPart( EncKdcRepPart repPart )
     {
         encKDCRepPart = repPart;
     }
 
 
+    /**
+     * Sets the {@link EncryptedData}.
+     *
+     * @param part
+     */
     public void setEncPart( EncryptedData part )
     {
         encPart = part;
     }
 
 
+    /**
+     * Sets the array of {@link PreAuthenticationData}s.
+     *
+     * @param data
+     */
     public void setPaData( PreAuthenticationData[] data )
     {
         paData = data;
     }
 
 
+    /**
+     * Sets the {@link Ticket}.
+     *
+     * @param ticket
+     */
     public void setTicket( Ticket ticket )
     {
         this.ticket = ticket;
@@ -127,72 +189,133 @@
 
 
     // EncKdcRepPart delegate getters
+
+    /**
+     * Returns the auth {@link KerberosTime}.
+     *
+     * @return The auth {@link KerberosTime}.
+     */
     public KerberosTime getAuthTime()
     {
         return encKDCRepPart.getAuthTime();
     }
 
 
+    /**
+     * Returns the client {@link HostAddresses}.
+     *
+     * @return The client {@link HostAddresses}.
+     */
     public HostAddresses getClientAddresses()
     {
         return encKDCRepPart.getClientAddresses();
     }
 
 
+    /**
+     * Return the end {@link KerberosTime}.
+     *
+     * @return The end {@link KerberosTime}.
+     */
     public KerberosTime getEndTime()
     {
         return encKDCRepPart.getEndTime();
     }
 
 
+    /**
+     * Returns the {@link TicketFlags}.
+     *
+     * @return The {@link TicketFlags}.
+     */
     public TicketFlags getFlags()
     {
         return encKDCRepPart.getFlags();
     }
 
 
+    /**
+     * Returns the {@link EncryptionKey}.
+     *
+     * @return The {@link EncryptionKey}.
+     */
     public EncryptionKey getKey()
     {
         return encKDCRepPart.getKey();
     }
 
 
+    /**
+     * Returns the key expiration {@link KerberosTime}.
+     *
+     * @return The key expiration {@link KerberosTime}.
+     */
     public KerberosTime getKeyExpiration()
     {
         return encKDCRepPart.getKeyExpiration();
     }
 
 
+    /**
+     * Returns the {@link LastRequest}.
+     *
+     * @return The {@link LastRequest}.
+     */
     public LastRequest getLastRequest()
     {
         return encKDCRepPart.getLastRequest();
     }
 
 
+    /**
+     * Returns the nonce.
+     *
+     * @return The nonce.
+     */
     public int getNonce()
     {
         return encKDCRepPart.getNonce();
     }
 
 
+    /**
+     * Returns the renew till {@link KerberosTime}.
+     *
+     * @return The renew till {@link KerberosTime}.
+     */
     public KerberosTime getRenewTill()
     {
         return encKDCRepPart.getRenewTill();
     }
 
 
+    /**
+     * Returns the server {@link KerberosPrincipal}.
+     *
+     * @return The server {@link KerberosPrincipal}.
+     */
     public KerberosPrincipal getServerPrincipal()
     {
         return encKDCRepPart.getServerPrincipal();
     }
 
 
+    /**
+     * Return the server realm.
+     *
+     * @return The server realm.
+     */
     public String getServerRealm()
     {
         return encKDCRepPart.getServerRealm();
     }
 
 
+    /**
+     * Returns the start {@link KerberosTime}.
+     *
+     * @return The start {@link KerberosTime}.
+     */
     public KerberosTime getStartTime()
     {
         return encKDCRepPart.getStartTime();
@@ -200,66 +323,122 @@
 
 
     // EncKdcRepPart delegate setters
+
+    /**
+     * Sets the auth {@link KerberosTime}.
+     *
+     * @param time
+     */
     public void setAuthTime( KerberosTime time )
     {
         encKDCRepPart.setAuthTime( time );
     }
 
 
+    /**
+     * Sets the client {@link HostAddresses}.
+     *
+     * @param addresses
+     */
     public void setClientAddresses( HostAddresses addresses )
     {
         encKDCRepPart.setClientAddresses( addresses );
     }
 
 
+    /**
+     * Sets the end {@link KerberosTime}.
+     *
+     * @param time
+     */
     public void setEndTime( KerberosTime time )
     {
         encKDCRepPart.setEndTime( time );
     }
 
 
+    /**
+     * Sets the {@link TicketFlags}.
+     *
+     * @param flags
+     */
     public void setFlags( TicketFlags flags )
     {
         encKDCRepPart.setFlags( flags );
     }
 
 
+    /**
+     * Sets the {@link EncryptionKey}.
+     *
+     * @param key
+     */
     public void setKey( EncryptionKey key )
     {
         encKDCRepPart.setKey( key );
     }
 
 
+    /**
+     * Sets the key expiration {@link KerberosTime}.
+     *
+     * @param expiration
+     */
     public void setKeyExpiration( KerberosTime expiration )
     {
         encKDCRepPart.setKeyExpiration( expiration );
     }
 
 
+    /**
+     * Sets the {@link LastRequest}.
+     *
+     * @param request
+     */
     public void setLastRequest( LastRequest request )
     {
         encKDCRepPart.setLastRequest( request );
     }
 
 
+    /**
+     * Sets the nonce.
+     *
+     * @param nonce
+     */
     public void setNonce( int nonce )
     {
         encKDCRepPart.setNonce( nonce );
     }
 
 
+    /**
+     * Sets the renew till {@link KerberosTime}.
+     *
+     * @param till
+     */
     public void setRenewTill( KerberosTime till )
     {
         encKDCRepPart.setRenewTill( till );
     }
 
 
+    /**
+     * Sets the server {@link KerberosPrincipal}.
+     *
+     * @param principal
+     */
     public void setServerPrincipal( KerberosPrincipal principal )
     {
         encKDCRepPart.setServerPrincipal( principal );
     }
 
 
+    /**
+     * Sets the start {@link KerberosTime}.
+     *
+     * @param time
+     */
     public void setStartTime( KerberosTime time )
     {
         encKDCRepPart.setStartTime( time );

Modified: directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/KdcRequest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/KdcRequest.java?view=diff&rev=540371&r1=540370&r2=540371
==============================================================================
--- directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/KdcRequest.java (original)
+++ directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/KdcRequest.java Mon May 21 17:00:43 2007
@@ -43,7 +43,15 @@
     private byte[] bodyBytes;
 
 
-    public KdcRequest(int pvno, MessageType messageType, PreAuthenticationData[] preAuthData, RequestBody requestBody)
+    /**
+     * Creates a new instance of KdcRequest.
+     *
+     * @param pvno
+     * @param messageType
+     * @param preAuthData
+     * @param requestBody
+     */
+    public KdcRequest( int pvno, MessageType messageType, PreAuthenticationData[] preAuthData, RequestBody requestBody )
     {
         super( pvno, messageType );
         this.preAuthData = preAuthData;
@@ -51,20 +59,40 @@
     }
 
 
-    public KdcRequest(int pvno, MessageType messageType, PreAuthenticationData[] preAuthData, RequestBody requestBody,
-        byte[] bodyBytes)
+    /**
+     * Creates a new instance of KdcRequest.
+     *
+     * @param pvno
+     * @param messageType
+     * @param preAuthData
+     * @param requestBody
+     * @param bodyBytes
+     */
+    public KdcRequest( int pvno, MessageType messageType, PreAuthenticationData[] preAuthData, RequestBody requestBody,
+        byte[] bodyBytes )
     {
         this( pvno, messageType, preAuthData, requestBody );
         this.bodyBytes = bodyBytes;
     }
 
 
+    /**
+     * Returns an array of {@link PreAuthenticationData}s.
+     *
+     * @return The array of {@link PreAuthenticationData}s.
+     */
     public PreAuthenticationData[] getPreAuthData()
     {
         return preAuthData;
     }
 
 
+    /**
+     * Returns the bytes of the body.  This is used for verifying checksums in
+     * the Ticket-Granting Service (TGS).
+     *
+     * @return The bytes of the body.
+     */
     public byte[] getBodyBytes()
     {
         return bodyBytes;
@@ -72,72 +100,133 @@
 
 
     // RequestBody delegate methods
+
+    /**
+     * Returns additional {@link Ticket}s.
+     *
+     * @return The {@link Ticket}s.
+     */
     public Ticket[] getAdditionalTickets()
     {
         return requestBody.getAdditionalTickets();
     }
 
 
+    /**
+     * Returns the {@link HostAddresses}.
+     *
+     * @return The {@link HostAddresses}.
+     */
     public HostAddresses getAddresses()
     {
         return requestBody.getAddresses();
     }
 
 
+    /**
+     * Returns the client {@link KerberosPrincipal}.
+     *
+     * @return The client {@link KerberosPrincipal}.
+     */
     public KerberosPrincipal getClientPrincipal()
     {
         return requestBody.getClientPrincipal();
     }
 
 
+    /**
+     * Returns the realm of the server principal.
+     *
+     * @return The realm.
+     */
     public String getRealm()
     {
         return requestBody.getServerPrincipal().getRealm();
     }
 
 
+    /**
+     * Returns the {@link EncryptedData}.
+     *
+     * @return The {@link EncryptedData}.
+     */
     public EncryptedData getEncAuthorizationData()
     {
         return requestBody.getEncAuthorizationData();
     }
 
 
+    /**
+     * Returns an array of requested {@link EncryptionType}s.
+     *
+     * @return The array of {@link EncryptionType}s.
+     */
     public EncryptionType[] getEType()
     {
         return requestBody.getEType();
     }
 
 
+    /**
+     * Returns the from {@link KerberosTime}.
+     *
+     * @return The from {@link KerberosTime}.
+     */
     public KerberosTime getFrom()
     {
         return requestBody.getFrom();
     }
 
 
+    /**
+     * Returns the {@link KdcOptions}.
+     *
+     * @return The {@link KdcOptions}.
+     */
     public KdcOptions getKdcOptions()
     {
         return requestBody.getKdcOptions();
     }
 
 
+    /**
+     * Returns the nonce.
+     *
+     * @return The nonce.
+     */
     public int getNonce()
     {
         return requestBody.getNonce();
     }
 
 
+    /**
+     * Returns the "R" {@link KerberosTime}.
+     *
+     * @return The "R" {@link KerberosTime}.
+     */
     public KerberosTime getRtime()
     {
         return requestBody.getRtime();
     }
 
 
+    /**
+     * Returns the server {@link KerberosPrincipal}.
+     *
+     * @return The server {@link KerberosPrincipal}.
+     */
     public KerberosPrincipal getServerPrincipal()
     {
         return requestBody.getServerPrincipal();
     }
 
 
+    /**
+     * Returns the till {@link KerberosTime}.
+     *
+     * @return The till {@link KerberosTime}.
+     */
     public KerberosTime getTill()
     {
         return requestBody.getTill();
@@ -145,18 +234,35 @@
 
 
     // RequestBody KdcOptions delegate accesors
+
+    /**
+     * Returns the option at the specified index.
+     *
+     * @param option
+     * @return The option.
+     */
     public boolean getOption( int option )
     {
         return requestBody.getKdcOptions().get( option );
     }
 
 
+    /**
+     * Sets the option at the specified index.
+     *
+     * @param option
+     */
     public void setOption( int option )
     {
         requestBody.getKdcOptions().set( option );
     }
 
 
+    /**
+     * Clears the option at the specified index.
+     *
+     * @param option
+     */
     public void clearOption( int option )
     {
         requestBody.getKdcOptions().clear( option );

Modified: directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/KerberosMessage.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/KerberosMessage.java?view=diff&rev=540371&r1=540370&r2=540371
==============================================================================
--- directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/KerberosMessage.java (original)
+++ directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/KerberosMessage.java Mon May 21 17:00:43 2007
@@ -26,44 +26,77 @@
  */
 public class KerberosMessage
 {
-    // Kerberos protocol version number
+    /**
+     * The Kerberos protocol version number (5).
+     */
     public static final int PVNO = 5;
 
     private int protocolVersionNumber;
     private MessageType messageType;
 
 
-    public KerberosMessage(MessageType type)
+    /**
+     * Creates a new instance of KerberosMessage.
+     *
+     * @param type
+     */
+    public KerberosMessage( MessageType type )
     {
         this( PVNO, type );
     }
 
 
-    public KerberosMessage(int versionNumber, MessageType type)
+    /**
+     * Creates a new instance of KerberosMessage.
+     *
+     * @param versionNumber
+     * @param type
+     */
+    public KerberosMessage( int versionNumber, MessageType type )
     {
         protocolVersionNumber = versionNumber;
         messageType = type;
     }
 
 
+    /**
+     * Returns the {@link MessageType}.
+     *
+     * @return The {@link MessageType}.
+     */
     public MessageType getMessageType()
     {
         return messageType;
     }
 
 
+    /**
+     * Sets the {@link MessageType}.
+     *
+     * @param type
+     */
     public void setMessageType( MessageType type )
     {
         messageType = type;
     }
 
 
+    /**
+     * Returns the protocol version number.
+     *
+     * @return The protocol version number.
+     */
     public int getProtocolVersionNumber()
     {
         return protocolVersionNumber;
     }
 
 
+    /**
+     * Sets the protocol version number.
+     *
+     * @param versionNumber
+     */
     public void setProtocolVersionNumber( int versionNumber )
     {
         protocolVersionNumber = versionNumber;

Modified: directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/MessageType.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/MessageType.java?view=diff&rev=540371&r1=540370&r2=540371
==============================================================================
--- directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/MessageType.java (original)
+++ directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/MessageType.java Mon May 21 17:00:43 2007
@@ -32,61 +32,110 @@
 public final class MessageType implements Comparable
 {
     /**
-     * Enumeration elements are constructed once upon class loading.
-     * Order of appearance here determines the order of compareTo.
+     * Constant for the "null" message type.
      */
     public static final MessageType NULL = new MessageType( 0, "null" );
+
+    /**
+     * Constant for the "initial authentication request" message type.
+     */
     public static final MessageType KRB_AS_REQ = new MessageType( 10, "initial authentication request" );
+
+    /**
+     * Constant for the "initial authentication response" message type.
+     */
     public static final MessageType KRB_AS_REP = new MessageType( 11, "initial authentication response" );
+
+    /**
+     * Constant for the "request for authentication based on TGT" message type.
+     */
     public static final MessageType KRB_TGS_REQ = new MessageType( 12, "request for authentication based on TGT" );
+
+    /**
+     * Constant for the "response to authentication based on TGT" message type.
+     */
     public static final MessageType KRB_TGS_REP = new MessageType( 13, "response to authentication based on TGT" );
+
+    /**
+     * Constant for the "application request" message type.
+     */
     public static final MessageType KRB_AP_REQ = new MessageType( 14, "application request" );
+
+    /**
+     * Constant for the "application response" message type.
+     */
     public static final MessageType KRB_AP_REP = new MessageType( 15, "application response" );
+
+    /**
+     * Constant for the "safe (checksummed) application message" message type.
+     */
     public static final MessageType KRB_SAFE = new MessageType( 20, "safe (checksummed) application message" );
+
+    /**
+     * Constant for the "private (encrypted) application message" message type.
+     */
     public static final MessageType KRB_PRIV = new MessageType( 21, "private (encrypted) application message" );
+
+    /**
+     * Constant for the "private (encrypted) message to forward credentials" message type.
+     */
     public static final MessageType KRB_CRED = new MessageType( 22,
         "private (encrypted) message to forward credentials" );
+
+    /**
+     * Constant for the "encrypted application reply part" message type.
+     */
     public static final MessageType ENC_AP_REP_PART = new MessageType( 27, "encrypted application reply part" );
+
+    /**
+     * Constant for the "encrypted private message part" message type.
+     */
     public static final MessageType ENC_PRIV_PART = new MessageType( 28, "encrypted private message part" );
+
+    /**
+     * Constant for the "error response" message type.
+     */
     public static final MessageType KRB_ERROR = new MessageType( 30, "error response" );
 
-    /** Array for building a List of VALUES. */
+    /**
+     * Array for building a List of VALUES.
+     */
     private static final MessageType[] values =
         { NULL, KRB_AS_REQ, KRB_AS_REP, KRB_TGS_REQ, KRB_TGS_REP, KRB_AP_REQ, KRB_AP_REP, KRB_SAFE, KRB_PRIV, KRB_CRED,
             ENC_AP_REP_PART, ENC_PRIV_PART, KRB_ERROR };
 
-    /** A list of all the message type constants. */
+    /**
+     * A list of all the message type constants.
+     */
     public static final List VALUES = Collections.unmodifiableList( Arrays.asList( values ) );
 
-    /** the name of the message type */
+    /**
+     * The name of the message type.
+     */
     private final String name;
 
-    /** the value/code for the message type */
+    /**
+     * The value/code for the message type.
+     */
     private final int ordinal;
 
 
     /**
      * Private constructor prevents construction outside of this class.
      */
-    private MessageType(int ordinal, String name)
+    private MessageType( int ordinal, String name )
     {
         this.ordinal = ordinal;
         this.name = name;
     }
 
 
-    public String toString()
-    {
-        return name + " (" + ordinal + ")";
-    }
-
-
-    public int compareTo( Object that )
-    {
-        return ordinal - ( ( MessageType ) that ).ordinal;
-    }
-
-
+    /**
+     * Returns the message type when specified by its ordinal.
+     *
+     * @param type
+     * @return The message type.
+     */
     public static MessageType getTypeByOrdinal( int type )
     {
         for ( int ii = 0; ii < values.length; ii++ )
@@ -101,8 +150,25 @@
     }
 
 
+    /**
+     * Returns the number associated with this message type.
+     *
+     * @return The message type ordinal.
+     */
     public int getOrdinal()
     {
         return ordinal;
+    }
+
+
+    public int compareTo( Object that )
+    {
+        return ordinal - ( ( MessageType ) that ).ordinal;
+    }
+
+
+    public String toString()
+    {
+        return name + " (" + ordinal + ")";
     }
 }



Mime
View raw message