directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r591019 [1/2] - in /directory: apacheds/branches/bigbang/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/ apacheds/branches/bigbang/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/decod...
Date Thu, 01 Nov 2007 14:16:50 GMT
Author: elecharny
Date: Thu Nov  1 07:16:34 2007
New Revision: 591019

URL: http://svn.apache.org/viewvc?rev=591019&view=rev
Log:
Removed the redondant TicketFlags and only use the Enum.
Fixed a bad bug in TicketFlags creation (the value was not initialized) and another one in value computation.

Removed:
    directory/apacheds/branches/bigbang/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/TicketFlags.java
Modified:
    directory/apacheds/branches/bigbang/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/KerberosUtils.java
    directory/apacheds/branches/bigbang/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/decoder/EncKdcRepPartDecoder.java
    directory/apacheds/branches/bigbang/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/decoder/EncTicketPartDecoder.java
    directory/apacheds/branches/bigbang/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/KdcReply.java
    directory/apacheds/branches/bigbang/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/components/EncAsRepPart.java
    directory/apacheds/branches/bigbang/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/components/EncKdcRepPart.java
    directory/apacheds/branches/bigbang/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/components/EncTgsRepPart.java
    directory/apacheds/branches/bigbang/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/components/EncTicketPart.java
    directory/apacheds/branches/bigbang/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/components/EncTicketPartModifier.java
    directory/apacheds/branches/bigbang/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/KrbCredInfo.java
    directory/apacheds/branches/bigbang/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/flags/AbstractKerberosFlags.java
    directory/apacheds/branches/bigbang/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/flags/KerberosFlag.java
    directory/apacheds/branches/bigbang/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/flags/KerberosFlags.java
    directory/apacheds/branches/bigbang/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/flags/TicketFlag.java
    directory/apacheds/branches/bigbang/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/flags/TicketFlags.java
    directory/apacheds/branches/bigbang/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/TicketFactory.java
    directory/apacheds/branches/bigbang/protocol-changepw/src/main/java/org/apache/directory/server/changepw/service/ChangePasswordService.java
    directory/apacheds/branches/bigbang/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/authentication/AuthenticationService.java
    directory/apacheds/branches/bigbang/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/ticketgrant/TicketGrantingService.java
    directory/apacheds/branches/bigbang/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/messages/value/OptionsTest.java
    directory/apacheds/branches/bigbang/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/protocol/AbstractTicketGrantingServiceTest.java
    directory/apacheds/branches/bigbang/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/protocol/AuthenticationEncryptionTypeTest.java
    directory/apacheds/branches/bigbang/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/protocol/AuthenticationServiceTest.java
    directory/apacheds/branches/bigbang/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/protocol/TicketGrantingPolicyTest.java
    directory/apacheds/branches/bigbang/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/protocol/TicketGrantingServiceTest.java
    directory/clients/branches/bigbang/kerberos/client/src/main/java/org/apache/directory/client/kerberos/GetServiceTicket.java
    directory/clients/branches/bigbang/kerberos/client/src/main/java/org/apache/directory/client/kerberos/GetTicketGrantingTicket.java

Modified: directory/apacheds/branches/bigbang/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/KerberosUtils.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/KerberosUtils.java?rev=591019&r1=591018&r2=591019&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/KerberosUtils.java (original)
+++ directory/apacheds/branches/bigbang/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/KerberosUtils.java Thu Nov  1 07:16:34 2007
@@ -41,7 +41,6 @@
 import org.apache.directory.server.kerberos.shared.messages.value.HostAddress;
 import org.apache.directory.server.kerberos.shared.messages.value.KerberosTime;
 import org.apache.directory.server.kerberos.shared.messages.value.PrincipalName;
-import org.apache.directory.server.kerberos.shared.messages.value.TicketFlags;
 import org.apache.directory.server.kerberos.shared.replay.ReplayCache;
 import org.apache.directory.server.kerberos.shared.store.PrincipalStore;
 import org.apache.directory.server.kerberos.shared.store.PrincipalStoreEntry;
@@ -442,7 +441,7 @@
         KerberosTime now = new KerberosTime();
         boolean isValidStartTime = startTime.lessThan( now );
 
-        if ( !isValidStartTime || ( ticket.getEncTicketPart().getFlags().get( TicketFlags.INVALID ) && !isValidate ) )
+        if ( !isValidStartTime || ( ticket.getEncTicketPart().getFlags().isInvalid() && !isValidate ) )
         {
             // it hasn't yet become valid
             throw new KerberosException( ErrorType.KRB_AP_ERR_TKT_NYV );

Modified: directory/apacheds/branches/bigbang/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/decoder/EncKdcRepPartDecoder.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/decoder/EncKdcRepPartDecoder.java?rev=591019&r1=591018&r2=591019&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/decoder/EncKdcRepPartDecoder.java (original)
+++ directory/apacheds/branches/bigbang/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/decoder/EncKdcRepPartDecoder.java Thu Nov  1 07:16:34 2007
@@ -26,7 +26,7 @@
 import org.apache.directory.server.kerberos.shared.messages.Encodable;
 import org.apache.directory.server.kerberos.shared.messages.components.EncKdcRepPart;
 import org.apache.directory.server.kerberos.shared.messages.value.KerberosPrincipalModifier;
-import org.apache.directory.server.kerberos.shared.messages.value.TicketFlags;
+import org.apache.directory.server.kerberos.shared.messages.value.flags.TicketFlags;
 import org.apache.directory.shared.asn1.der.ASN1InputStream;
 import org.apache.directory.shared.asn1.der.DERApplicationSpecific;
 import org.apache.directory.shared.asn1.der.DERBitString;
@@ -83,7 +83,7 @@
         EncKdcRepPart modifier = new EncKdcRepPart();
         KerberosPrincipalModifier principalModifier = new KerberosPrincipalModifier();
 
-        for ( Enumeration e = sequence.getObjects(); e.hasMoreElements(); )
+        for ( Enumeration<DEREncodable> e = sequence.getObjects(); e.hasMoreElements(); )
         {
             DERTaggedObject object = ( DERTaggedObject ) e.nextElement();
             int tag = object.getTagNo();

Modified: directory/apacheds/branches/bigbang/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/decoder/EncTicketPartDecoder.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/decoder/EncTicketPartDecoder.java?rev=591019&r1=591018&r2=591019&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/decoder/EncTicketPartDecoder.java (original)
+++ directory/apacheds/branches/bigbang/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/io/decoder/EncTicketPartDecoder.java Thu Nov  1 07:16:34 2007
@@ -26,8 +26,8 @@
 import org.apache.directory.server.kerberos.shared.messages.Encodable;
 import org.apache.directory.server.kerberos.shared.messages.components.EncTicketPart;
 import org.apache.directory.server.kerberos.shared.messages.components.EncTicketPartModifier;
-import org.apache.directory.server.kerberos.shared.messages.value.TicketFlags;
 import org.apache.directory.server.kerberos.shared.messages.value.TransitedEncoding;
+import org.apache.directory.server.kerberos.shared.messages.value.flags.TicketFlags;
 import org.apache.directory.server.kerberos.shared.messages.value.types.TransitedEncodingType;
 import org.apache.directory.shared.asn1.der.ASN1InputStream;
 import org.apache.directory.shared.asn1.der.DERApplicationSpecific;

Modified: directory/apacheds/branches/bigbang/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/KdcReply.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/KdcReply.java?rev=591019&r1=591018&r2=591019&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/KdcReply.java (original)
+++ directory/apacheds/branches/bigbang/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/KdcReply.java Thu Nov  1 07:16:34 2007
@@ -31,7 +31,7 @@
 import org.apache.directory.server.kerberos.shared.messages.value.KerberosTime;
 import org.apache.directory.server.kerberos.shared.messages.value.LastRequest;
 import org.apache.directory.server.kerberos.shared.messages.value.PaData;
-import org.apache.directory.server.kerberos.shared.messages.value.TicketFlags;
+import org.apache.directory.server.kerberos.shared.messages.value.flags.TicketFlags;
 
 
 /**

Modified: directory/apacheds/branches/bigbang/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/components/EncAsRepPart.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/components/EncAsRepPart.java?rev=591019&r1=591018&r2=591019&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/components/EncAsRepPart.java (original)
+++ directory/apacheds/branches/bigbang/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/components/EncAsRepPart.java Thu Nov  1 07:16:34 2007
@@ -26,7 +26,7 @@
 import org.apache.directory.server.kerberos.shared.messages.value.HostAddresses;
 import org.apache.directory.server.kerberos.shared.messages.value.KerberosTime;
 import org.apache.directory.server.kerberos.shared.messages.value.LastRequest;
-import org.apache.directory.server.kerberos.shared.messages.value.TicketFlags;
+import org.apache.directory.server.kerberos.shared.messages.value.flags.TicketFlags;
 
 
 /**

Modified: directory/apacheds/branches/bigbang/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/components/EncKdcRepPart.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/components/EncKdcRepPart.java?rev=591019&r1=591018&r2=591019&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/components/EncKdcRepPart.java (original)
+++ directory/apacheds/branches/bigbang/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/components/EncKdcRepPart.java Thu Nov  1 07:16:34 2007
@@ -27,7 +27,7 @@
 import org.apache.directory.server.kerberos.shared.messages.value.HostAddresses;
 import org.apache.directory.server.kerberos.shared.messages.value.KerberosTime;
 import org.apache.directory.server.kerberos.shared.messages.value.LastRequest;
-import org.apache.directory.server.kerberos.shared.messages.value.TicketFlags;
+import org.apache.directory.server.kerberos.shared.messages.value.flags.TicketFlags;
 
 
 /**

Modified: directory/apacheds/branches/bigbang/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/components/EncTgsRepPart.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/components/EncTgsRepPart.java?rev=591019&r1=591018&r2=591019&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/components/EncTgsRepPart.java (original)
+++ directory/apacheds/branches/bigbang/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/components/EncTgsRepPart.java Thu Nov  1 07:16:34 2007
@@ -26,7 +26,7 @@
 import org.apache.directory.server.kerberos.shared.messages.value.HostAddresses;
 import org.apache.directory.server.kerberos.shared.messages.value.KerberosTime;
 import org.apache.directory.server.kerberos.shared.messages.value.LastRequest;
-import org.apache.directory.server.kerberos.shared.messages.value.TicketFlags;
+import org.apache.directory.server.kerberos.shared.messages.value.flags.TicketFlags;
 
 
 /**

Modified: directory/apacheds/branches/bigbang/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/components/EncTicketPart.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/components/EncTicketPart.java?rev=591019&r1=591018&r2=591019&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/components/EncTicketPart.java (original)
+++ directory/apacheds/branches/bigbang/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/components/EncTicketPart.java Thu Nov  1 07:16:34 2007
@@ -27,8 +27,8 @@
 import org.apache.directory.server.kerberos.shared.messages.value.EncryptionKey;
 import org.apache.directory.server.kerberos.shared.messages.value.HostAddresses;
 import org.apache.directory.server.kerberos.shared.messages.value.KerberosTime;
-import org.apache.directory.server.kerberos.shared.messages.value.TicketFlags;
 import org.apache.directory.server.kerberos.shared.messages.value.TransitedEncoding;
+import org.apache.directory.server.kerberos.shared.messages.value.flags.TicketFlags;
 
 
 /**

Modified: directory/apacheds/branches/bigbang/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/components/EncTicketPartModifier.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/components/EncTicketPartModifier.java?rev=591019&r1=591018&r2=591019&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/components/EncTicketPartModifier.java (original)
+++ directory/apacheds/branches/bigbang/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/components/EncTicketPartModifier.java Thu Nov  1 07:16:34 2007
@@ -28,8 +28,9 @@
 import org.apache.directory.server.kerberos.shared.messages.value.KerberosPrincipalModifier;
 import org.apache.directory.server.kerberos.shared.messages.value.KerberosTime;
 import org.apache.directory.server.kerberos.shared.messages.value.PrincipalName;
-import org.apache.directory.server.kerberos.shared.messages.value.TicketFlags;
 import org.apache.directory.server.kerberos.shared.messages.value.TransitedEncoding;
+import org.apache.directory.server.kerberos.shared.messages.value.flags.KerberosFlag;
+import org.apache.directory.server.kerberos.shared.messages.value.flags.TicketFlags;
 
 
 /**
@@ -165,7 +166,18 @@
      */
     public void setFlag( int flag )
     {
-        flags.set( flag );
+        flags.setFlag( flag );
+    }
+
+
+    /**
+     * Sets the flag at the given index.
+     *
+     * @param flag
+     */
+    public void setFlag( KerberosFlag flag )
+    {
+        flags.setFlag( flag );
     }
 
 
@@ -176,7 +188,18 @@
      */
     public void clearFlag( int flag )
     {
-        flags.clear( flag );
+        flags.clearFlag( flag );
+    }
+
+
+    /**
+     * Clears the flag at the given index.
+     *
+     * @param flag
+     */
+    public void clearFlag( KerberosFlag flag )
+    {
+        flags.clearFlag( flag );
     }
 
 

Modified: directory/apacheds/branches/bigbang/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/KrbCredInfo.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/KrbCredInfo.java?rev=591019&r1=591018&r2=591019&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/KrbCredInfo.java (original)
+++ directory/apacheds/branches/bigbang/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/KrbCredInfo.java Thu Nov  1 07:16:34 2007
@@ -22,6 +22,8 @@
 
 import javax.security.auth.kerberos.KerberosPrincipal;
 
+import org.apache.directory.server.kerberos.shared.messages.value.flags.TicketFlags;
+
 
 /**
  * Kerberos credential information.

Modified: directory/apacheds/branches/bigbang/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/flags/AbstractKerberosFlags.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/flags/AbstractKerberosFlags.java?rev=591019&r1=591018&r2=591019&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/flags/AbstractKerberosFlags.java (original)
+++ directory/apacheds/branches/bigbang/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/flags/AbstractKerberosFlags.java Thu Nov  1 07:16:34 2007
@@ -36,6 +36,7 @@
     /** The associated value */
     protected int value;
     
+    
     /**
      * Standard constructor, which create a BitString containing 32 bits
      */
@@ -44,14 +45,17 @@
         super( 32 );
     }
 
+    
     /**
      * Standard constructor, taking a byte array
      */
     public AbstractKerberosFlags( byte[] flags )
     {
         super( flags );
+        value = ( ( getBytes()[0] & 0x00F ) << 24 ) | ( ( getBytes()[1] & 0x00FF ) << 16 ) | ( ( getBytes()[2] & 0x00FF ) << 8 ) | ( 0x00FF & getBytes()[3] ); 
     }
     
+    
     /**
      * A static method to get the bayte array representation of an int
      * @return The byte array for a list of flags.
@@ -65,19 +69,16 @@
                 (byte)( flags & 0x00ff ) };
     }
     
+    
     /**
      * @return The byte array for a KerberosFlags
      */
     public byte[] getBytes()
     {
         return getData();
-        /*new byte[]{
-                (byte)( value >>> 24), 
-                (byte)( ( value >> 16 ) & 0x00ff ), 
-                (byte)( ( value >> 8 ) & 0x00ff ), 
-                (byte)( value & 0x00ff ) };*/
     }
 
+    
     /**
      * Returns the int value associated with the flags
      */
@@ -87,7 +88,6 @@
     }
     
     
-    
     /**
      * Check if a flag is set
      * @param flags The flags to test
@@ -99,17 +99,7 @@
         return ( flags & ( 1 << flag) ) != 0;
     }
     
-    /**
-     * Check if a flag is set
-     * @param flags The flags to test
-     * @param flag The flag to check
-     * @return True if the flag is set in the list of flags
-     */
-    /*public static boolean isFlagSet( int flags, KerberosFlag flag )
-    {
-        return ( flags & ( 1 << flag.getOrdinal() ) ) != 0;
-    }*/
-    
+
     /**
      * Check if a flag is set for the actual value
      * 
@@ -121,6 +111,7 @@
         return ( value & ( 1 << flag.getOrdinal() ) ) != 0;
     }
     
+    
     /**
      * Check if a flag is set
      * @param flags The flags to test
@@ -131,17 +122,6 @@
         return ( flag & ( 1 << value ) ) != 0;
     }
     
-    /**
-     * Set a flag in a list of flags
-     * 
-     * @param flags The list of flags
-     * @param flag The flag to set
-     */
-    /*public static int setFlag( int flags, KerberosFlag flag )
-    {
-        flags |= 1 << flag.getOrdinal();
-        return flags;
-    }*/
     
     /**
      * Set a flag in a list of flags
@@ -154,6 +134,7 @@
         setBit( flag.getOrdinal() );
     }
     
+    
     /**
      * Set a flag in a list of flags
      * 
@@ -178,20 +159,10 @@
             value = -1;
         }
         
-        value = ( bytes[0] << 24 ) + ( bytes[1] << 16 ) + ( bytes[2] << 8 ) + bytes[3];
+        value = ( ( getBytes()[0] & 0x00F ) << 24 ) | ( ( getBytes()[1] & 0x00FF ) << 16 ) | ( ( getBytes()[2] & 0x00FF ) << 8 ) | ( 0x00FF & getBytes()[3] ); 
         setData( bytes );
     }
     
-    /**
-     * clear a flag in a list of flags
-     * 
-     * @param flags The list of flags
-     * @param flag The flag to set
-     */
-    /*public static void clearFlag( int flags, KerberosFlag flag )
-    {
-        flags &= ~( 1 << flag.getOrdinal() );
-    }*/
 
     /**
      * clear a flag in a list of flags
@@ -204,6 +175,7 @@
         clearBit( flag.getOrdinal() );
     }
     
+    
     /**
      * clear a flag in a list of flags
      * 
@@ -214,6 +186,7 @@
         value &= ~( 1 << flag );
         clearBit( flag );
     }
+    
     
     /**
      * @return The hex value for this flag, in its position.

Modified: directory/apacheds/branches/bigbang/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/flags/KerberosFlag.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/flags/KerberosFlag.java?rev=591019&r1=591018&r2=591019&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/flags/KerberosFlag.java (original)
+++ directory/apacheds/branches/bigbang/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/flags/KerberosFlag.java Thu Nov  1 07:16:34 2007
@@ -30,5 +30,8 @@
  */
 public interface KerberosFlag
 {
-    public int getOrdinal();
+    /**
+     * @return The ordinal value associated with this flag
+     */
+    int getOrdinal();
 }

Modified: directory/apacheds/branches/bigbang/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/flags/KerberosFlags.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/flags/KerberosFlags.java?rev=591019&r1=591018&r2=591019&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/flags/KerberosFlags.java (original)
+++ directory/apacheds/branches/bigbang/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/flags/KerberosFlags.java Thu Nov  1 07:16:34 2007
@@ -26,12 +26,63 @@
  */
 public interface KerberosFlags
 {
-    public byte[] getBytes();
-    public int getIntValue();
-    public boolean isFlagSet( KerberosFlag flag );
-    public boolean isFlagSet( int flag );
-    public void setFlag( KerberosFlag flag );
-    public void setFlag( int flag );
-    public void clearFlag( KerberosFlag flag );
-    public void clearFlag( int flag );
+    /**
+     * @return The byte array for a KerberosFlags
+     */
+    byte[] getBytes();
+    
+    
+    /**
+     * Returns the int value associated with the flags
+     */
+    int getIntValue();
+    
+    
+    /**
+     * Check if a flag is set for the actual value
+     * 
+     * @param flag The flag to check
+     * @return True if the flag is set in the list of flags
+     */
+    boolean isFlagSet( KerberosFlag flag );
+    
+    
+    /**
+     * Check if a flag is set
+     * @param flags The flags to test
+     * @return True if the flag is set in the list of flags
+     */
+    boolean isFlagSet( int flag );
+    
+    
+    /**
+     * Set a flag in a list of flags
+     * 
+     * @param flag The flag to set
+     */
+    void setFlag( KerberosFlag flag );
+
+    
+    /**
+     * Set a flag in a list of flags
+     * 
+     * @param flag The flag to set
+     */
+    void setFlag( int flag );
+    
+    
+    /**
+     * clear a flag in a list of flags
+     * 
+     * @param flag The flag to set
+     */
+    void clearFlag( KerberosFlag flag );
+
+    
+    /**
+     * clear a flag in a list of flags
+     * 
+     * @param flag The flag to set
+     */
+    void clearFlag( int flag );
 }

Modified: directory/apacheds/branches/bigbang/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/flags/TicketFlag.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/flags/TicketFlag.java?rev=591019&r1=591018&r2=591019&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/flags/TicketFlag.java (original)
+++ directory/apacheds/branches/bigbang/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/flags/TicketFlag.java Thu Nov  1 07:16:34 2007
@@ -118,9 +118,11 @@
      */
     MAX_VALUE(32);
 
+    
     // The interned value.
     private int value;
     
+    
     /**
      * Class constructor
      */
@@ -128,6 +130,7 @@
     {
         this.value = value;
     }
+    
     
     /**
      * @return The ordinal value associated with this flag

Modified: directory/apacheds/branches/bigbang/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/flags/TicketFlags.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/flags/TicketFlags.java?rev=591019&r1=591018&r2=591019&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/flags/TicketFlags.java (original)
+++ directory/apacheds/branches/bigbang/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/flags/TicketFlags.java Thu Nov  1 07:16:34 2007
@@ -31,6 +31,7 @@
 {
     public static final long serialVersionUID = 1L;
 
+    
    /**
      * Basic constructor of a TicketFlags BitString
      */
@@ -39,6 +40,7 @@
         super();
     }
     
+    
     /**
      * Constructor of a TicketFlags BitString with an int value
      */
@@ -47,6 +49,7 @@
         super( getBytes( flags ) );
     }
     
+    
     /**
      * Basic constructor of a TicketFlags BitString with a byte array
      */
@@ -55,6 +58,7 @@
         super( flags );
     }
     
+    
     /**
      * Ticket flag - reserved
      */
@@ -63,6 +67,7 @@
         return isFlagSet( TicketFlag.RESERVED );
     }
 
+    
     /**
      * Ticket flag - forwardable
      */
@@ -70,6 +75,7 @@
     {
         return isFlagSet( TicketFlag.FORWARDABLE );
     }
+    
 
     /**
      * Ticket flag - forwarded
@@ -79,6 +85,7 @@
         return isFlagSet( TicketFlag.FORWARDED );
     }
 
+    
     /**
      * Ticket flag - proxiable
      */
@@ -87,6 +94,7 @@
         return isFlagSet( TicketFlag.PROXIABLE );
     }
 
+    
     /**
      * Ticket flag - proxy
      */
@@ -95,6 +103,7 @@
         return isFlagSet( TicketFlag.PROXY );
     }
 
+    
     /**
      * Ticket flag - may be postdated
      */
@@ -103,6 +112,7 @@
         return isFlagSet( TicketFlag.MAY_POSTDATE );
     }
 
+    
     /**
      * Ticket flag - postdated
      */
@@ -111,6 +121,7 @@
         return isFlagSet( TicketFlag.POSTDATED );
     }
 
+    
     /**
      * Ticket flag - invalid
      */
@@ -119,6 +130,7 @@
         return isFlagSet( TicketFlag.INVALID );
     }
 
+    
     /**
      * Ticket flag - renewable
      */
@@ -127,6 +139,7 @@
         return isFlagSet( TicketFlag.RENEWABLE );
     }
 
+    
     /**
      * Ticket flag - initial
      */
@@ -135,6 +148,7 @@
         return isFlagSet( TicketFlag.INITIAL );
     }
 
+    
     /**
      * Ticket flag - pre-authentication
      */
@@ -143,6 +157,7 @@
         return isFlagSet( TicketFlag.PRE_AUTHENT );
     }
 
+    
     /**
      * Ticket flag - hardware authentication
      */
@@ -151,6 +166,7 @@
         return isFlagSet( TicketFlag.HW_AUTHENT );
     }
 
+    
     /**
      * Ticket flag - transitedEncoding policy checked
      */
@@ -158,6 +174,7 @@
     {
         return isFlagSet( TicketFlag.TRANSITED_POLICY_CHECKED );
     }
+    
 
     /**
      * Ticket flag - OK as delegate
@@ -167,6 +184,7 @@
         return isFlagSet( TicketFlag.OK_AS_DELEGATE );
     }
     
+    
     /**
      * Converts the object to a printable string.
      */
@@ -247,6 +265,7 @@
         return result.toString().trim();
     }*/
 
+    
     /**
      * Converts the object to a printable string.
      */

Modified: directory/apacheds/branches/bigbang/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/TicketFactory.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/TicketFactory.java?rev=591019&r1=591018&r2=591019&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/TicketFactory.java (original)
+++ directory/apacheds/branches/bigbang/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/TicketFactory.java Thu Nov  1 07:16:34 2007
@@ -41,8 +41,9 @@
 import org.apache.directory.server.kerberos.shared.messages.value.EncryptedData;
 import org.apache.directory.server.kerberos.shared.messages.value.EncryptionKey;
 import org.apache.directory.server.kerberos.shared.messages.value.KerberosTime;
-import org.apache.directory.server.kerberos.shared.messages.value.TicketFlags;
 import org.apache.directory.server.kerberos.shared.messages.value.TransitedEncoding;
+import org.apache.directory.server.kerberos.shared.messages.value.flags.TicketFlag;
+import org.apache.directory.server.kerberos.shared.messages.value.flags.TicketFlags;
 
 
 /**
@@ -97,7 +98,7 @@
         EncTicketPartModifier encTicketModifier = new EncTicketPartModifier();
 
         TicketFlags ticketFlags = new TicketFlags();
-        ticketFlags.set( TicketFlags.RENEWABLE );
+        ticketFlags.setFlag( TicketFlag.RENEWABLE );
         encTicketModifier.setFlags( ticketFlags );
 
         EncryptionKey sessionKey = RandomKeyFactory.getRandomKey( EncryptionType.DES_CBC_MD5 );
@@ -149,7 +150,7 @@
 
         for ( int ii = 0; ii < flags.length; ii++ )
         {
-            flags[ii] = ticket.getEncTicketPart().getFlags().get( ii );
+            flags[ii] = ticket.getEncTicketPart().getFlags().isFlagSet( ii );
         }
 
         Date authTime = ticket.getEncTicketPart().getAuthTime().toDate();
@@ -159,7 +160,7 @@
 
         Date renewTill = null;
 
-        if ( ticket.getEncTicketPart().getFlags().get( TicketFlags.RENEWABLE ) )
+        if ( ticket.getEncTicketPart().getFlags().isRenewable() )
         {
             renewTill = ( ticket.getEncTicketPart().getRenewTill() != null ? ticket.getEncTicketPart().getRenewTill().toDate() : null );
         }

Modified: directory/apacheds/branches/bigbang/protocol-changepw/src/main/java/org/apache/directory/server/changepw/service/ChangePasswordService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/protocol-changepw/src/main/java/org/apache/directory/server/changepw/service/ChangePasswordService.java?rev=591019&r1=591018&r2=591019&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/protocol-changepw/src/main/java/org/apache/directory/server/changepw/service/ChangePasswordService.java (original)
+++ directory/apacheds/branches/bigbang/protocol-changepw/src/main/java/org/apache/directory/server/changepw/service/ChangePasswordService.java Thu Nov  1 07:16:34 2007
@@ -55,7 +55,6 @@
 import org.apache.directory.server.kerberos.shared.messages.value.EncryptionKey;
 import org.apache.directory.server.kerberos.shared.messages.value.HostAddress;
 import org.apache.directory.server.kerberos.shared.messages.value.HostAddresses;
-import org.apache.directory.server.kerberos.shared.messages.value.TicketFlags;
 import org.apache.directory.server.kerberos.shared.replay.InMemoryReplayCache;
 import org.apache.directory.server.kerberos.shared.replay.ReplayCache;
 import org.apache.directory.server.kerberos.shared.store.PrincipalStore;
@@ -223,7 +222,7 @@
 
         ChangePasswordRequest request = ( ChangePasswordRequest ) changepwContext.getRequest();
 
-        if ( request.getVersionNumber() == 1 && !ticket.getEncTicketPart().getFlags().get( TicketFlags.INITIAL ) )
+        if ( request.getVersionNumber() == 1 && !ticket.getEncTicketPart().getFlags().isInitial() )
         {
             throw new ChangePasswordException( ErrorType.KRB5_KPASSWD_INITIAL_FLAG_NEEDED );
         }

Modified: directory/apacheds/branches/bigbang/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/authentication/AuthenticationService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/authentication/AuthenticationService.java?rev=591019&r1=591018&r2=591019&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/authentication/AuthenticationService.java (original)
+++ directory/apacheds/branches/bigbang/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/authentication/AuthenticationService.java Thu Nov  1 07:16:34 2007
@@ -58,8 +58,8 @@
 import org.apache.directory.server.kerberos.shared.messages.value.KerberosTime;
 import org.apache.directory.server.kerberos.shared.messages.value.LastRequest;
 import org.apache.directory.server.kerberos.shared.messages.value.PaData;
-import org.apache.directory.server.kerberos.shared.messages.value.TicketFlags;
 import org.apache.directory.server.kerberos.shared.messages.value.TransitedEncoding;
+import org.apache.directory.server.kerberos.shared.messages.value.flags.TicketFlag;
 import org.apache.directory.server.kerberos.shared.messages.value.types.PaDataType;
 import org.apache.directory.server.kerberos.shared.replay.InMemoryReplayCache;
 import org.apache.directory.server.kerberos.shared.replay.ReplayCache;
@@ -354,12 +354,12 @@
         KdcServer config = authContext.getConfig();
 
         // The INITIAL flag indicates that a ticket was issued using the AS protocol.
-        newTicketBody.setFlag( TicketFlags.INITIAL );
+        newTicketBody.setFlag( TicketFlag.INITIAL );
 
         // The PRE-AUTHENT flag indicates that the client used pre-authentication.
         if ( authContext.isPreAuthenticated() )
         {
-            newTicketBody.setFlag( TicketFlags.PRE_AUTHENT );
+            newTicketBody.setFlag( TicketFlag.PRE_AUTHENT );
         }
 
         if ( request.getOption( KdcOptions.FORWARDABLE ) )
@@ -369,7 +369,7 @@
                 throw new KerberosException( ErrorType.KDC_ERR_POLICY );
             }
 
-            newTicketBody.setFlag( TicketFlags.FORWARDABLE );
+            newTicketBody.setFlag( TicketFlag.FORWARDABLE );
         }
 
         if ( request.getOption( KdcOptions.PROXIABLE ) )
@@ -379,7 +379,7 @@
                 throw new KerberosException( ErrorType.KDC_ERR_POLICY );
             }
 
-            newTicketBody.setFlag( TicketFlags.PROXIABLE );
+            newTicketBody.setFlag( TicketFlag.PROXIABLE );
         }
 
         if ( request.getOption( KdcOptions.ALLOW_POSTDATE ) )
@@ -389,7 +389,7 @@
                 throw new KerberosException( ErrorType.KDC_ERR_POLICY );
             }
 
-            newTicketBody.setFlag( TicketFlags.MAY_POSTDATE );
+            newTicketBody.setFlag( TicketFlag.MAY_POSTDATE );
         }
 
         if ( request.getOption( KdcOptions.RENEW ) || request.getOption( KdcOptions.VALIDATE )
@@ -446,8 +446,8 @@
                 throw new KerberosException( ErrorType.KDC_ERR_POLICY );
             }
 
-            newTicketBody.setFlag( TicketFlags.POSTDATED );
-            newTicketBody.setFlag( TicketFlags.INVALID );
+            newTicketBody.setFlag( TicketFlag.POSTDATED );
+            newTicketBody.setFlag( TicketFlag.INVALID );
             newTicketBody.setStartTime( startTime );
         }
 
@@ -513,7 +513,7 @@
                 throw new KerberosException( ErrorType.KDC_ERR_POLICY );
             }
 
-            newTicketBody.setFlag( TicketFlags.RENEWABLE );
+            newTicketBody.setFlag( TicketFlag.RENEWABLE );
 
             if ( tempRtime == null || tempRtime.isZero() )
             {
@@ -580,7 +580,7 @@
         reply.setStartTime( ticket.getEncTicketPart().getStartTime() );
         reply.setEndTime( ticket.getEncTicketPart().getEndTime() );
 
-        if ( ticket.getEncTicketPart().getFlags().get( TicketFlags.RENEWABLE ) )
+        if ( ticket.getEncTicketPart().getFlags().isRenewable() )
         {
             reply.setRenewTill( ticket.getEncTicketPart().getRenewTill() );
         }

Modified: directory/apacheds/branches/bigbang/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/ticketgrant/TicketGrantingService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/ticketgrant/TicketGrantingService.java?rev=591019&r1=591018&r2=591019&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/ticketgrant/TicketGrantingService.java (original)
+++ directory/apacheds/branches/bigbang/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/ticketgrant/TicketGrantingService.java Thu Nov  1 07:16:34 2007
@@ -59,7 +59,7 @@
 import org.apache.directory.server.kerberos.shared.messages.value.KerberosTime;
 import org.apache.directory.server.kerberos.shared.messages.value.LastRequest;
 import org.apache.directory.server.kerberos.shared.messages.value.PaData;
-import org.apache.directory.server.kerberos.shared.messages.value.TicketFlags;
+import org.apache.directory.server.kerberos.shared.messages.value.flags.TicketFlag;
 import org.apache.directory.server.kerberos.shared.messages.value.types.PaDataType;
 import org.apache.directory.server.kerberos.shared.replay.InMemoryReplayCache;
 import org.apache.directory.server.kerberos.shared.replay.ReplayCache;
@@ -398,7 +398,7 @@
         reply.setEndTime( newTicket.getEncTicketPart().getEndTime() );
         reply.setServerPrincipal( newTicket.getServerPrincipal() );
 
-        if ( newTicket.getEncTicketPart().getFlags().get( TicketFlags.RENEWABLE ) )
+        if ( newTicket.getEncTicketPart().getFlags().isRenewable() )
         {
             reply.setRenewTill( newTicket.getEncTicketPart().getRenewTill() );
         }
@@ -530,9 +530,9 @@
     private static void processFlags( KdcServer config, KdcRequest request, Ticket tgt,
         EncTicketPartModifier newTicketBody ) throws KerberosException
     {
-        if ( tgt.getEncTicketPart().getFlags().get( TicketFlags.PRE_AUTHENT ) )
+        if ( tgt.getEncTicketPart().getFlags().isPreAuth() )
         {
-            newTicketBody.setFlag( TicketFlags.PRE_AUTHENT );
+            newTicketBody.setFlag( TicketFlag.PRE_AUTHENT );
         }
 
         if ( request.getOption( KdcOptions.FORWARDABLE ) )
@@ -542,12 +542,12 @@
                 throw new KerberosException( ErrorType.KDC_ERR_POLICY );
             }
 
-            if ( !tgt.getEncTicketPart().getFlags().get( TicketFlags.FORWARDABLE ) )
+            if ( !tgt.getEncTicketPart().getFlags().isForwardable() )
             {
                 throw new KerberosException( ErrorType.KDC_ERR_BADOPTION );
             }
 
-            newTicketBody.setFlag( TicketFlags.FORWARDABLE );
+            newTicketBody.setFlag( TicketFlag.FORWARDABLE );
         }
 
         if ( request.getOption( KdcOptions.FORWARDED ) )
@@ -557,7 +557,7 @@
                 throw new KerberosException( ErrorType.KDC_ERR_POLICY );
             }
 
-            if ( !tgt.getEncTicketPart().getFlags().get( TicketFlags.FORWARDABLE ) )
+            if ( !tgt.getEncTicketPart().getFlags().isForwardable() )
             {
                 throw new KerberosException( ErrorType.KDC_ERR_BADOPTION );
             }
@@ -575,12 +575,12 @@
                 }
             }
 
-            newTicketBody.setFlag( TicketFlags.FORWARDED );
+            newTicketBody.setFlag( TicketFlag.FORWARDED );
         }
 
-        if ( tgt.getEncTicketPart().getFlags().get( TicketFlags.FORWARDED ) )
+        if ( tgt.getEncTicketPart().getFlags().isForwarded() )
         {
-            newTicketBody.setFlag( TicketFlags.FORWARDED );
+            newTicketBody.setFlag( TicketFlag.FORWARDED );
         }
 
         if ( request.getOption( KdcOptions.PROXIABLE ) )
@@ -590,12 +590,12 @@
                 throw new KerberosException( ErrorType.KDC_ERR_POLICY );
             }
 
-            if ( !tgt.getEncTicketPart().getFlags().get( TicketFlags.PROXIABLE ) )
+            if ( !tgt.getEncTicketPart().getFlags().isProxiable() )
             {
                 throw new KerberosException( ErrorType.KDC_ERR_BADOPTION );
             }
 
-            newTicketBody.setFlag( TicketFlags.PROXIABLE );
+            newTicketBody.setFlag( TicketFlag.PROXIABLE );
         }
 
         if ( request.getOption( KdcOptions.PROXY ) )
@@ -605,7 +605,7 @@
                 throw new KerberosException( ErrorType.KDC_ERR_POLICY );
             }
 
-            if ( !tgt.getEncTicketPart().getFlags().get( TicketFlags.PROXIABLE ) )
+            if ( !tgt.getEncTicketPart().getFlags().isProxiable() )
             {
                 throw new KerberosException( ErrorType.KDC_ERR_BADOPTION );
             }
@@ -623,7 +623,7 @@
                 }
             }
 
-            newTicketBody.setFlag( TicketFlags.PROXY );
+            newTicketBody.setFlag( TicketFlag.PROXY );
         }
 
         if ( request.getOption( KdcOptions.ALLOW_POSTDATE ) )
@@ -633,12 +633,12 @@
                 throw new KerberosException( ErrorType.KDC_ERR_POLICY );
             }
 
-            if ( !tgt.getEncTicketPart().getFlags().get( TicketFlags.MAY_POSTDATE ) )
+            if ( !tgt.getEncTicketPart().getFlags().isMayPosdate() )
             {
                 throw new KerberosException( ErrorType.KDC_ERR_BADOPTION );
             }
 
-            newTicketBody.setFlag( TicketFlags.MAY_POSTDATE );
+            newTicketBody.setFlag( TicketFlag.MAY_POSTDATE );
         }
 
         /*
@@ -658,13 +658,13 @@
                 throw new KerberosException( ErrorType.KDC_ERR_POLICY );
             }
 
-            if ( !tgt.getEncTicketPart().getFlags().get( TicketFlags.MAY_POSTDATE ) )
+            if ( !tgt.getEncTicketPart().getFlags().isMayPosdate() )
             {
                 throw new KerberosException( ErrorType.KDC_ERR_BADOPTION );
             }
 
-            newTicketBody.setFlag( TicketFlags.POSTDATED );
-            newTicketBody.setFlag( TicketFlags.INVALID );
+            newTicketBody.setFlag( TicketFlag.POSTDATED );
+            newTicketBody.setFlag( TicketFlag.INVALID );
 
             newTicketBody.setStartTime( request.getFrom() );
         }
@@ -676,7 +676,7 @@
                 throw new KerberosException( ErrorType.KDC_ERR_POLICY );
             }
 
-            if ( !tgt.getEncTicketPart().getFlags().get( TicketFlags.INVALID ) )
+            if ( !tgt.getEncTicketPart().getFlags().isInvalid() )
             {
                 throw new KerberosException( ErrorType.KDC_ERR_POLICY );
             }
@@ -691,7 +691,7 @@
             }
 
             echoTicket( newTicketBody, tgt );
-            newTicketBody.clearFlag( TicketFlags.INVALID );
+            newTicketBody.clearFlag( TicketFlag.INVALID );
         }
 
         if ( request.getOption( KdcOptions.RESERVED ) )
@@ -730,7 +730,7 @@
          */
         if ( startTime != null && startTime.greaterThan( now )
             && !startTime.isInClockSkew( config.getAllowableClockSkew() )
-            && ( !request.getOption( KdcOptions.POSTDATED ) || !tgt.getEncTicketPart().getFlags().get( TicketFlags.MAY_POSTDATE ) ) )
+            && ( !request.getOption( KdcOptions.POSTDATED ) || !tgt.getEncTicketPart().getFlags().isMayPosdate() ) )
         {
             throw new KerberosException( ErrorType.KDC_ERR_CANNOT_POSTDATE );
         }
@@ -745,7 +745,7 @@
                 throw new KerberosException( ErrorType.KDC_ERR_POLICY );
             }
 
-            if ( !tgt.getEncTicketPart().getFlags().get( TicketFlags.RENEWABLE ) )
+            if ( !tgt.getEncTicketPart().getFlags().isRenewable() )
             {
                 throw new KerberosException( ErrorType.KDC_ERR_BADOPTION );
             }
@@ -799,7 +799,7 @@
             newTicketBody.setEndTime( kerberosEndTime );
 
             if ( request.getOption( KdcOptions.RENEWABLE_OK ) && kerberosEndTime.lessThan( request.getTill() )
-                && tgt.getEncTicketPart().getFlags().get( TicketFlags.RENEWABLE ) )
+                && tgt.getEncTicketPart().getFlags().isRenewable() )
             {
                 if ( !config.isRenewableAllowed() )
                 {
@@ -828,14 +828,14 @@
             rtime = renewalTime;
         }
 
-        if ( request.getOption( KdcOptions.RENEWABLE ) && tgt.getEncTicketPart().getFlags().get( TicketFlags.RENEWABLE ) )
+        if ( request.getOption( KdcOptions.RENEWABLE ) && tgt.getEncTicketPart().getFlags().isRenewable() )
         {
             if ( !config.isRenewableAllowed() )
             {
                 throw new KerberosException( ErrorType.KDC_ERR_POLICY );
             }
 
-            newTicketBody.setFlag( TicketFlags.RENEWABLE );
+            newTicketBody.setFlag( TicketFlag.RENEWABLE );
 
             /*
              * The renew-till time is the minimum of (a) the requested renew-till

Modified: directory/apacheds/branches/bigbang/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/messages/value/OptionsTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/messages/value/OptionsTest.java?rev=591019&r1=591018&r2=591019&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/messages/value/OptionsTest.java (original)
+++ directory/apacheds/branches/bigbang/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/messages/value/OptionsTest.java Thu Nov  1 07:16:34 2007
@@ -25,7 +25,8 @@
 import junit.framework.TestCase;
 
 import org.apache.directory.server.kerberos.shared.messages.value.KdcOptions;
-import org.apache.directory.server.kerberos.shared.messages.value.TicketFlags;
+import org.apache.directory.server.kerberos.shared.messages.value.flags.TicketFlag;
+import org.apache.directory.server.kerberos.shared.messages.value.flags.TicketFlags;
 
 
 /**
@@ -44,11 +45,11 @@
     public void testToString()
     {
         TicketFlags flags = new TicketFlags();
-        flags.set( TicketFlags.FORWARDABLE );
-        flags.set( TicketFlags.PROXIABLE );
-        flags.set( TicketFlags.RENEWABLE );
-        flags.set( TicketFlags.INITIAL );
-        assertEquals( flags.toString(), "FORWARDABLE PROXIABLE RENEWABLE INITIAL" );
+        flags.setFlag( TicketFlag.FORWARDABLE );
+        flags.setFlag( TicketFlag.PROXIABLE );
+        flags.setFlag( TicketFlag.RENEWABLE );
+        flags.setFlag( TicketFlag.INITIAL );
+        assertEquals( flags.toString(), "FORWARDABLE(1) PROXIABLE(3) RENEWABLE(8) INITIAL(9)" );
     }
 
 
@@ -58,12 +59,12 @@
     public void testDuplicateSetting()
     {
         TicketFlags flags = new TicketFlags();
-        flags.set( TicketFlags.MAY_POSTDATE );
-        flags.set( TicketFlags.FORWARDABLE );
-        flags.set( TicketFlags.PROXIABLE );
-        flags.set( TicketFlags.MAY_POSTDATE );
-        flags.set( TicketFlags.RENEWABLE );
-        assertEquals( flags.toString(), "FORWARDABLE PROXIABLE MAY_POSTDATE RENEWABLE" );
+        flags.setFlag( TicketFlag.MAY_POSTDATE );
+        flags.setFlag( TicketFlag.FORWARDABLE );
+        flags.setFlag( TicketFlag.PROXIABLE );
+        flags.setFlag( TicketFlag.MAY_POSTDATE );
+        flags.setFlag( TicketFlag.RENEWABLE );
+        assertEquals( flags.toString(), "FORWARDABLE(1) PROXIABLE(3) MAY_POSTDATE(5) RENEWABLE(8)" );
     }
 
 

Modified: directory/apacheds/branches/bigbang/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/protocol/AbstractTicketGrantingServiceTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/protocol/AbstractTicketGrantingServiceTest.java?rev=591019&r1=591018&r2=591019&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/protocol/AbstractTicketGrantingServiceTest.java (original)
+++ directory/apacheds/branches/bigbang/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/protocol/AbstractTicketGrantingServiceTest.java Thu Nov  1 07:16:34 2007
@@ -56,8 +56,9 @@
 import org.apache.directory.server.kerberos.shared.messages.value.PaData;
 import org.apache.directory.server.kerberos.shared.messages.value.PrincipalName;
 import org.apache.directory.server.kerberos.shared.messages.value.RequestBody;
-import org.apache.directory.server.kerberos.shared.messages.value.TicketFlags;
 import org.apache.directory.server.kerberos.shared.messages.value.TransitedEncoding;
+import org.apache.directory.server.kerberos.shared.messages.value.flags.TicketFlag;
+import org.apache.directory.server.kerberos.shared.messages.value.flags.TicketFlags;
 import org.apache.directory.server.kerberos.shared.messages.value.types.PaDataType;
 import org.apache.directory.server.kerberos.shared.messages.value.types.PrincipalNameType;
 import org.apache.mina.common.IoFilterChain;
@@ -135,7 +136,7 @@
         EncTicketPartModifier encTicketModifier = new EncTicketPartModifier();
 
         TicketFlags ticketFlags = new TicketFlags();
-        ticketFlags.set( TicketFlags.RENEWABLE );
+        ticketFlags.setFlag( TicketFlag.RENEWABLE );
         encTicketModifier.setFlags( ticketFlags );
 
         EncryptionKey sessionKey = RandomKeyFactory.getRandomKey( EncryptionType.DES_CBC_MD5 );
@@ -169,7 +170,7 @@
         EncTicketPartModifier encTicketModifier = new EncTicketPartModifier();
 
         TicketFlags ticketFlags = new TicketFlags();
-        ticketFlags.set( TicketFlags.RENEWABLE );
+        ticketFlags.setFlag( TicketFlag.RENEWABLE );
         encTicketModifier.setFlags( ticketFlags );
 
         EncryptionKey sessionKey = RandomKeyFactory.getRandomKey( EncryptionType.DES_CBC_MD5 );

Modified: directory/apacheds/branches/bigbang/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/protocol/AuthenticationEncryptionTypeTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/protocol/AuthenticationEncryptionTypeTest.java?rev=591019&r1=591018&r2=591019&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/protocol/AuthenticationEncryptionTypeTest.java (original)
+++ directory/apacheds/branches/bigbang/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/protocol/AuthenticationEncryptionTypeTest.java Thu Nov  1 07:16:34 2007
@@ -44,7 +44,6 @@
 import org.apache.directory.server.kerberos.shared.messages.value.KerberosTime;
 import org.apache.directory.server.kerberos.shared.messages.value.PaData;
 import org.apache.directory.server.kerberos.shared.messages.value.RequestBodyModifier;
-import org.apache.directory.server.kerberos.shared.messages.value.TicketFlags;
 import org.apache.directory.server.kerberos.shared.messages.value.types.PaDataType;
 import org.apache.directory.server.kerberos.shared.store.PrincipalStore;
 
@@ -159,7 +158,7 @@
         AuthenticationReply reply = ( AuthenticationReply ) session.getMessage();
 
         assertTrue( "Requested end time", requestedEndTime.equals( reply.getEndTime() ) );
-        assertTrue( "PRE_AUTHENT flag", reply.getTicket().getEncTicketPart().getFlags().get( TicketFlags.PRE_AUTHENT ) );
+        assertTrue( "PRE_AUTHENT flag", reply.getTicket().getEncTicketPart().getFlags().isPreAuth() );
         assertEquals( "Encryption type", EncryptionType.AES128_CTS_HMAC_SHA1_96, reply.getEncPart().getEType() );
     }
 
@@ -211,7 +210,7 @@
         AuthenticationReply reply = ( AuthenticationReply ) session.getMessage();
 
         assertTrue( "Requested end time", requestedEndTime.equals( reply.getEndTime() ) );
-        assertTrue( "PRE_AUTHENT flag", reply.getTicket().getEncTicketPart().getFlags().get( TicketFlags.PRE_AUTHENT ) );
+        assertTrue( "PRE_AUTHENT flag", reply.getTicket().getEncTicketPart().getFlags().isPreAuth() );
         assertEquals( "Encryption type", EncryptionType.AES128_CTS_HMAC_SHA1_96, reply.getEncPart().getEType() );
 
         assertEquals( "Nonce", nonce, reply.getNonce() );

Modified: directory/apacheds/branches/bigbang/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/protocol/AuthenticationServiceTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/protocol/AuthenticationServiceTest.java?rev=591019&r1=591018&r2=591019&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/protocol/AuthenticationServiceTest.java (original)
+++ directory/apacheds/branches/bigbang/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/protocol/AuthenticationServiceTest.java Thu Nov  1 07:16:34 2007
@@ -36,7 +36,6 @@
 import org.apache.directory.server.kerberos.shared.messages.value.KerberosTime;
 import org.apache.directory.server.kerberos.shared.messages.value.PaData;
 import org.apache.directory.server.kerberos.shared.messages.value.RequestBodyModifier;
-import org.apache.directory.server.kerberos.shared.messages.value.TicketFlags;
 import org.apache.directory.server.kerberos.shared.store.PrincipalStore;
 
 
@@ -597,15 +596,15 @@
 
         assertTrue( "Requested start time", requestedStartTime.equals( reply.getStartTime() ) );
         assertTrue( "Requested end time", requestedEndTime.equals( reply.getEndTime() ) );
-        assertTrue( "POSTDATED flag", reply.getFlags().get( TicketFlags.POSTDATED ) );
-        assertTrue( "INVALID flag", reply.getFlags().get( TicketFlags.INVALID ) );
+        assertTrue( "POSTDATED flag", reply.getFlags().isPostdated() );
+        assertTrue( "INVALID flag", reply.getFlags().isInvalid() );
 
         assertTrue( "Requested start time", requestedStartTime.equals( reply.getTicket().getEncTicketPart().getStartTime() ) );
         assertTrue( "Requested end time", requestedEndTime.equals( reply.getEndTime() ) );
-        assertTrue( "POSTDATED flag", reply.getTicket().getEncTicketPart().getFlags().get( TicketFlags.POSTDATED ) );
-        assertTrue( "INVALID flag", reply.getTicket().getEncTicketPart().getFlags().get( TicketFlags.INVALID ) );
+        assertTrue( "POSTDATED flag", reply.getTicket().getEncTicketPart().getFlags().isPostdated() );
+        assertTrue( "INVALID flag", reply.getTicket().getEncTicketPart().getFlags().isInvalid() );
 
-        assertTrue( "PRE_AUTHENT flag", reply.getTicket().getEncTicketPart().getFlags().get( TicketFlags.PRE_AUTHENT ) );
+        assertTrue( "PRE_AUTHENT flag", reply.getTicket().getEncTicketPart().getFlags().isPreAuth() );
     }
 
 
@@ -647,7 +646,7 @@
 
         assertTrue( "Requested end time", requestedEndTime.equals( reply.getEndTime() ) );
 
-        assertTrue( "PRE_AUTHENT flag", reply.getTicket().getEncTicketPart().getFlags().get( TicketFlags.PRE_AUTHENT ) );
+        assertTrue( "PRE_AUTHENT flag", reply.getTicket().getEncTicketPart().getFlags().isPreAuth() );
     }
 
 
@@ -765,11 +764,11 @@
 
         AuthenticationReply reply = ( AuthenticationReply ) session.getMessage();
 
-        assertTrue( "INITIAL flag", reply.getFlags().get( TicketFlags.INITIAL ) );
-        assertFalse( "INVALID flag", reply.getFlags().get( TicketFlags.INVALID ) );
+        assertTrue( "INITIAL flag", reply.getFlags().isInitial() );
+        assertFalse( "INVALID flag", reply.getFlags().isInvalid() );
 
-        assertTrue( "INITIAL flag", reply.getTicket().getEncTicketPart().getFlags().get( TicketFlags.INITIAL ) );
-        assertFalse( "INVALID flag", reply.getTicket().getEncTicketPart().getFlags().get( TicketFlags.INVALID ) );
+        assertTrue( "INITIAL flag", reply.getTicket().getEncTicketPart().getFlags().isInitial() );
+        assertFalse( "INVALID flag", reply.getTicket().getEncTicketPart().getFlags().isInvalid() );
 
         assertEquals( "Service principal name", reply.getServerPrincipal().getName(), servicePrincipalName );
         assertEquals( "Service principal name", reply.getTicket().getServerPrincipal().getName(), servicePrincipalName );
@@ -821,8 +820,8 @@
         boolean isClose = Math.abs( reply.getEndTime().getTime() - expectedEndTime.getTime() ) < 5000;
         assertTrue( "Expected end time", isClose );
 
-        assertTrue( "RENEWABLE flag", reply.getFlags().get( TicketFlags.RENEWABLE ) );
-        assertFalse( "INVALID flag", reply.getFlags().get( TicketFlags.INVALID ) );
+        assertTrue( "RENEWABLE flag", reply.getFlags().isRenewable() );
+        assertFalse( "INVALID flag", reply.getFlags().isInvalid() );
 
         KerberosTime expectedRenewTillTime = new KerberosTime( now + KerberosTime.WEEK );
         isClose = Math.abs( reply.getRenewTill().getTime() - expectedRenewTillTime.getTime() ) < 5000;
@@ -866,11 +865,11 @@
 
         AuthenticationReply reply = ( AuthenticationReply ) session.getMessage();
 
-        assertTrue( "FORWARDABLE flag", reply.getFlags().get( TicketFlags.FORWARDABLE ) );
-        assertFalse( "INVALID flag", reply.getFlags().get( TicketFlags.INVALID ) );
+        assertTrue( "FORWARDABLE flag", reply.getFlags().isForwardable() );
+        assertFalse( "INVALID flag", reply.getFlags().isInvalid() );
 
-        assertTrue( "FORWARDABLE flag", reply.getTicket().getEncTicketPart().getFlags().get( TicketFlags.FORWARDABLE ) );
-        assertFalse( "INVALID flag", reply.getTicket().getEncTicketPart().getFlags().get( TicketFlags.INVALID ) );
+        assertTrue( "FORWARDABLE flag", reply.getTicket().getEncTicketPart().getFlags().isForwardable() );
+        assertFalse( "INVALID flag", reply.getTicket().getEncTicketPart().getFlags().isInvalid() );
     }
 
 
@@ -910,11 +909,11 @@
 
         AuthenticationReply reply = ( AuthenticationReply ) session.getMessage();
 
-        assertTrue( "MAY_POSTDATE flag", reply.getFlags().get( TicketFlags.MAY_POSTDATE ) );
-        assertFalse( "INVALID flag", reply.getFlags().get( TicketFlags.INVALID ) );
+        assertTrue( "MAY_POSTDATE flag", reply.getFlags().isMayPosdate() );
+        assertFalse( "INVALID flag", reply.getFlags().isInvalid() );
 
-        assertTrue( "MAY_POSTDATE flag", reply.getTicket().getEncTicketPart().getFlags().get( TicketFlags.MAY_POSTDATE ) );
-        assertFalse( "INVALID flag", reply.getTicket().getEncTicketPart().getFlags().get( TicketFlags.INVALID ) );
+        assertTrue( "MAY_POSTDATE flag", reply.getTicket().getEncTicketPart().getFlags().isMayPosdate() );
+        assertFalse( "INVALID flag", reply.getTicket().getEncTicketPart().getFlags().isInvalid() );
     }
 
 
@@ -954,11 +953,11 @@
 
         AuthenticationReply reply = ( AuthenticationReply ) session.getMessage();
 
-        assertTrue( "PROXIABLE flag", reply.getFlags().get( TicketFlags.PROXIABLE ) );
-        assertFalse( "INVALID flag", reply.getFlags().get( TicketFlags.INVALID ) );
+        assertTrue( "PROXIABLE flag", reply.getFlags().isProxiable() );
+        assertFalse( "INVALID flag", reply.getFlags().isInvalid() );
 
-        assertTrue( "PROXIABLE flag", reply.getTicket().getEncTicketPart().getFlags().get( TicketFlags.PROXIABLE ) );
-        assertFalse( "INVALID flag", reply.getTicket().getEncTicketPart().getFlags().get( TicketFlags.INVALID ) );
+        assertTrue( "PROXIABLE flag", reply.getTicket().getEncTicketPart().getFlags().isProxiable() );
+        assertFalse( "INVALID flag", reply.getTicket().getEncTicketPart().getFlags().isInvalid() );
     }
 
 
@@ -1004,11 +1003,11 @@
 
         AuthenticationReply reply = ( AuthenticationReply ) session.getMessage();
 
-        assertTrue( "RENEWABLE flag", reply.getFlags().get( TicketFlags.RENEWABLE ) );
-        assertFalse( "INVALID flag", reply.getFlags().get( TicketFlags.INVALID ) );
+        assertTrue( "RENEWABLE flag", reply.getFlags().isRenewable() );
+        assertFalse( "INVALID flag", reply.getFlags().isInvalid() );
 
-        assertTrue( "RENEWABLE flag", reply.getTicket().getEncTicketPart().getFlags().get( TicketFlags.RENEWABLE ) );
-        assertFalse( "INVALID flag", reply.getTicket().getEncTicketPart().getFlags().get( TicketFlags.INVALID ) );
+        assertTrue( "RENEWABLE flag", reply.getTicket().getEncTicketPart().getFlags().isRenewable() );
+        assertFalse( "INVALID flag", reply.getTicket().getEncTicketPart().getFlags().isInvalid() );
 
         assertTrue( "Requested renew-till time", requestedRenewTillTime.equals( reply.getRenewTill() ) );
     }
@@ -1057,11 +1056,11 @@
 
         AuthenticationReply reply = ( AuthenticationReply ) session.getMessage();
 
-        assertTrue( "RENEWABLE flag", reply.getFlags().get( TicketFlags.RENEWABLE ) );
-        assertFalse( "INVALID flag", reply.getFlags().get( TicketFlags.INVALID ) );
+        assertTrue( "RENEWABLE flag", reply.getFlags().isRenewable() );
+        assertFalse( "INVALID flag", reply.getFlags().isInvalid() );
 
-        assertTrue( "RENEWABLE flag", reply.getTicket().getEncTicketPart().getFlags().get( TicketFlags.RENEWABLE ) );
-        assertFalse( "INVALID flag", reply.getTicket().getEncTicketPart().getFlags().get( TicketFlags.INVALID ) );
+        assertTrue( "RENEWABLE flag", reply.getTicket().getEncTicketPart().getFlags().isRenewable() );
+        assertFalse( "INVALID flag", reply.getTicket().getEncTicketPart().getFlags().isInvalid() );
 
         KerberosTime expectedRenewTillTime = new KerberosTime( now + KerberosTime.WEEK );
         boolean isClose = Math.abs( reply.getRenewTill().getTime() - expectedRenewTillTime.getTime() ) < 5000;

Modified: directory/apacheds/branches/bigbang/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/protocol/TicketGrantingPolicyTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/protocol/TicketGrantingPolicyTest.java?rev=591019&r1=591018&r2=591019&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/protocol/TicketGrantingPolicyTest.java (original)
+++ directory/apacheds/branches/bigbang/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/protocol/TicketGrantingPolicyTest.java Thu Nov  1 07:16:34 2007
@@ -37,7 +37,7 @@
 import org.apache.directory.server.kerberos.shared.messages.value.KerberosTime;
 import org.apache.directory.server.kerberos.shared.messages.value.RequestBody;
 import org.apache.directory.server.kerberos.shared.messages.value.RequestBodyModifier;
-import org.apache.directory.server.kerberos.shared.messages.value.TicketFlags;
+import org.apache.directory.server.kerberos.shared.messages.value.flags.TicketFlag;
 import org.apache.directory.server.kerberos.shared.store.PrincipalStore;
 
 
@@ -91,7 +91,7 @@
         EncTicketPartModifier encTicketPartModifier = getTicketArchetype( clientPrincipal );
 
         // Make changes to test.
-        encTicketPartModifier.setFlag( TicketFlags.FORWARDABLE );
+        encTicketPartModifier.setFlag( TicketFlag.FORWARDABLE );
 
         // Seal the ticket for the server.
         KerberosPrincipal serverPrincipal = new KerberosPrincipal( "krbtgt/EXAMPLE.COM@EXAMPLE.COM" );
@@ -140,7 +140,7 @@
         EncTicketPartModifier encTicketPartModifier = getTicketArchetype( clientPrincipal );
 
         // Make changes to test.
-        encTicketPartModifier.setFlag( TicketFlags.FORWARDABLE );
+        encTicketPartModifier.setFlag( TicketFlag.FORWARDABLE );
 
         // Seal the ticket for the server.
         KerberosPrincipal serverPrincipal = new KerberosPrincipal( "krbtgt/EXAMPLE.COM@EXAMPLE.COM" );
@@ -189,7 +189,7 @@
         EncTicketPartModifier encTicketPartModifier = getTicketArchetype( clientPrincipal );
 
         // Make changes to test.
-        encTicketPartModifier.setFlag( TicketFlags.FORWARDABLE );
+        encTicketPartModifier.setFlag( TicketFlag.FORWARDABLE );
 
         HostAddress[] address =
                 {new HostAddress( InetAddress.getByAddress( new byte[4] ) )};
@@ -243,7 +243,7 @@
         EncTicketPartModifier encTicketPartModifier = getTicketArchetype( clientPrincipal );
 
         // Make changes to test.
-        encTicketPartModifier.setFlag( TicketFlags.PROXIABLE );
+        encTicketPartModifier.setFlag( TicketFlag.PROXIABLE );
 
         // Seal the ticket for the server.
         KerberosPrincipal serverPrincipal = new KerberosPrincipal( "krbtgt/EXAMPLE.COM@EXAMPLE.COM" );
@@ -292,7 +292,7 @@
         EncTicketPartModifier encTicketPartModifier = getTicketArchetype( clientPrincipal );
 
         // Make changes to test.
-        encTicketPartModifier.setFlag( TicketFlags.PROXIABLE );
+        encTicketPartModifier.setFlag( TicketFlag.PROXIABLE );
 
         // Seal the ticket for the server.
         KerberosPrincipal serverPrincipal = new KerberosPrincipal( "krbtgt/EXAMPLE.COM@EXAMPLE.COM" );
@@ -346,7 +346,7 @@
         EncTicketPartModifier encTicketPartModifier = getTicketArchetype( clientPrincipal );
 
         // Make changes to test.
-        encTicketPartModifier.setFlag( TicketFlags.PROXIABLE );
+        encTicketPartModifier.setFlag( TicketFlag.PROXIABLE );
 
         HostAddress[] address =
                 {new HostAddress( InetAddress.getByAddress( new byte[4] ) )};
@@ -400,7 +400,7 @@
         EncTicketPartModifier encTicketPartModifier = getTicketArchetype( clientPrincipal );
 
         // Make changes to test.
-        encTicketPartModifier.setFlag( TicketFlags.MAY_POSTDATE );
+        encTicketPartModifier.setFlag( TicketFlag.MAY_POSTDATE );
 
         // Seal the ticket for the server.
         KerberosPrincipal serverPrincipal = new KerberosPrincipal( "krbtgt/EXAMPLE.COM@EXAMPLE.COM" );
@@ -449,7 +449,7 @@
         EncTicketPartModifier encTicketPartModifier = getTicketArchetype( clientPrincipal );
 
         // Make changes to test.
-        encTicketPartModifier.setFlag( TicketFlags.MAY_POSTDATE );
+        encTicketPartModifier.setFlag( TicketFlag.MAY_POSTDATE );
 
         // Seal the ticket for the server.
         KerberosPrincipal serverPrincipal = new KerberosPrincipal( "krbtgt/EXAMPLE.COM@EXAMPLE.COM" );
@@ -498,7 +498,7 @@
         EncTicketPartModifier encTicketPartModifier = getTicketArchetype( clientPrincipal );
 
         // Make changes to test.
-        encTicketPartModifier.setFlag( TicketFlags.INVALID );
+        encTicketPartModifier.setFlag( TicketFlag.INVALID );
 
         // Seal the ticket for the server.
         KerberosPrincipal serverPrincipal = new KerberosPrincipal( "krbtgt/EXAMPLE.COM@EXAMPLE.COM" );
@@ -591,7 +591,7 @@
         EncTicketPartModifier encTicketPartModifier = getTicketArchetype( clientPrincipal );
 
         // Make changes to test.
-        encTicketPartModifier.setFlag( TicketFlags.RENEWABLE );
+        encTicketPartModifier.setFlag( TicketFlag.RENEWABLE );
 
         // Seal the ticket for the server.
         KerberosPrincipal serverPrincipal = new KerberosPrincipal( "krbtgt/EXAMPLE.COM@EXAMPLE.COM" );
@@ -640,7 +640,7 @@
         EncTicketPartModifier encTicketPartModifier = getTicketArchetype( clientPrincipal );
 
         // Make changes to test.
-        encTicketPartModifier.setFlag( TicketFlags.RENEWABLE );
+        encTicketPartModifier.setFlag( TicketFlag.RENEWABLE );
 
         // Seal the ticket for the server.
         KerberosPrincipal serverPrincipal = new KerberosPrincipal( "krbtgt/EXAMPLE.COM@EXAMPLE.COM" );

Modified: directory/apacheds/branches/bigbang/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/protocol/TicketGrantingServiceTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/protocol/TicketGrantingServiceTest.java?rev=591019&r1=591018&r2=591019&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/protocol/TicketGrantingServiceTest.java (original)
+++ directory/apacheds/branches/bigbang/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/protocol/TicketGrantingServiceTest.java Thu Nov  1 07:16:34 2007
@@ -45,7 +45,7 @@
 import org.apache.directory.server.kerberos.shared.messages.value.KerberosTime;
 import org.apache.directory.server.kerberos.shared.messages.value.RequestBody;
 import org.apache.directory.server.kerberos.shared.messages.value.RequestBodyModifier;
-import org.apache.directory.server.kerberos.shared.messages.value.TicketFlags;
+import org.apache.directory.server.kerberos.shared.messages.value.flags.TicketFlag;
 import org.apache.directory.server.kerberos.shared.store.PrincipalStore;
 
 
@@ -451,7 +451,7 @@
         EncTicketPartModifier encTicketPartModifier = getTicketArchetype( clientPrincipal );
 
         // Make changes to test.
-        encTicketPartModifier.setFlag( TicketFlags.INVALID );
+        encTicketPartModifier.setFlag( TicketFlag.INVALID );
 
         // Seal the ticket for the server.
         KerberosPrincipal serverPrincipal = new KerberosPrincipal( "krbtgt/EXAMPLE.COM@EXAMPLE.COM" );
@@ -501,7 +501,7 @@
         EncTicketPartModifier encTicketPartModifier = getTicketArchetype( clientPrincipal );
 
         // Make changes to test.
-        encTicketPartModifier.setFlag( TicketFlags.PROXIABLE );
+        encTicketPartModifier.setFlag( TicketFlag.PROXIABLE );
 
         // Seal the ticket for the server.
         KerberosPrincipal serverPrincipal = new KerberosPrincipal( "krbtgt/EXAMPLE.COM@EXAMPLE.COM" );
@@ -536,11 +536,11 @@
 
         TicketGrantReply reply = ( TicketGrantReply ) session.getMessage();
 
-        assertTrue( "PROXY flag", reply.getFlags().get( TicketFlags.PROXY ) );
-        assertFalse( "INVALID flag", reply.getFlags().get( TicketFlags.INVALID ) );
+        assertTrue( "PROXY flag", reply.getFlags().isProxy() );
+        assertFalse( "INVALID flag", reply.getFlags().isInvalid() );
 
-        assertTrue( "PROXY flag", reply.getTicket().getEncTicketPart().getFlags().get( TicketFlags.PROXY ) );
-        assertFalse( "INVALID flag", reply.getTicket().getEncTicketPart().getFlags().get( TicketFlags.INVALID ) );
+        assertTrue( "PROXY flag", reply.getTicket().getEncTicketPart().getFlags().isProxy() );
+        assertFalse( "INVALID flag", reply.getTicket().getEncTicketPart().getFlags().isInvalid() );
 
         assertNotNull( reply.getTicket().getEncTicketPart().getClientAddresses() );
     }
@@ -559,7 +559,7 @@
         EncTicketPartModifier encTicketPartModifier = getTicketArchetype( clientPrincipal );
 
         // Make changes to test.
-        encTicketPartModifier.setFlag( TicketFlags.FORWARDABLE );
+        encTicketPartModifier.setFlag( TicketFlag.FORWARDABLE );
 
         // Seal the ticket for the server.
         KerberosPrincipal serverPrincipal = new KerberosPrincipal( "krbtgt/EXAMPLE.COM@EXAMPLE.COM" );
@@ -594,11 +594,11 @@
 
         TicketGrantReply reply = ( TicketGrantReply ) session.getMessage();
 
-        assertTrue( "FORWARDED flag", reply.getFlags().get( TicketFlags.FORWARDED ) );
-        assertFalse( "INVALID flag", reply.getFlags().get( TicketFlags.INVALID ) );
+        assertTrue( "FORWARDED flag", reply.getFlags().isForwarded() );
+        assertFalse( "INVALID flag", reply.getFlags().isInvalid() );
 
-        assertTrue( "FORWARDED flag", reply.getTicket().getEncTicketPart().getFlags().get( TicketFlags.FORWARDED ) );
-        assertFalse( "INVALID flag", reply.getTicket().getEncTicketPart().getFlags().get( TicketFlags.INVALID ) );
+        assertTrue( "FORWARDED flag", reply.getTicket().getEncTicketPart().getFlags().isForwarded() );
+        assertFalse( "INVALID flag", reply.getTicket().getEncTicketPart().getFlags().isInvalid() );
 
         assertNotNull( reply.getTicket().getEncTicketPart().getClientAddresses() );
     }
@@ -664,7 +664,7 @@
         EncTicketPartModifier encTicketPartModifier = getTicketArchetype( clientPrincipal );
 
         // Make changes to test.
-        encTicketPartModifier.setFlag( TicketFlags.RENEWABLE );
+        encTicketPartModifier.setFlag( TicketFlag.RENEWABLE );
         encTicketPartModifier.setRenewTill( new KerberosTime( 0 ) );
 
         // Seal the ticket for the server.
@@ -714,7 +714,7 @@
         EncTicketPartModifier encTicketPartModifier = getTicketArchetype( clientPrincipal );
 
         // Make changes to test.
-        encTicketPartModifier.setFlag( TicketFlags.RENEWABLE );
+        encTicketPartModifier.setFlag( TicketFlag.RENEWABLE );
         encTicketPartModifier.setStartTime( new KerberosTime( now - KerberosTime.DAY / 2 ) );
         encTicketPartModifier.setEndTime( new KerberosTime( now + KerberosTime.DAY / 2 ) );
 
@@ -764,7 +764,7 @@
         EncTicketPartModifier encTicketPartModifier = getTicketArchetype( clientPrincipal );
 
         // Make changes to test.
-        encTicketPartModifier.setFlag( TicketFlags.RENEWABLE );
+        encTicketPartModifier.setFlag( TicketFlag.RENEWABLE );
         encTicketPartModifier.setStartTime( new KerberosTime( now - KerberosTime.DAY / 2 ) );
         encTicketPartModifier.setEndTime( new KerberosTime( now + KerberosTime.DAY / 2 ) );
 
@@ -1057,7 +1057,7 @@
         EncTicketPartModifier encTicketPartModifier = getTicketArchetype( clientPrincipal );
 
         // Make changes to test.
-        encTicketPartModifier.setFlag( TicketFlags.MAY_POSTDATE );
+        encTicketPartModifier.setFlag( TicketFlag.MAY_POSTDATE );
 
         // Seal the ticket for the server.
         KerberosPrincipal serverPrincipal = new KerberosPrincipal( "krbtgt/EXAMPLE.COM@EXAMPLE.COM" );
@@ -1111,7 +1111,7 @@
         EncTicketPartModifier encTicketPartModifier = getTicketArchetype( clientPrincipal );
 
         // Make changes to test.
-        encTicketPartModifier.setFlag( TicketFlags.MAY_POSTDATE );
+        encTicketPartModifier.setFlag( TicketFlag.MAY_POSTDATE );
 
         // Seal the ticket for the server.
         KerberosPrincipal serverPrincipal = new KerberosPrincipal( "krbtgt/EXAMPLE.COM@EXAMPLE.COM" );
@@ -1163,7 +1163,7 @@
         EncTicketPartModifier encTicketPartModifier = getTicketArchetype( clientPrincipal );
 
         // Make changes to test.
-        encTicketPartModifier.setFlag( TicketFlags.MAY_POSTDATE );
+        encTicketPartModifier.setFlag( TicketFlag.MAY_POSTDATE );
 
         // Seal the ticket for the server.
         KerberosPrincipal serverPrincipal = new KerberosPrincipal( "krbtgt/EXAMPLE.COM@EXAMPLE.COM" );
@@ -1226,7 +1226,7 @@
         EncTicketPartModifier encTicketPartModifier = getTicketArchetype( clientPrincipal );
 
         // Make changes to test.
-        encTicketPartModifier.setFlag( TicketFlags.MAY_POSTDATE );
+        encTicketPartModifier.setFlag( TicketFlag.MAY_POSTDATE );
         // Service ticket end time will be limited by TGT end time.
         encTicketPartModifier.setEndTime( new KerberosTime( now + 3 * KerberosTime.DAY ) );
 
@@ -1261,13 +1261,13 @@
 
         assertTrue( "Requested start time", requestedStartTime.equals( reply.getStartTime() ) );
         assertTrue( "Requested end time", requestedEndTime.equals( reply.getEndTime() ) );
-        assertTrue( "POSTDATED flag", reply.getFlags().get( TicketFlags.POSTDATED ) );
-        assertTrue( "INVALID flag", reply.getFlags().get( TicketFlags.INVALID ) );
+        assertTrue( "POSTDATED flag", reply.getFlags().isPostdated() );
+        assertTrue( "INVALID flag", reply.getFlags().isInvalid() );
 
         assertTrue( "Requested start time", requestedStartTime.equals( reply.getTicket().getEncTicketPart().getStartTime() ) );
         assertTrue( "Requested end time", requestedEndTime.equals( reply.getEndTime() ) );
-        assertTrue( "POSTDATED flag", reply.getTicket().getEncTicketPart().getFlags().get( TicketFlags.POSTDATED ) );
-        assertTrue( "INVALID flag", reply.getTicket().getEncTicketPart().getFlags().get( TicketFlags.INVALID ) );
+        assertTrue( "POSTDATED flag", reply.getTicket().getEncTicketPart().getFlags().isPostdated() );
+        assertTrue( "INVALID flag", reply.getTicket().getEncTicketPart().getFlags().isInvalid() );
     }
 
 
@@ -1284,7 +1284,7 @@
         EncTicketPartModifier encTicketPartModifier = getTicketArchetype( clientPrincipal );
 
         // Make changes to test.
-        encTicketPartModifier.setFlag( TicketFlags.PRE_AUTHENT );
+        encTicketPartModifier.setFlag( TicketFlag.PRE_AUTHENT );
 
         // Seal the ticket for the server.
         KerberosPrincipal serverPrincipal = new KerberosPrincipal( "krbtgt/EXAMPLE.COM@EXAMPLE.COM" );
@@ -1313,7 +1313,7 @@
 
         TicketGrantReply reply = ( TicketGrantReply ) session.getMessage();
 
-        assertTrue( "PRE_AUTHENT flag", reply.getTicket().getEncTicketPart().getFlags().get( TicketFlags.PRE_AUTHENT ) );
+        assertTrue( "PRE_AUTHENT flag", reply.getTicket().getEncTicketPart().getFlags().isPreAuth() );
     }
 
 
@@ -1486,7 +1486,7 @@
         EncTicketPartModifier encTicketPartModifier = getTicketArchetype( clientPrincipal );
 
         // Make changes to test.
-        encTicketPartModifier.setFlag( TicketFlags.RENEWABLE );
+        encTicketPartModifier.setFlag( TicketFlag.RENEWABLE );
 
         // Seal the ticket for the server.
         KerberosPrincipal serverPrincipal = new KerberosPrincipal( "krbtgt/EXAMPLE.COM@EXAMPLE.COM" );
@@ -1520,8 +1520,8 @@
         boolean isClose = Math.abs( reply.getEndTime().getTime() - expectedEndTime.getTime() ) < 5000;
         assertTrue( "Expected end time", isClose );
 
-        assertTrue( "RENEWABLE flag", reply.getFlags().get( TicketFlags.RENEWABLE ) );
-        assertFalse( "INVALID flag", reply.getFlags().get( TicketFlags.INVALID ) );
+        assertTrue( "RENEWABLE flag", reply.getFlags().isRenewable() );
+        assertFalse( "INVALID flag", reply.getFlags().isInvalid() );
 
         KerberosTime expectedRenewTillTime = new KerberosTime( now + KerberosTime.WEEK );
         isClose = Math.abs( reply.getRenewTill().getTime() - expectedRenewTillTime.getTime() ) < 5000;
@@ -1545,7 +1545,7 @@
         EncTicketPartModifier encTicketPartModifier = getTicketArchetype( clientPrincipal );
 
         // Make changes to test.
-        encTicketPartModifier.setFlag( TicketFlags.FORWARDABLE );
+        encTicketPartModifier.setFlag( TicketFlag.FORWARDABLE );
 
         // Seal the ticket for the server.
         KerberosPrincipal serverPrincipal = new KerberosPrincipal( "krbtgt/EXAMPLE.COM@EXAMPLE.COM" );
@@ -1575,11 +1575,11 @@
 
         TicketGrantReply reply = ( TicketGrantReply ) session.getMessage();
 
-        assertTrue( "FORWARDABLE flag", reply.getFlags().get( TicketFlags.FORWARDABLE ) );
-        assertFalse( "INVALID flag", reply.getFlags().get( TicketFlags.INVALID ) );
+        assertTrue( "FORWARDABLE flag", reply.getFlags().isForwardable() );
+        assertFalse( "INVALID flag", reply.getFlags().isInvalid() );
 
-        assertTrue( "FORWARDABLE flag", reply.getTicket().getEncTicketPart().getFlags().get( TicketFlags.FORWARDABLE ) );
-        assertFalse( "INVALID flag", reply.getTicket().getEncTicketPart().getFlags().get( TicketFlags.INVALID ) );
+        assertTrue( "FORWARDABLE flag", reply.getTicket().getEncTicketPart().getFlags().isForwardable() );
+        assertFalse( "INVALID flag", reply.getTicket().getEncTicketPart().getFlags().isInvalid() );
     }
 
 
@@ -1599,7 +1599,7 @@
         EncTicketPartModifier encTicketPartModifier = getTicketArchetype( clientPrincipal );
 
         // Make changes to test.
-        encTicketPartModifier.setFlag( TicketFlags.MAY_POSTDATE );
+        encTicketPartModifier.setFlag( TicketFlag.MAY_POSTDATE );
 
         // Seal the ticket for the server.
         KerberosPrincipal serverPrincipal = new KerberosPrincipal( "krbtgt/EXAMPLE.COM@EXAMPLE.COM" );
@@ -1629,11 +1629,11 @@
 
         TicketGrantReply reply = ( TicketGrantReply ) session.getMessage();
 
-        assertTrue( "MAY_POSTDATE flag", reply.getFlags().get( TicketFlags.MAY_POSTDATE ) );
-        assertFalse( "INVALID flag", reply.getFlags().get( TicketFlags.INVALID ) );
+        assertTrue( "MAY_POSTDATE flag", reply.getFlags().isMayPosdate() );
+        assertFalse( "INVALID flag", reply.getFlags().isInvalid() );
 
-        assertTrue( "MAY_POSTDATE flag", reply.getTicket().getEncTicketPart().getFlags().get( TicketFlags.MAY_POSTDATE ) );
-        assertFalse( "INVALID flag", reply.getTicket().getEncTicketPart().getFlags().get( TicketFlags.INVALID ) );
+        assertTrue( "MAY_POSTDATE flag", reply.getTicket().getEncTicketPart().getFlags().isMayPosdate() );
+        assertFalse( "INVALID flag", reply.getTicket().getEncTicketPart().getFlags().isInvalid() );
     }
 
 
@@ -1653,7 +1653,7 @@
         EncTicketPartModifier encTicketPartModifier = getTicketArchetype( clientPrincipal );
 
         // Make changes to test.
-        encTicketPartModifier.setFlag( TicketFlags.PROXIABLE );
+        encTicketPartModifier.setFlag( TicketFlag.PROXIABLE );
 
         // Seal the ticket for the server.
         KerberosPrincipal serverPrincipal = new KerberosPrincipal( "krbtgt/EXAMPLE.COM@EXAMPLE.COM" );
@@ -1683,11 +1683,11 @@
 
         TicketGrantReply reply = ( TicketGrantReply ) session.getMessage();
 
-        assertTrue( "PROXIABLE flag", reply.getFlags().get( TicketFlags.PROXIABLE ) );
-        assertFalse( "INVALID flag", reply.getFlags().get( TicketFlags.INVALID ) );
+        assertTrue( "PROXIABLE flag", reply.getFlags().isProxiable() );
+        assertFalse( "INVALID flag", reply.getFlags().isInvalid() );
 
-        assertTrue( "PROXIABLE flag", reply.getTicket().getEncTicketPart().getFlags().get( TicketFlags.PROXIABLE ) );
-        assertFalse( "INVALID flag", reply.getTicket().getEncTicketPart().getFlags().get( TicketFlags.INVALID ) );
+        assertTrue( "PROXIABLE flag", reply.getTicket().getEncTicketPart().getFlags().isProxiable() );
+        assertFalse( "INVALID flag", reply.getTicket().getEncTicketPart().getFlags().isInvalid() );
     }
 
 
@@ -1710,7 +1710,7 @@
         EncTicketPartModifier encTicketPartModifier = getTicketArchetype( clientPrincipal );
 
         // Make changes to test.
-        encTicketPartModifier.setFlag( TicketFlags.RENEWABLE );
+        encTicketPartModifier.setFlag( TicketFlag.RENEWABLE );
 
         // Seal the ticket for the server.
         KerberosPrincipal serverPrincipal = new KerberosPrincipal( "krbtgt/EXAMPLE.COM@EXAMPLE.COM" );
@@ -1743,11 +1743,11 @@
 
         TicketGrantReply reply = ( TicketGrantReply ) session.getMessage();
 
-        assertTrue( "RENEWABLE flag", reply.getFlags().get( TicketFlags.RENEWABLE ) );
-        assertFalse( "INVALID flag", reply.getFlags().get( TicketFlags.INVALID ) );
+        assertTrue( "RENEWABLE flag", reply.getFlags().isRenewable() );
+        assertFalse( "INVALID flag", reply.getFlags().isInvalid() );
 
-        assertTrue( "RENEWABLE flag", reply.getTicket().getEncTicketPart().getFlags().get( TicketFlags.RENEWABLE ) );
-        assertFalse( "INVALID flag", reply.getTicket().getEncTicketPart().getFlags().get( TicketFlags.INVALID ) );
+        assertTrue( "RENEWABLE flag", reply.getTicket().getEncTicketPart().getFlags().isRenewable() );
+        assertFalse( "INVALID flag", reply.getTicket().getEncTicketPart().getFlags().isInvalid() );
 
         assertTrue( "Requested renew-till time", requestedRenewTillTime.equals( reply.getRenewTill() ) );
     }
@@ -1773,7 +1773,7 @@
         EncTicketPartModifier encTicketPartModifier = getTicketArchetype( clientPrincipal );
 
         // Make changes to test.
-        encTicketPartModifier.setFlag( TicketFlags.RENEWABLE );
+        encTicketPartModifier.setFlag( TicketFlag.RENEWABLE );
 
         // Seal the ticket for the server.
         KerberosPrincipal serverPrincipal = new KerberosPrincipal( "krbtgt/EXAMPLE.COM@EXAMPLE.COM" );
@@ -1806,11 +1806,11 @@
 
         TicketGrantReply reply = ( TicketGrantReply ) session.getMessage();
 
-        assertTrue( "RENEWABLE flag", reply.getFlags().get( TicketFlags.RENEWABLE ) );
-        assertFalse( "INVALID flag", reply.getFlags().get( TicketFlags.INVALID ) );
+        assertTrue( "RENEWABLE flag", reply.getFlags().isRenewable() );
+        assertFalse( "INVALID flag", reply.getFlags().isInvalid() );
 
-        assertTrue( "RENEWABLE flag", reply.getTicket().getEncTicketPart().getFlags().get( TicketFlags.RENEWABLE ) );
-        assertFalse( "INVALID flag", reply.getTicket().getEncTicketPart().getFlags().get( TicketFlags.INVALID ) );
+        assertTrue( "RENEWABLE flag", reply.getTicket().getEncTicketPart().getFlags().isRenewable() );
+        assertFalse( "INVALID flag", reply.getTicket().getEncTicketPart().getFlags().isInvalid() );
 
         KerberosTime expectedRenewTillTime = new KerberosTime( now + KerberosTime.WEEK );
         boolean isClose = Math.abs( reply.getRenewTill().getTime() - expectedRenewTillTime.getTime() ) < 5000;
@@ -1862,8 +1862,8 @@
 
         TicketGrantReply reply = ( TicketGrantReply ) session.getMessage();
 
-        assertFalse( "INVALID flag", reply.getFlags().get( TicketFlags.INVALID ) );
-        assertFalse( "INVALID flag", reply.getTicket().getEncTicketPart().getFlags().get( TicketFlags.INVALID ) );
+        assertFalse( "INVALID flag", reply.getFlags().isInvalid() );
+        assertFalse( "INVALID flag", reply.getTicket().getEncTicketPart().getFlags().isInvalid() );
     }
 
 



Mime
View raw message