directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kayyag...@apache.org
Subject svn commit: r1041318 - in /directory/apacheds/branches/apacheds-kerberos-codec-2.0: kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/ protocol-changepw/src/test/java/org/apache/directory/server/changepw/protocol/
Date Thu, 02 Dec 2010 10:13:07 GMT
Author: kayyagari
Date: Thu Dec  2 10:13:07 2010
New Revision: 1041318

URL: http://svn.apache.org/viewvc?rev=1041318&view=rev
Log:
o changed the PrincipalStore interface to use the new PrincipalName class from kerberos-codec

Modified:
    directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/DirectoryPrincipalStore.java
    directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/MultiBaseSearch.java
    directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/PrincipalStore.java
    directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/SingleBaseSearch.java
    directory/apacheds/branches/apacheds-kerberos-codec-2.0/protocol-changepw/src/test/java/org/apache/directory/server/changepw/protocol/MapPrincipalStoreImpl.java

Modified: directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/DirectoryPrincipalStore.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/DirectoryPrincipalStore.java?rev=1041318&r1=1041317&r2=1041318&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/DirectoryPrincipalStore.java
(original)
+++ directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/DirectoryPrincipalStore.java
Thu Dec  2 10:13:07 2010
@@ -20,9 +20,8 @@
 package org.apache.directory.server.kerberos.shared.store;
 
 
-import javax.security.auth.kerberos.KerberosPrincipal;
-
 import org.apache.directory.server.core.DirectoryService;
+import org.apache.directory.shared.kerberos.components.PrincipalName;
 import org.apache.directory.shared.ldap.name.DN;
 
 
@@ -51,20 +50,20 @@ public class DirectoryPrincipalStore imp
     }
 
 
-    /* (non-Javadoc)
-     * @see org.apache.directory.server.kerberos.shared.store.PrincipalStore#changePassword(javax.security.auth.kerberos.KerberosPrincipal,
java.lang.String)
+    /**
+     * {@inheritDoc}
      */
-    public String changePassword( KerberosPrincipal principal, String newPassword ) throws
Exception
+    public String changePassword( PrincipalName principal, String newPassword ) throws Exception
     {
         SingleBaseSearch singleBaseSearch = new SingleBaseSearch( directoryService, searchBaseDn
);
         return singleBaseSearch.changePassword( principal, newPassword );
     }
 
 
-    /* (non-Javadoc)
-     * @see org.apache.directory.server.kerberos.shared.store.PrincipalStore#getPrincipal(javax.security.auth.kerberos.KerberosPrincipal)
+    /**
+     * {@inheritDoc}
      */
-    public PrincipalStoreEntry getPrincipal( KerberosPrincipal principal ) throws Exception
+    public PrincipalStoreEntry getPrincipal( PrincipalName principal ) throws Exception
     {
         SingleBaseSearch singleBaseSearch = new SingleBaseSearch( directoryService, searchBaseDn
);
         return singleBaseSearch.getPrincipal( principal );

Modified: directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/MultiBaseSearch.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/MultiBaseSearch.java?rev=1041318&r1=1041317&r2=1041318&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/MultiBaseSearch.java
(original)
+++ directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/MultiBaseSearch.java
Thu Dec  2 10:13:07 2010
@@ -24,7 +24,6 @@ package org.apache.directory.server.kerb
 import java.util.Map;
 
 import javax.naming.NamingException;
-import javax.security.auth.kerberos.KerberosPrincipal;
 
 import org.apache.directory.server.core.CoreSession;
 import org.apache.directory.server.core.DirectoryService;
@@ -35,6 +34,7 @@ import org.apache.directory.server.proto
 import org.apache.directory.server.protocol.shared.catalog.Catalog;
 import org.apache.directory.server.protocol.shared.catalog.GetCatalog;
 import org.apache.directory.server.protocol.shared.store.DirectoryServiceOperation;
+import org.apache.directory.shared.kerberos.components.PrincipalName;
 
 
 /**
@@ -67,7 +67,7 @@ class MultiBaseSearch implements Princip
     }
 
 
-    public PrincipalStoreEntry getPrincipal( KerberosPrincipal principal ) throws Exception
+    public PrincipalStoreEntry getPrincipal( PrincipalName principal ) throws Exception
     {
         try
         {
@@ -81,7 +81,7 @@ class MultiBaseSearch implements Princip
     }
 
 
-    public String changePassword( KerberosPrincipal principal, String newPassword ) throws
Exception
+    public String changePassword( PrincipalName principal, String newPassword ) throws Exception
     {
         try
         {

Modified: directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/PrincipalStore.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/PrincipalStore.java?rev=1041318&r1=1041317&r2=1041318&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/PrincipalStore.java
(original)
+++ directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/PrincipalStore.java
Thu Dec  2 10:13:07 2010
@@ -20,7 +20,8 @@
 package org.apache.directory.server.kerberos.shared.store;
 
 
-import javax.security.auth.kerberos.KerberosPrincipal;
+
+import org.apache.directory.shared.kerberos.components.PrincipalName;
 
 
 /**
@@ -39,7 +40,7 @@ public interface PrincipalStore
      * @return The name of the principal whose password is being changed.
      * @throws Exception
      */
-    public String changePassword( KerberosPrincipal principal, String newPassword ) throws
Exception;
+    public String changePassword( PrincipalName principal, String newPassword ) throws Exception;
 
 
     /**
@@ -49,5 +50,5 @@ public interface PrincipalStore
      * @return The {@link PrincipalStoreEntry} for the given Kerberos principal.
      * @throws Exception
      */
-    public PrincipalStoreEntry getPrincipal( KerberosPrincipal principal ) throws Exception;
+    public PrincipalStoreEntry getPrincipal( PrincipalName principal ) throws Exception;
 }

Modified: directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/SingleBaseSearch.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/SingleBaseSearch.java?rev=1041318&r1=1041317&r2=1041318&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/SingleBaseSearch.java
(original)
+++ directory/apacheds/branches/apacheds-kerberos-codec-2.0/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/SingleBaseSearch.java
Thu Dec  2 10:13:07 2010
@@ -20,7 +20,6 @@
 package org.apache.directory.server.kerberos.shared.store;
 
 
-import javax.security.auth.kerberos.KerberosPrincipal;
 
 import org.apache.directory.server.core.CoreSession;
 import org.apache.directory.server.core.DirectoryService;
@@ -28,6 +27,7 @@ import org.apache.directory.server.i18n.
 import org.apache.directory.server.kerberos.shared.store.operations.ChangePassword;
 import org.apache.directory.server.kerberos.shared.store.operations.GetPrincipal;
 import org.apache.directory.server.protocol.shared.ServiceConfigurationException;
+import org.apache.directory.shared.kerberos.components.PrincipalName;
 import org.apache.directory.shared.ldap.name.DN;
 
 
@@ -58,13 +58,13 @@ class SingleBaseSearch implements Princi
     }
 
 
-    public PrincipalStoreEntry getPrincipal( KerberosPrincipal principal ) throws Exception
+    public PrincipalStoreEntry getPrincipal( PrincipalName principal ) throws Exception
     {
         return ( PrincipalStoreEntry ) new GetPrincipal( principal ).execute( session, searchBaseDn
);
     }
 
 
-    public String changePassword( KerberosPrincipal principal, String newPassword ) throws
Exception
+    public String changePassword( PrincipalName principal, String newPassword ) throws Exception
     {
         return (String) new ChangePassword( principal, newPassword ).execute( session, searchBaseDn
);
     }

Modified: directory/apacheds/branches/apacheds-kerberos-codec-2.0/protocol-changepw/src/test/java/org/apache/directory/server/changepw/protocol/MapPrincipalStoreImpl.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-kerberos-codec-2.0/protocol-changepw/src/test/java/org/apache/directory/server/changepw/protocol/MapPrincipalStoreImpl.java?rev=1041318&r1=1041317&r2=1041318&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-kerberos-codec-2.0/protocol-changepw/src/test/java/org/apache/directory/server/changepw/protocol/MapPrincipalStoreImpl.java
(original)
+++ directory/apacheds/branches/apacheds-kerberos-codec-2.0/protocol-changepw/src/test/java/org/apache/directory/server/changepw/protocol/MapPrincipalStoreImpl.java
Thu Dec  2 10:13:07 2010
@@ -31,6 +31,7 @@ import org.apache.directory.server.kerbe
 import org.apache.directory.server.kerberos.shared.store.PrincipalStoreEntryModifier;
 import org.apache.directory.shared.kerberos.codec.types.EncryptionType;
 import org.apache.directory.shared.kerberos.components.EncryptionKey;
+import org.apache.directory.shared.kerberos.components.PrincipalName;
 
 
 /**
@@ -62,7 +63,7 @@ public class MapPrincipalStoreImpl imple
     }
 
 
-    public PrincipalStoreEntry getPrincipal( KerberosPrincipal principal ) throws Exception
+    public PrincipalStoreEntry getPrincipal( PrincipalName principal ) throws Exception
     {
         PrincipalStoreEntry entry = store.get( principal );
 
@@ -70,9 +71,9 @@ public class MapPrincipalStoreImpl imple
     }
 
 
-    public String changePassword( KerberosPrincipal principal, String newPassword ) throws
Exception
+    public String changePassword( PrincipalName principal, String newPassword ) throws Exception
     {
-        return principal.getName();
+        return principal.getNameString();
     }
 
 



Mime
View raw message