// bergmark - june 1999 - telephony project

// DeclareIdentityTest is a little program to help test the changeover
// from the old hash code scheme to the new one from AT&T.  If one changes
// the password of "ted@att.com" in bind's db.userid2sec database, and if
// one is using the new Password.java, then ted@att.com should be able to
// authenticate himself using his password.

import cnrg.itx.ds.*;

public class DeclareIdentityTest {

   public static void main ( String[] args ) {
      DeclareIdentityTest me = new DeclareIdentityTest();
   }

   public DeclareIdentityTest() {
      try {
         DirectoryService ds = new DirectoryService();
         System.out.println("Got a directory service...");
         ds.declareIdentity(new UserID("ted@att.com"),
	    new Password("password"));
	 System.out.println("DeclareIdentityTest: Authentication succeeded.");
      } catch ( Exception e ) { System.out.println("Failed, because ..."
	 + e.toString() );
      }
   }
}
