cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aprat...@apache.org
Subject git commit: updated refs/heads/master to 4d01ce8
Date Fri, 20 Sep 2013 12:12:06 GMT
Updated Branches:
  refs/heads/master 8e25c7ab4 -> 4d01ce8fc


Cleanup DefaultUserAuthenticator and removed masking _name variable


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/4d01ce8f
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/4d01ce8f
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/4d01ce8f

Branch: refs/heads/master
Commit: 4d01ce8fc766423d795955bd5784b56969ce11a8
Parents: 8e25c7a
Author: Darren Shepherd <darren.s.shepherd@gmail.com>
Authored: Fri Sep 20 17:38:49 2013 +0530
Committer: Abhinandan Prateek <aprateek@apache.org>
Committed: Fri Sep 20 17:40:00 2013 +0530

----------------------------------------------------------------------
 .../cloudstack/ldap/LdapAuthenticator.java      | 10 --------
 .../cloud/server/auth/MD5UserAuthenticator.java | 14 +---------
 .../server/auth/PlainTextUserAuthenticator.java | 15 -----------
 .../auth/SHA256SaltedUserAuthenticator.java     | 11 --------
 .../server/auth/DefaultUserAuthenticator.java   | 27 --------------------
 5 files changed, 1 insertion(+), 76 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4d01ce8f/plugins/user-authenticators/ldap/src/org/apache/cloudstack/ldap/LdapAuthenticator.java
----------------------------------------------------------------------
diff --git a/plugins/user-authenticators/ldap/src/org/apache/cloudstack/ldap/LdapAuthenticator.java
b/plugins/user-authenticators/ldap/src/org/apache/cloudstack/ldap/LdapAuthenticator.java
index e62a3d8..559a979 100644
--- a/plugins/user-authenticators/ldap/src/org/apache/cloudstack/ldap/LdapAuthenticator.java
+++ b/plugins/user-authenticators/ldap/src/org/apache/cloudstack/ldap/LdapAuthenticator.java
@@ -19,7 +19,6 @@ package org.apache.cloudstack.ldap;
 import java.util.Map;
 
 import javax.inject.Inject;
-import javax.naming.ConfigurationException;
 
 import org.apache.log4j.Logger;
 
@@ -48,15 +47,6 @@ public class LdapAuthenticator extends DefaultUserAuthenticator {
 	}
 
 	@Override
-	public boolean configure(String name, Map<String, Object> params) throws ConfigurationException
{
-		if (name == null) {
-			name = "LDAP";
-		}
-		super.configure(name, params);
-		return true;
-	}
-
-	@Override
 	public boolean authenticate(final String username, final String password,
 			final Long domainId, final Map<String, Object[]> requestParameters) {
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4d01ce8f/plugins/user-authenticators/md5/src/com/cloud/server/auth/MD5UserAuthenticator.java
----------------------------------------------------------------------
diff --git a/plugins/user-authenticators/md5/src/com/cloud/server/auth/MD5UserAuthenticator.java
b/plugins/user-authenticators/md5/src/com/cloud/server/auth/MD5UserAuthenticator.java
index e5b169f..63583af 100644
--- a/plugins/user-authenticators/md5/src/com/cloud/server/auth/MD5UserAuthenticator.java
+++ b/plugins/user-authenticators/md5/src/com/cloud/server/auth/MD5UserAuthenticator.java
@@ -22,12 +22,11 @@ import java.util.Map;
 
 import javax.ejb.Local;
 import javax.inject.Inject;
-import javax.naming.ConfigurationException;
 
 import org.apache.log4j.Logger;
+
 import com.cloud.user.UserAccount;
 import com.cloud.user.dao.UserAccountDao;
-
 import com.cloud.utils.exception.CloudRuntimeException;
 
 /**
@@ -59,17 +58,6 @@ public class MD5UserAuthenticator extends DefaultUserAuthenticator {
 		return true;
 	}
 
-	@Override
-	public boolean configure(String name, Map<String, Object> params)
-			throws ConfigurationException {
-	        if(name == null) {
-                     name = "MD5";
-                }
-		super.configure(name, params);
-		return true;
-	}
-
-	@Override
 	public String encode(String password) {
 		MessageDigest md5 = null;
 		try {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4d01ce8f/plugins/user-authenticators/plain-text/src/com/cloud/server/auth/PlainTextUserAuthenticator.java
----------------------------------------------------------------------
diff --git a/plugins/user-authenticators/plain-text/src/com/cloud/server/auth/PlainTextUserAuthenticator.java
b/plugins/user-authenticators/plain-text/src/com/cloud/server/auth/PlainTextUserAuthenticator.java
index f102275..849e82e 100644
--- a/plugins/user-authenticators/plain-text/src/com/cloud/server/auth/PlainTextUserAuthenticator.java
+++ b/plugins/user-authenticators/plain-text/src/com/cloud/server/auth/PlainTextUserAuthenticator.java
@@ -15,20 +15,15 @@
 
 package com.cloud.server.auth;
 
-import java.math.BigInteger;
-import java.security.MessageDigest;
-import java.security.NoSuchAlgorithmException;
 import java.util.Map;
 
 import javax.ejb.Local;
 import javax.inject.Inject;
-import javax.naming.ConfigurationException;
 
 import org.apache.log4j.Logger;
 
 import com.cloud.user.UserAccount;
 import com.cloud.user.dao.UserAccountDao;
-import com.cloud.utils.exception.CloudRuntimeException;
 
 
 @Local(value={UserAuthenticator.class})
@@ -56,16 +51,6 @@ public class PlainTextUserAuthenticator extends DefaultUserAuthenticator
{
 		return true;
 	}
 
-    @Override
-	public boolean configure(String name, Map<String, Object> params)
-			throws ConfigurationException {
-        if (name == null) {
-            name = "PLAINTEXT";
-        }
-		super.configure(name, params);
-		return true;
-	}
-
 	@Override
 	public String encode(String password) {
 		// Plaintext so no encoding at all

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4d01ce8f/plugins/user-authenticators/sha256salted/src/com/cloud/server/auth/SHA256SaltedUserAuthenticator.java
----------------------------------------------------------------------
diff --git a/plugins/user-authenticators/sha256salted/src/com/cloud/server/auth/SHA256SaltedUserAuthenticator.java
b/plugins/user-authenticators/sha256salted/src/com/cloud/server/auth/SHA256SaltedUserAuthenticator.java
index 91be922..3592ddc 100644
--- a/plugins/user-authenticators/sha256salted/src/com/cloud/server/auth/SHA256SaltedUserAuthenticator.java
+++ b/plugins/user-authenticators/sha256salted/src/com/cloud/server/auth/SHA256SaltedUserAuthenticator.java
@@ -24,7 +24,6 @@ import java.util.Map;
 
 import javax.ejb.Local;
 import javax.inject.Inject;
-import javax.naming.ConfigurationException;
 
 import org.apache.log4j.Logger;
 import org.bouncycastle.util.encoders.Base64;
@@ -42,16 +41,6 @@ public class SHA256SaltedUserAuthenticator extends DefaultUserAuthenticator
{
     private UserAccountDao _userAccountDao;
     private static final int s_saltlen = 32;
 
-    @Override
-    public boolean configure(String name, Map<String, Object> params)
-            throws ConfigurationException {
-        if (name == null) {
-            name = "SHA256SALT";
-        }
-        super.configure(name, params);
-        return true;
-    }
-
     /* (non-Javadoc)
      * @see com.cloud.server.auth.UserAuthenticator#authenticate(java.lang.String, java.lang.String,
java.lang.Long, java.util.Map)
      */

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4d01ce8f/server/src/com/cloud/server/auth/DefaultUserAuthenticator.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/server/auth/DefaultUserAuthenticator.java b/server/src/com/cloud/server/auth/DefaultUserAuthenticator.java
index 952f724..253b0ac 100644
--- a/server/src/com/cloud/server/auth/DefaultUserAuthenticator.java
+++ b/server/src/com/cloud/server/auth/DefaultUserAuthenticator.java
@@ -16,10 +16,7 @@
 // under the License.
 package com.cloud.server.auth;
 
-import java.util.Map;
-
 import javax.ejb.Local;
-import javax.naming.ConfigurationException;
 
 import com.cloud.utils.component.AdapterBase;
 
@@ -29,28 +26,4 @@ import com.cloud.utils.component.AdapterBase;
  */
 @Local(value={UserAuthenticator.class})
 public abstract class DefaultUserAuthenticator extends AdapterBase implements UserAuthenticator
{
-	private String _name = null;
-	
-	@Override
-	public boolean configure(String name, Map<String, Object> params)
-			throws ConfigurationException {
-		_name = name;
-		return true;
-	}
-
-	@Override
-	public String getName() {
-		return _name;
-	}
-
-	@Override
-	public boolean start() {
-		return true;
-	}
-
-	@Override
-	public boolean stop() {
-		return true;
-	}
-
 }


Mime
View raw message