directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1036962 - in /directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos: codec/authenticator/ codec/authenticator/actions/ messages/
Date Fri, 19 Nov 2010 18:03:52 GMT
Author: elecharny
Date: Fri Nov 19 18:03:51 2010
New Revision: 1036962

URL: http://svn.apache.org/viewvc?rev=1036962&view=rev
Log:
Added the Authenticor decoder

Added:
    directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/authenticator/
    directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/authenticator/AuthenticatorContainer.java
    directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/authenticator/AuthenticatorGrammar.java
    directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/authenticator/AuthenticatorStatesEnum.java
    directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/authenticator/actions/
    directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/authenticator/actions/AuthenticatorInit.java
    directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/authenticator/actions/StoreAuthenticatorVno.java
    directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/authenticator/actions/StoreAuthorizationData.java
    directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/authenticator/actions/StoreCName.java
    directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/authenticator/actions/StoreCRealm.java
    directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/authenticator/actions/StoreChecksum.java
    directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/authenticator/actions/StoreCusec.java
    directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/authenticator/actions/StoreSeqNumber.java
    directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/authenticator/actions/StoreSubKey.java
Modified:
    directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/messages/Authenticator.java

Added: directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/authenticator/AuthenticatorContainer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/authenticator/AuthenticatorContainer.java?rev=1036962&view=auto
==============================================================================
--- directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/authenticator/AuthenticatorContainer.java (added)
+++ directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/authenticator/AuthenticatorContainer.java Fri Nov 19 18:03:51 2010
@@ -0,0 +1,67 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *  
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *  
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License. 
+ *  
+ */
+package org.apache.directory.shared.kerberos.codec.authenticator;
+
+import org.apache.directory.shared.asn1.ber.AbstractContainer;
+import org.apache.directory.shared.kerberos.messages.Authenticator;
+
+
+/**
+ * The Authenticator container stores the Authenticator decoded by the Asn1Decoder.
+ * 
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public class AuthenticatorContainer extends AbstractContainer
+{
+    /** An Authenticator container */
+    private Authenticator authenticator;
+    
+    /**
+     * Creates a new AuthenticatorContainer object.
+     */
+    public AuthenticatorContainer()
+    {
+        super();
+        this.stateStack = new int[1];
+        this.grammar = AuthenticatorGrammar.getInstance();
+        setTransition( AuthenticatorStatesEnum.START_STATE );
+    }
+
+
+    /**
+     * @return Returns the Authenticator.
+     */
+    public Authenticator getAuthenticator()
+    {
+        return authenticator;
+    }
+
+    
+    /**
+     * Set a Authenticator Object into the container. It will be completed by the
+     * KerberosDecoder.
+     * 
+     * @param authenticator The Authenticator to set.
+     */
+    public void setAuthenticator( Authenticator authenticator )
+    {
+        this.authenticator = authenticator;
+    }
+}

Added: directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/authenticator/AuthenticatorGrammar.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/authenticator/AuthenticatorGrammar.java?rev=1036962&view=auto
==============================================================================
--- directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/authenticator/AuthenticatorGrammar.java (added)
+++ directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/authenticator/AuthenticatorGrammar.java Fri Nov 19 18:03:51 2010
@@ -0,0 +1,280 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *  
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *  
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License. 
+ *  
+ */
+package org.apache.directory.shared.kerberos.codec.authenticator;
+
+
+import org.apache.directory.shared.asn1.ber.grammar.AbstractGrammar;
+import org.apache.directory.shared.asn1.ber.grammar.Grammar;
+import org.apache.directory.shared.asn1.ber.grammar.GrammarTransition;
+import org.apache.directory.shared.asn1.ber.tlv.UniversalTag;
+import org.apache.directory.shared.kerberos.KerberosConstants;
+import org.apache.directory.shared.kerberos.codec.actions.CheckNotNullLength;
+import org.apache.directory.shared.kerberos.codec.authenticator.actions.AuthenticatorInit;
+import org.apache.directory.shared.kerberos.codec.authenticator.actions.StoreAuthenticatorVno;
+import org.apache.directory.shared.kerberos.codec.authenticator.actions.StoreAuthorizationData;
+import org.apache.directory.shared.kerberos.codec.authenticator.actions.StoreCName;
+import org.apache.directory.shared.kerberos.codec.authenticator.actions.StoreCRealm;
+import org.apache.directory.shared.kerberos.codec.authenticator.actions.StoreChecksum;
+import org.apache.directory.shared.kerberos.codec.authenticator.actions.StoreCusec;
+import org.apache.directory.shared.kerberos.codec.authenticator.actions.StoreSeqNumber;
+import org.apache.directory.shared.kerberos.codec.authenticator.actions.StoreSubKey;
+import org.apache.directory.shared.kerberos.codec.krbError.actions.StoreCTime;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+/**
+ * This class implements the Authenticator structure. All the actions are declared
+ * in this class. As it is a singleton, these declaration are only done once. If
+ * an action is to be added or modified, this is where the work is to be done !
+ * 
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public final class AuthenticatorGrammar extends AbstractGrammar
+{
+    /** The logger */
+    static final Logger LOG = LoggerFactory.getLogger( AuthenticatorGrammar.class );
+
+    /** A speedup for logger */
+    static final boolean IS_DEBUG = LOG.isDebugEnabled();
+
+    /** The instance of grammar. AuthenticatorGrammar is a singleton */
+    private static Grammar instance = new AuthenticatorGrammar();
+
+
+    /**
+     * Creates a new AuthenticatorGrammar object.
+     */
+    private AuthenticatorGrammar()
+    {
+        setName( AuthenticatorGrammar.class.getName() );
+
+        // Create the transitions table
+        super.transitions = new GrammarTransition[AuthenticatorStatesEnum.LAST_AUTHENTICATOR_STATE.ordinal()][256];
+
+        // ============================================================================================
+        // Authenticator 
+        // ============================================================================================
+        // --------------------------------------------------------------------------------------------
+        // Transition from START to Authenticator init
+        // --------------------------------------------------------------------------------------------
+        // Authenticator    ::= [APPLICATION 2]
+        super.transitions[AuthenticatorStatesEnum.START_STATE.ordinal()][KerberosConstants.AUTHENTICATOR_TAG] = new GrammarTransition(
+            AuthenticatorStatesEnum.START_STATE, AuthenticatorStatesEnum.AUTHENTICATOR_STATE, KerberosConstants.AUTHENTICATOR_TAG,
+            new AuthenticatorInit() );
+        
+        // --------------------------------------------------------------------------------------------
+        // Transition from Authenticator init to Authenticator SEQ 
+        // --------------------------------------------------------------------------------------------
+        // Authenticator    ::= [APPLICATION 2] SEQUENCE {
+        super.transitions[AuthenticatorStatesEnum.AUTHENTICATOR_STATE.ordinal()][UniversalTag.SEQUENCE.getValue()] = new GrammarTransition(
+            AuthenticatorStatesEnum.AUTHENTICATOR_STATE, AuthenticatorStatesEnum.AUTHENTICATOR_SEQ_STATE, UniversalTag.SEQUENCE.getValue(),
+            new CheckNotNullLength() );
+        
+        // --------------------------------------------------------------------------------------------
+        // Transition from Authenticator SEQ to authenticator-vno tag 
+        // --------------------------------------------------------------------------------------------
+        // Authenticator    ::= [APPLICATION 2] SEQUENCE {
+        //         authenticator-vno       [0]
+        super.transitions[AuthenticatorStatesEnum.AUTHENTICATOR_SEQ_STATE.ordinal()][KerberosConstants.AUTHENTICATOR_AUTHENTICATOR_VNO_TAG] = new GrammarTransition(
+            AuthenticatorStatesEnum.AUTHENTICATOR_SEQ_STATE, AuthenticatorStatesEnum.AUTHENTICATOR_AUTHENTICATOR_VNO_TAG_STATE, KerberosConstants.AUTHENTICATOR_AUTHENTICATOR_VNO_TAG,
+            new CheckNotNullLength() );
+        
+        // --------------------------------------------------------------------------------------------
+        // Transition from authenticator-vno tag to authenticator-vno value 
+        // --------------------------------------------------------------------------------------------
+        // Authenticator    ::= [APPLICATION 2] SEQUENCE {
+        //         authenticator-vno       [0] INTEGER (5),
+        super.transitions[AuthenticatorStatesEnum.AUTHENTICATOR_AUTHENTICATOR_VNO_TAG_STATE.ordinal()][UniversalTag.INTEGER.getValue()] = new GrammarTransition(
+            AuthenticatorStatesEnum.AUTHENTICATOR_AUTHENTICATOR_VNO_TAG_STATE, AuthenticatorStatesEnum.AUTHENTICATOR_AUTHENTICATOR_VNO_STATE, UniversalTag.INTEGER.getValue(),
+            new StoreAuthenticatorVno() );
+        
+        // --------------------------------------------------------------------------------------------
+        // Transition from authenticator-vno value to crealm tag 
+        // --------------------------------------------------------------------------------------------
+        // Authenticator    ::= [APPLICATION 2] SEQUENCE {
+        //         ...
+        //         crealm                  [1]
+        super.transitions[AuthenticatorStatesEnum.AUTHENTICATOR_AUTHENTICATOR_VNO_STATE.ordinal()][KerberosConstants.AUTHENTICATOR_CREALM_TAG] = new GrammarTransition(
+            AuthenticatorStatesEnum.AUTHENTICATOR_AUTHENTICATOR_VNO_STATE, AuthenticatorStatesEnum.AUTHENTICATOR_CREALM_TAG_STATE, KerberosConstants.AUTHENTICATOR_CREALM_TAG,
+            new CheckNotNullLength() );
+        
+        // --------------------------------------------------------------------------------------------
+        // Transition from crealm tag to crealm value 
+        // --------------------------------------------------------------------------------------------
+        // Authenticator    ::= [APPLICATION 2] SEQUENCE {
+        //         ...
+        //         crealm                  [1] Realm,
+        super.transitions[AuthenticatorStatesEnum.AUTHENTICATOR_CREALM_TAG_STATE.ordinal()][UniversalTag.GENERAL_STRING.getValue()] = new GrammarTransition(
+            AuthenticatorStatesEnum.AUTHENTICATOR_CREALM_TAG_STATE, AuthenticatorStatesEnum.AUTHENTICATOR_CREALM_STATE, UniversalTag.GENERAL_STRING.getValue(),
+            new StoreCRealm() );
+        
+        // --------------------------------------------------------------------------------------------
+        // Transition from crealm value cname
+        // --------------------------------------------------------------------------------------------
+        // Authenticator    ::= [APPLICATION 2] SEQUENCE {
+        //         ...
+        //         cname                   [2] PrincipalName,
+        super.transitions[AuthenticatorStatesEnum.AUTHENTICATOR_CREALM_STATE.ordinal()][KerberosConstants.AUTHENTICATOR_CNAME_TAG] = new GrammarTransition(
+            AuthenticatorStatesEnum.AUTHENTICATOR_CREALM_STATE, AuthenticatorStatesEnum.AUTHENTICATOR_CNAME_STATE, KerberosConstants.AUTHENTICATOR_CNAME_TAG,
+            new StoreCName() );
+        
+        // --------------------------------------------------------------------------------------------
+        // Transition from cname to cksum
+        // --------------------------------------------------------------------------------------------
+        // Authenticator    ::= [APPLICATION 2] SEQUENCE {
+        //         ...
+        //         cksum                   [3] Checksum OPTIONAL,
+        super.transitions[AuthenticatorStatesEnum.AUTHENTICATOR_CNAME_STATE.ordinal()][KerberosConstants.AUTHENTICATOR_CKSUM_TAG] = new GrammarTransition(
+            AuthenticatorStatesEnum.AUTHENTICATOR_CNAME_STATE, AuthenticatorStatesEnum.AUTHENTICATOR_CKSUM_STATE, KerberosConstants.AUTHENTICATOR_CKSUM_TAG,
+            new StoreChecksum() );
+        
+        // --------------------------------------------------------------------------------------------
+        // Transition from cname to cusec tag
+        // --------------------------------------------------------------------------------------------
+        // Authenticator    ::= [APPLICATION 2] SEQUENCE {
+        //         ...
+        //         cusec                   [4]
+        super.transitions[AuthenticatorStatesEnum.AUTHENTICATOR_CNAME_STATE.ordinal()][KerberosConstants.AUTHENTICATOR_CUSEC_TAG] = new GrammarTransition(
+            AuthenticatorStatesEnum.AUTHENTICATOR_CNAME_STATE, AuthenticatorStatesEnum.AUTHENTICATOR_CUSEC_TAG_STATE, KerberosConstants.AUTHENTICATOR_CUSEC_TAG,
+            new CheckNotNullLength() );
+        
+        // --------------------------------------------------------------------------------------------
+        // Transition from cksum to cusec tag
+        // --------------------------------------------------------------------------------------------
+        // Authenticator    ::= [APPLICATION 2] SEQUENCE {
+        //         ...
+        //         cusec                   [4]
+        super.transitions[AuthenticatorStatesEnum.AUTHENTICATOR_CKSUM_STATE.ordinal()][KerberosConstants.AUTHENTICATOR_CUSEC_TAG] = new GrammarTransition(
+            AuthenticatorStatesEnum.AUTHENTICATOR_CKSUM_STATE, AuthenticatorStatesEnum.AUTHENTICATOR_CUSEC_TAG_STATE, KerberosConstants.AUTHENTICATOR_CUSEC_TAG,
+            new CheckNotNullLength() );
+        
+        // --------------------------------------------------------------------------------------------
+        // Transition from cusec tag to cusec value
+        // --------------------------------------------------------------------------------------------
+        // Authenticator    ::= [APPLICATION 2] SEQUENCE {
+        //         ...
+        //         cusec                   [4] Microseconds,
+        super.transitions[AuthenticatorStatesEnum.AUTHENTICATOR_CUSEC_TAG_STATE.ordinal()][UniversalTag.INTEGER.getValue()] = new GrammarTransition(
+            AuthenticatorStatesEnum.AUTHENTICATOR_CUSEC_TAG_STATE, AuthenticatorStatesEnum.AUTHENTICATOR_CUSEC_STATE, UniversalTag.INTEGER.getValue(),
+            new StoreCusec() );
+        
+        // --------------------------------------------------------------------------------------------
+        // Transition from cusec value to ctime tag
+        // --------------------------------------------------------------------------------------------
+        // Authenticator    ::= [APPLICATION 2] SEQUENCE {
+        //         ...
+        //         ctime                   [5] 
+        super.transitions[AuthenticatorStatesEnum.AUTHENTICATOR_CUSEC_STATE.ordinal()][KerberosConstants.AUTHENTICATOR_CTIME_TAG] = new GrammarTransition(
+            AuthenticatorStatesEnum.AUTHENTICATOR_CUSEC_STATE, AuthenticatorStatesEnum.AUTHENTICATOR_CTIME_TAG_STATE, KerberosConstants.AUTHENTICATOR_CTIME_TAG,
+            new CheckNotNullLength() );
+        
+        // --------------------------------------------------------------------------------------------
+        // Transition from ctime tag to ctime value
+        // --------------------------------------------------------------------------------------------
+        // Authenticator    ::= [APPLICATION 2] SEQUENCE {
+        //         ...
+        //         ctime                   [5] KerberosTime,
+        super.transitions[AuthenticatorStatesEnum.AUTHENTICATOR_CTIME_TAG_STATE.ordinal()][UniversalTag.GENERALIZED_TIME.getValue()] = new GrammarTransition(
+            AuthenticatorStatesEnum.AUTHENTICATOR_CTIME_TAG_STATE, AuthenticatorStatesEnum.AUTHENTICATOR_CTIME_STATE, UniversalTag.GENERALIZED_TIME.getValue(),
+            new StoreCTime() );
+        
+        // --------------------------------------------------------------------------------------------
+        // Transition from ctime value to subkey
+        // --------------------------------------------------------------------------------------------
+        // Authenticator    ::= [APPLICATION 2] SEQUENCE {
+        //         ...
+        //         subkey                  [6] EncryptionKe> OPTIONAL,
+        super.transitions[AuthenticatorStatesEnum.AUTHENTICATOR_CTIME_STATE.ordinal()][KerberosConstants.AUTHENTICATOR_SUBKEY_TAG] = new GrammarTransition(
+            AuthenticatorStatesEnum.AUTHENTICATOR_CTIME_STATE, AuthenticatorStatesEnum.AUTHENTICATOR_SUBKEY_STATE, KerberosConstants.AUTHENTICATOR_SUBKEY_TAG,
+            new StoreSubKey() );
+        
+        // --------------------------------------------------------------------------------------------
+        // Transition from ctime value to seq-number
+        // --------------------------------------------------------------------------------------------
+        // Authenticator    ::= [APPLICATION 2] SEQUENCE {
+        //         ...
+        //         seq-number              [7] UInt32 OPTIONAL,
+        super.transitions[AuthenticatorStatesEnum.AUTHENTICATOR_CTIME_STATE.ordinal()][KerberosConstants.AUTHENTICATOR_SEQ_NUMBER_TAG] = new GrammarTransition(
+            AuthenticatorStatesEnum.AUTHENTICATOR_CTIME_STATE, AuthenticatorStatesEnum.AUTHENTICATOR_SEQ_NUMBER_TAG_STATE, KerberosConstants.AUTHENTICATOR_SEQ_NUMBER_TAG,
+            new CheckNotNullLength() );
+        
+        // --------------------------------------------------------------------------------------------
+        // Transition from ctime value to authorization-data
+        // --------------------------------------------------------------------------------------------
+        // Authenticator    ::= [APPLICATION 2] SEQUENCE {
+        //         ...
+        //         authorization-data      [8] AuthorizationData OPTIONAL
+        super.transitions[AuthenticatorStatesEnum.AUTHENTICATOR_CTIME_STATE.ordinal()][KerberosConstants.AUTHENTICATOR_AUTHORIZATION_DATA_TAG] = new GrammarTransition(
+            AuthenticatorStatesEnum.AUTHENTICATOR_CTIME_STATE, AuthenticatorStatesEnum.AUTHENTICATOR_AUTHORIZATION_DATA_STATE, KerberosConstants.AUTHENTICATOR_AUTHORIZATION_DATA_TAG,
+            new StoreAuthorizationData() );
+        
+        // --------------------------------------------------------------------------------------------
+        // Transition from subkey to seq-number
+        // --------------------------------------------------------------------------------------------
+        // Authenticator    ::= [APPLICATION 2] SEQUENCE {
+        //         ...
+        //         seq-number              [7] UInt32 OPTIONAL,
+        super.transitions[AuthenticatorStatesEnum.AUTHENTICATOR_SUBKEY_STATE.ordinal()][KerberosConstants.AUTHENTICATOR_SEQ_NUMBER_TAG] = new GrammarTransition(
+            AuthenticatorStatesEnum.AUTHENTICATOR_SUBKEY_STATE, AuthenticatorStatesEnum.AUTHENTICATOR_SEQ_NUMBER_TAG_STATE, KerberosConstants.AUTHENTICATOR_SEQ_NUMBER_TAG,
+            new CheckNotNullLength() );
+        
+        // --------------------------------------------------------------------------------------------
+        // Transition from subkey to authorization-data
+        // --------------------------------------------------------------------------------------------
+        // Authenticator    ::= [APPLICATION 2] SEQUENCE {
+        //         ...
+        //         authorization-data      [8] AuthorizationData OPTIONAL
+        super.transitions[AuthenticatorStatesEnum.AUTHENTICATOR_SUBKEY_STATE.ordinal()][KerberosConstants.AUTHENTICATOR_AUTHORIZATION_DATA_TAG] = new GrammarTransition(
+            AuthenticatorStatesEnum.AUTHENTICATOR_SUBKEY_STATE, AuthenticatorStatesEnum.AUTHENTICATOR_AUTHORIZATION_DATA_STATE, KerberosConstants.AUTHENTICATOR_AUTHORIZATION_DATA_TAG,
+            new StoreAuthorizationData() );
+        
+        // --------------------------------------------------------------------------------------------
+        // Transition from seq-number tag to seq-number value
+        // --------------------------------------------------------------------------------------------
+        // Authenticator    ::= [APPLICATION 2] SEQUENCE {
+        //         ...
+        //         authorization-data      [8] AuthorizationData OPTIONAL
+        super.transitions[AuthenticatorStatesEnum.AUTHENTICATOR_SEQ_NUMBER_TAG_STATE.ordinal()][UniversalTag.INTEGER.getValue()] = new GrammarTransition(
+            AuthenticatorStatesEnum.AUTHENTICATOR_SEQ_NUMBER_TAG_STATE, AuthenticatorStatesEnum.AUTHENTICATOR_SEQ_NUMBER_STATE, UniversalTag.INTEGER.getValue(),
+            new StoreSeqNumber() );
+        
+        // --------------------------------------------------------------------------------------------
+        // Transition from seq-number value to authorization-data
+        // --------------------------------------------------------------------------------------------
+        // Authenticator    ::= [APPLICATION 2] SEQUENCE {
+        //         ...
+        //         authorization-data      [8] AuthorizationData OPTIONAL
+        // }
+        super.transitions[AuthenticatorStatesEnum.AUTHENTICATOR_SEQ_NUMBER_STATE.ordinal()][KerberosConstants.AUTHENTICATOR_AUTHORIZATION_DATA_TAG] = new GrammarTransition(
+            AuthenticatorStatesEnum.AUTHENTICATOR_SEQ_NUMBER_STATE, AuthenticatorStatesEnum.AUTHENTICATOR_AUTHORIZATION_DATA_STATE, KerberosConstants.AUTHENTICATOR_AUTHORIZATION_DATA_TAG,
+            new StoreAuthorizationData() );
+    }
+
+    /**
+     * Get the instance of this grammar
+     * 
+     * @return An instance on the Authenticator Grammar
+     */
+    public static Grammar getInstance()
+    {
+        return instance;
+    }
+}

Added: directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/authenticator/AuthenticatorStatesEnum.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/authenticator/AuthenticatorStatesEnum.java?rev=1036962&view=auto
==============================================================================
--- directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/authenticator/AuthenticatorStatesEnum.java (added)
+++ directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/authenticator/AuthenticatorStatesEnum.java Fri Nov 19 18:03:51 2010
@@ -0,0 +1,129 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *  
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *  
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License. 
+ *  
+ */
+package org.apache.directory.shared.kerberos.codec.authenticator;
+
+
+import org.apache.directory.shared.asn1.ber.grammar.Grammar;
+import org.apache.directory.shared.asn1.ber.grammar.States;
+import org.apache.directory.shared.kerberos.codec.KerberosMessageGrammar;
+
+
+/**
+ * This class store the Authenticator grammar's constants. It is also used for debugging
+ * purpose
+ * 
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public enum AuthenticatorStatesEnum implements States
+{
+    // Start
+    START_STATE,                                // 0
+    
+    // ----- AUTHENTICATOR message --------------------------------------
+    AUTHENTICATOR_STATE,                        // 1
+    AUTHENTICATOR_SEQ_STATE,                    // 2
+    
+    AUTHENTICATOR_AUTHENTICATOR_VNO_TAG_STATE,  // 3
+    AUTHENTICATOR_AUTHENTICATOR_VNO_STATE,      // 4
+    
+    AUTHENTICATOR_CREALM_TAG_STATE,             // 5
+    AUTHENTICATOR_CREALM_STATE,                 // 6
+
+    AUTHENTICATOR_CNAME_STATE,                  // 7
+    
+    AUTHENTICATOR_CKSUM_STATE,                  // 8
+
+    AUTHENTICATOR_CUSEC_TAG_STATE,              // 9
+    AUTHENTICATOR_CUSEC_STATE,                  // 10
+    
+    AUTHENTICATOR_CTIME_TAG_STATE,              // 11
+    AUTHENTICATOR_CTIME_STATE,                  // 12
+    
+    AUTHENTICATOR_SUBKEY_STATE,                 // 13
+
+    AUTHENTICATOR_SEQ_NUMBER_TAG_STATE,         // 14
+    AUTHENTICATOR_SEQ_NUMBER_STATE,             // 15
+    
+    AUTHENTICATOR_AUTHORIZATION_DATA_STATE,     // 16
+
+    // End
+    LAST_AUTHENTICATOR_STATE;                   // 17
+
+    
+    /**
+     * Get the grammar name
+     * 
+     * @param grammar The grammar code
+     * @return The grammar name
+     */
+    public String getGrammarName( int grammar )
+    {
+        return "AUTHENTICATOR_GRAMMAR";
+    }
+
+
+    /**
+     * Get the grammar name
+     * 
+     * @param grammar The grammar class
+     * @return The grammar name
+     */
+    public String getGrammarName( Grammar grammar )
+    {
+        if ( grammar instanceof KerberosMessageGrammar )
+        {
+            return "AUTHENTICATOR_GRAMMAR";
+        }
+        else
+        {
+            return "UNKNOWN GRAMMAR";
+        }
+    }
+
+
+    /**
+     * Get the string representing the state
+     * 
+     * @param state The state number
+     * @return The String representing the state
+     */
+    public String getState( int state )
+    {
+        return ( ( state == LAST_AUTHENTICATOR_STATE.ordinal() ) ? "AUTHENTICATOR_END_STATE" : name() );
+    }
+
+    
+    /**
+     * {@inheritDoc}
+     */
+    public boolean isEndState()
+    {
+        return this == LAST_AUTHENTICATOR_STATE;
+    }
+    
+    
+    /**
+     * {@inheritDoc}
+     */
+    public AuthenticatorStatesEnum getStartState()
+    {
+        return START_STATE;
+    }
+}

Added: directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/authenticator/actions/AuthenticatorInit.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/authenticator/actions/AuthenticatorInit.java?rev=1036962&view=auto
==============================================================================
--- directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/authenticator/actions/AuthenticatorInit.java (added)
+++ directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/authenticator/actions/AuthenticatorInit.java Fri Nov 19 18:03:51 2010
@@ -0,0 +1,83 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *  
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *  
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License. 
+ *  
+ */
+package org.apache.directory.shared.kerberos.codec.authenticator.actions;
+
+
+import org.apache.directory.shared.asn1.ber.Asn1Container;
+import org.apache.directory.shared.asn1.ber.grammar.GrammarAction;
+import org.apache.directory.shared.asn1.ber.tlv.TLV;
+import org.apache.directory.shared.asn1.codec.DecoderException;
+import org.apache.directory.shared.i18n.I18n;
+import org.apache.directory.shared.kerberos.codec.authenticator.AuthenticatorContainer;
+import org.apache.directory.shared.kerberos.messages.Authenticator;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+/**
+ * The action used to initialize the Authenticator object
+ * 
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public class AuthenticatorInit extends GrammarAction
+{
+    /** The logger */
+    private static final Logger LOG = LoggerFactory.getLogger( AuthenticatorInit.class );
+
+    /** Speedup for logs */
+    private static final boolean IS_DEBUG = LOG.isDebugEnabled();
+
+
+    /**
+     * Instantiates a new AuthenticatorInit action.
+     */
+    public AuthenticatorInit()
+    {
+        super( "Creates a Authenticator instance" );
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public void action( Asn1Container container ) throws DecoderException
+    {
+        AuthenticatorContainer authenticatorContainer = ( AuthenticatorContainer ) container;
+
+        TLV tlv = authenticatorContainer.getCurrentTLV();
+
+        // The Length should not be null
+        if ( tlv.getLength() == 0 )
+        {
+            LOG.error( I18n.err( I18n.ERR_04066 ) );
+
+            // This will generate a PROTOCOL_ERROR
+            throw new DecoderException( I18n.err( I18n.ERR_04067 ) );
+        }
+        
+        Authenticator authenticator = new Authenticator();
+        authenticatorContainer.setAuthenticator( authenticator );
+        
+        if ( IS_DEBUG )
+        {
+            LOG.debug( "Authenticator created" );
+        }
+    }
+}

Added: directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/authenticator/actions/StoreAuthenticatorVno.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/authenticator/actions/StoreAuthenticatorVno.java?rev=1036962&view=auto
==============================================================================
--- directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/authenticator/actions/StoreAuthenticatorVno.java (added)
+++ directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/authenticator/actions/StoreAuthenticatorVno.java Fri Nov 19 18:03:51 2010
@@ -0,0 +1,54 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *  
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *  
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License. 
+ *  
+ */
+package org.apache.directory.shared.kerberos.codec.authenticator.actions;
+
+
+import org.apache.directory.shared.asn1.ber.Asn1Container;
+import org.apache.directory.shared.kerberos.codec.actions.AbstractReadPvno;
+import org.apache.directory.shared.kerberos.codec.authenticator.AuthenticatorContainer;
+
+
+/**
+ * The action used to store the AuthenticatorVno
+ * 
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public class StoreAuthenticatorVno extends AbstractReadPvno
+{
+
+    /**
+     * Instantiates a new StoreAuthenticatorVno action.
+     */
+    public StoreAuthenticatorVno()
+    {
+        super( "Authenticator vno" );
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    protected void setPvno( int pvno, Asn1Container container )
+    {
+        AuthenticatorContainer authenticatorContainer = ( AuthenticatorContainer ) container;
+        authenticatorContainer.getAuthenticator().setProtocolVersionNumber( pvno );
+    }
+}

Added: directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/authenticator/actions/StoreAuthorizationData.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/authenticator/actions/StoreAuthorizationData.java?rev=1036962&view=auto
==============================================================================
--- directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/authenticator/actions/StoreAuthorizationData.java (added)
+++ directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/authenticator/actions/StoreAuthorizationData.java Fri Nov 19 18:03:51 2010
@@ -0,0 +1,55 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *  
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *  
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License. 
+ *  
+ */
+package org.apache.directory.shared.kerberos.codec.authenticator.actions;
+
+
+import org.apache.directory.shared.asn1.ber.Asn1Container;
+import org.apache.directory.shared.kerberos.codec.actions.AbstractReadAuthorizationData;
+import org.apache.directory.shared.kerberos.codec.authenticator.AuthenticatorContainer;
+import org.apache.directory.shared.kerberos.components.AuthorizationData;
+
+
+/**
+ * The action used to set the Authenticator authorization-data
+ * 
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public class StoreAuthorizationData extends AbstractReadAuthorizationData
+{
+
+    /**
+     * Instantiates a new StoreAuthorizationData action.
+     */
+    public StoreAuthorizationData()
+    {
+        super( "Authenticator authorization-data" );
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    protected void setAuthorizationData( AuthorizationData authorizationData, Asn1Container container )
+    {
+        AuthenticatorContainer authenticatorContainer = ( AuthenticatorContainer ) container;
+        authenticatorContainer.getAuthenticator().setAuthorizationData( authorizationData );
+    }
+}

Added: directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/authenticator/actions/StoreCName.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/authenticator/actions/StoreCName.java?rev=1036962&view=auto
==============================================================================
--- directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/authenticator/actions/StoreCName.java (added)
+++ directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/authenticator/actions/StoreCName.java Fri Nov 19 18:03:51 2010
@@ -0,0 +1,55 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *  
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *  
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License. 
+ *  
+ */
+package org.apache.directory.shared.kerberos.codec.authenticator.actions;
+
+
+import org.apache.directory.shared.asn1.ber.Asn1Container;
+import org.apache.directory.shared.kerberos.codec.actions.AbstractReadPrincipalName;
+import org.apache.directory.shared.kerberos.codec.authenticator.AuthenticatorContainer;
+import org.apache.directory.shared.kerberos.components.PrincipalName;
+
+
+/**
+ * The action used to set the Authenticator cName
+ * 
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public class StoreCName extends AbstractReadPrincipalName
+{
+
+    /**
+     * Instantiates a new StoreCName action.
+     */
+    public StoreCName()
+    {
+        super( "Authenticator cname" );
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    protected void setPrincipalName( PrincipalName principalName, Asn1Container container )
+    {
+        AuthenticatorContainer authenticatorContainer = ( AuthenticatorContainer ) container;
+        authenticatorContainer.getAuthenticator().setCName( principalName );
+    }
+}

Added: directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/authenticator/actions/StoreCRealm.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/authenticator/actions/StoreCRealm.java?rev=1036962&view=auto
==============================================================================
--- directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/authenticator/actions/StoreCRealm.java (added)
+++ directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/authenticator/actions/StoreCRealm.java Fri Nov 19 18:03:51 2010
@@ -0,0 +1,54 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *  
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *  
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License. 
+ *  
+ */
+package org.apache.directory.shared.kerberos.codec.authenticator.actions;
+
+
+import org.apache.directory.shared.asn1.ber.Asn1Container;
+import org.apache.directory.shared.kerberos.codec.actions.AbstractReadRealm;
+import org.apache.directory.shared.kerberos.codec.authenticator.AuthenticatorContainer;
+
+
+/**
+ * The action used to set the cRealm
+ * 
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public class StoreCRealm extends AbstractReadRealm
+{
+
+    /**
+     * Instantiates a new StoreCRealm action.
+     */
+    public StoreCRealm()
+    {
+        super( "Authenticator crealm value" );
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    protected void setRealm( String realm, Asn1Container container )
+    {
+        AuthenticatorContainer authenticatorContainer = ( AuthenticatorContainer ) container;
+        authenticatorContainer.getAuthenticator().setCRealm( realm );
+    }
+}

Added: directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/authenticator/actions/StoreChecksum.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/authenticator/actions/StoreChecksum.java?rev=1036962&view=auto
==============================================================================
--- directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/authenticator/actions/StoreChecksum.java (added)
+++ directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/authenticator/actions/StoreChecksum.java Fri Nov 19 18:03:51 2010
@@ -0,0 +1,55 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *  
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *  
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License. 
+ *  
+ */
+package org.apache.directory.shared.kerberos.codec.authenticator.actions;
+
+
+import org.apache.directory.shared.asn1.ber.Asn1Container;
+import org.apache.directory.shared.kerberos.codec.actions.AbstractReadCheckSum;
+import org.apache.directory.shared.kerberos.codec.authenticator.AuthenticatorContainer;
+import org.apache.directory.shared.kerberos.components.Checksum;
+
+
+/**
+ * The action used to set the Authenticator cksum
+ * 
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public class StoreChecksum extends AbstractReadCheckSum
+{
+
+    /**
+     * Instantiates a new StoreChecksum action.
+     */
+    public StoreChecksum()
+    {
+        super( "Authenticator cksum" );
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    protected void setChecksum( Checksum checksum, Asn1Container container )
+    {
+        AuthenticatorContainer authenticatorContainer = ( AuthenticatorContainer ) container;
+        authenticatorContainer.getAuthenticator().setCksum( checksum );
+    }
+}

Added: directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/authenticator/actions/StoreCusec.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/authenticator/actions/StoreCusec.java?rev=1036962&view=auto
==============================================================================
--- directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/authenticator/actions/StoreCusec.java (added)
+++ directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/authenticator/actions/StoreCusec.java Fri Nov 19 18:03:51 2010
@@ -0,0 +1,54 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *  
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *  
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License. 
+ *  
+ */
+package org.apache.directory.shared.kerberos.codec.authenticator.actions;
+
+
+import org.apache.directory.shared.asn1.ber.Asn1Container;
+import org.apache.directory.shared.kerberos.codec.actions.AbstractReadInteger;
+import org.apache.directory.shared.kerberos.codec.authenticator.AuthenticatorContainer;
+
+
+/**
+ * The action used to store the cusec
+ * 
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public class StoreCusec extends AbstractReadInteger
+{
+
+    /**
+     * Instantiates a new StoreCusec action.
+     */
+    public StoreCusec()
+    {
+        super( "Authenticator cusec" );
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    protected void setIntegerValue( int value, Asn1Container container )
+    {
+        AuthenticatorContainer authenticatorContainer = ( AuthenticatorContainer ) container;
+        authenticatorContainer.getAuthenticator().setCusec( value );
+    }
+}

Added: directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/authenticator/actions/StoreSeqNumber.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/authenticator/actions/StoreSeqNumber.java?rev=1036962&view=auto
==============================================================================
--- directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/authenticator/actions/StoreSeqNumber.java (added)
+++ directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/authenticator/actions/StoreSeqNumber.java Fri Nov 19 18:03:51 2010
@@ -0,0 +1,54 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *  
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *  
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License. 
+ *  
+ */
+package org.apache.directory.shared.kerberos.codec.authenticator.actions;
+
+
+import org.apache.directory.shared.asn1.ber.Asn1Container;
+import org.apache.directory.shared.kerberos.codec.actions.AbstractReadInteger;
+import org.apache.directory.shared.kerberos.codec.authenticator.AuthenticatorContainer;
+
+
+/**
+ * The action used to store the seq-number
+ * 
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public class StoreSeqNumber extends AbstractReadInteger
+{
+
+    /**
+     * Instantiates a new StoreSeqNumber action.
+     */
+    public StoreSeqNumber()
+    {
+        super( "Authenticator seq-number" );
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    protected void setIntegerValue( int value, Asn1Container container )
+    {
+        AuthenticatorContainer authenticatorContainer = ( AuthenticatorContainer ) container;
+        authenticatorContainer.getAuthenticator().setSeqNumber( value );
+    }
+}

Added: directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/authenticator/actions/StoreSubKey.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/authenticator/actions/StoreSubKey.java?rev=1036962&view=auto
==============================================================================
--- directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/authenticator/actions/StoreSubKey.java (added)
+++ directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/authenticator/actions/StoreSubKey.java Fri Nov 19 18:03:51 2010
@@ -0,0 +1,55 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *  
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *  
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License. 
+ *  
+ */
+package org.apache.directory.shared.kerberos.codec.authenticator.actions;
+
+
+import org.apache.directory.shared.asn1.ber.Asn1Container;
+import org.apache.directory.shared.kerberos.codec.actions.AbstractReadEncryptionKey;
+import org.apache.directory.shared.kerberos.codec.authenticator.AuthenticatorContainer;
+import org.apache.directory.shared.kerberos.components.EncryptionKey;
+
+
+/**
+ * The action used to set the Authenticator subkey
+ * 
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public class StoreSubKey extends AbstractReadEncryptionKey
+{
+
+    /**
+     * Instantiates a new StoreEncryptionKey action.
+     */
+    public StoreSubKey()
+    {
+        super( "Authenticator subkey" );
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    protected void setEncryptionKey( EncryptionKey encryptionKey, Asn1Container container )
+    {
+        AuthenticatorContainer authenticatorContainer = ( AuthenticatorContainer ) container;
+        authenticatorContainer.getAuthenticator().setSubKey( encryptionKey );
+    }
+}

Modified: directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/messages/Authenticator.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/messages/Authenticator.java?rev=1036962&r1=1036961&r2=1036962&view=diff
==============================================================================
--- directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/messages/Authenticator.java (original)
+++ directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/messages/Authenticator.java Fri Nov 19 18:03:51 2010
@@ -160,7 +160,7 @@ public class Authenticator extends Kerbe
     /**
      * @return the cname
      */
-    public PrincipalName getCname()
+    public PrincipalName getCName()
     {
         return cname;
     }
@@ -169,7 +169,7 @@ public class Authenticator extends Kerbe
     /**
      * @param cname the cname to set
      */
-    public void setCname( PrincipalName cname )
+    public void setCName( PrincipalName cname )
     {
         this.cname = cname;
     }
@@ -178,7 +178,7 @@ public class Authenticator extends Kerbe
     /**
      * @return the crealm
      */
-    public String getCrealm()
+    public String getCRealm()
     {
         return crealm;
     }
@@ -187,7 +187,7 @@ public class Authenticator extends Kerbe
     /**
      * @param crealm the crealm to set
      */
-    public void setCrealm( String crealm )
+    public void setCRealm( String crealm )
     {
         this.crealm = crealm;
     }



Mime
View raw message