directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r179849 - /directory/protocol-providers/kerberos/trunk/src/java/org/apache/kerberos/sam/SamSubsystem.java /directory/protocol-providers/kerberos/trunk/src/java/org/apache/kerberos/sam/SamVerifier.java
Date Fri, 03 Jun 2005 18:33:42 GMT
Author: akarasulu
Date: Fri Jun  3 11:33:42 2005
New Revision: 179849

URL: http://svn.apache.org/viewcvs?rev=179849&view=rev
Log:
changes ...

 o Changed the SAM Subsystem's verifier interface so it can be started up
   after being setup appropriately.
 o Added code to SAM Subsystem to start up 3rd party verifiers.

Modified:
    directory/protocol-providers/kerberos/trunk/src/java/org/apache/kerberos/sam/SamSubsystem.java
    directory/protocol-providers/kerberos/trunk/src/java/org/apache/kerberos/sam/SamVerifier.java

Modified: directory/protocol-providers/kerberos/trunk/src/java/org/apache/kerberos/sam/SamSubsystem.java
URL: http://svn.apache.org/viewcvs/directory/protocol-providers/kerberos/trunk/src/java/org/apache/kerberos/sam/SamSubsystem.java?rev=179849&r1=179848&r2=179849&view=diff
==============================================================================
--- directory/protocol-providers/kerberos/trunk/src/java/org/apache/kerberos/sam/SamSubsystem.java
(original)
+++ directory/protocol-providers/kerberos/trunk/src/java/org/apache/kerberos/sam/SamSubsystem.java
Fri Jun  3 11:33:42 2005
@@ -40,7 +40,7 @@
     /** a map of verifiers so we do not need to create a new one every time */
     private static final HashMap verifiers = new HashMap();
 
-    /** a set of environment parameter */
+    /** a set of environment parameters */
     private static final Hashtable env = new Hashtable();
 
     /** the key integrity checker used by the subsystem for all sam types */
@@ -106,7 +106,11 @@
 
             verifier = ( SamVerifier ) c.newInstance();
 
+            verifier.setEnvironment( env );
+
             verifier.setIntegrityChecker( keyChecker );
+
+            verifier.startup();
 
             if ( ! verifier.getSamType().equals( entry.getSamType() ) )
             {

Modified: directory/protocol-providers/kerberos/trunk/src/java/org/apache/kerberos/sam/SamVerifier.java
URL: http://svn.apache.org/viewcvs/directory/protocol-providers/kerberos/trunk/src/java/org/apache/kerberos/sam/SamVerifier.java?rev=179849&r1=179848&r2=179849&view=diff
==============================================================================
--- directory/protocol-providers/kerberos/trunk/src/java/org/apache/kerberos/sam/SamVerifier.java
(original)
+++ directory/protocol-providers/kerberos/trunk/src/java/org/apache/kerberos/sam/SamVerifier.java
Fri Jun  3 11:33:42 2005
@@ -22,18 +22,42 @@
 
 import org.apache.kerberos.messages.value.SamType;
 
+import java.util.Hashtable;
+
 
 /**
  * Single-use Authentication Mechanism verifier (subsystem) interface.
+ * SamVerifiers are modules that can be configured and are dynamically
+ * loaded as needed.  Implementations have a few requirements and things
+ * implementors should know:
+ *
+ * <ul>
+ *   <li>A public default constructor is required,</li>
+ *   <li>after instantitation environment properties are supplied,</li>
+ *   <li>next the KeyIntegrityChecker is set for the verifier,</li>
+ *   <li>finally the verifier is started up by calling startup(),
+ *       incidentally this is where all initialization work should be
+ *       done using the environment properties supplied.
+ *   </li>
+ * </ul>
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$
  */
 public interface SamVerifier
 {
+    /** Starts one of many pluggable SAM type subsystem*/
+    void startup() throws SamException;
+
+    /** Shuts down one of many pluggable SAM type subsystem*/
+    void shutdown();
+
+    /** Sets the environment properties for a SamVerifier */
+    void setEnvironment( Hashtable env );
+
     /**
      * SamVerifiers require a KeyIntegrityChecker to calculate the integrity of
-     * a HOTP generated KerberosKey.  The Kerberos service exposes this interface
+     * a generated KerberosKey.  The Kerberos service exposes this interface
      * and supplies it to the verifier to check generated keys to conduct the
      * verification workflow.
      *



Mime
View raw message