directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r659705 - /directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authn/LdapPrincipal.java
Date Fri, 23 May 2008 23:07:03 GMT
Author: elecharny
Date: Fri May 23 16:07:02 2008
New Revision: 659705

URL: http://svn.apache.org/viewvc?rev=659705&view=rev
Log:
Reverted to the working version

Modified:
    directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authn/LdapPrincipal.java

Modified: directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authn/LdapPrincipal.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authn/LdapPrincipal.java?rev=659705&r1=659704&r2=659705&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authn/LdapPrincipal.java
(original)
+++ directory/apacheds/branches/bigbang/core/src/main/java/org/apache/directory/server/core/authn/LdapPrincipal.java
Fri May 23 16:07:02 2008
@@ -25,6 +25,7 @@
 
 import org.apache.directory.shared.ldap.constants.AuthenticationLevel;
 import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.shared.ldap.util.StringTools;
 
 
 /**
@@ -47,6 +48,11 @@
     /** the authentication level for this principal */
     private final AuthenticationLevel authenticationLevel;
     
+    /** The userPassword
+     * @todo security risk remove this immediately
+     */
+    private byte[] userPassword;
+
 
     /**
      * Creates a new LDAP/X500 principal without any group associations.  Keep
@@ -66,6 +72,7 @@
         }
         
         this.authenticationLevel = authenticationLevel;
+        this.userPassword = null;
     }
 
     /**
@@ -81,6 +88,7 @@
     {
         this.name = name;
         this.authenticationLevel = authenticationLevel;
+        this.userPassword = userPassword;
     }
 
 
@@ -92,6 +100,7 @@
     {
         name = new LdapDN();
         authenticationLevel = AuthenticationLevel.NONE;
+        userPassword = null;
     }
 
 
@@ -133,6 +142,18 @@
      */
     public String toString()
     {
-        return "['" + name.getUpName() + /*"', '" + StringTools.utf8ToString( userPassword
) +*/ "']'";
+        return "['" + name.getUpName() + "', '" + StringTools.utf8ToString( userPassword
) +"']'";
+    }
+
+
+    public byte[] getUserPassword()
+    {
+        return userPassword;
+    }
+
+
+    public void setUserPassword( byte[] userPassword )
+    {
+        this.userPassword = userPassword;
     }
 }



Mime
View raw message