From 24e9797807a1cad684592ce47a75475752f8e2bb Mon Sep 17 00:00:00 2001 From: Likitha Shetty Date: Mon, 8 Jul 2013 15:35:29 +0530 Subject: [PATCH] CLOUDSTACK-3112. UserCredentials that is injected in AuthenticationHandler is not picked up --- .../com/cloud/bridge/auth/ec2/AuthenticationHandler.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/awsapi/src/com/cloud/bridge/auth/ec2/AuthenticationHandler.java b/awsapi/src/com/cloud/bridge/auth/ec2/AuthenticationHandler.java index 04060844697..41aacb32577 100644 --- a/awsapi/src/com/cloud/bridge/auth/ec2/AuthenticationHandler.java +++ b/awsapi/src/com/cloud/bridge/auth/ec2/AuthenticationHandler.java @@ -39,13 +39,13 @@ import org.w3c.dom.NodeList; import com.cloud.bridge.model.UserCredentialsVO; import com.cloud.bridge.persist.dao.UserCredentialsDao; +import com.cloud.bridge.persist.dao.UserCredentialsDaoImpl; import com.cloud.bridge.service.UserContext; import com.cloud.bridge.util.AuthenticationUtils; public class AuthenticationHandler implements Handler { protected final static Logger logger = Logger.getLogger(AuthenticationHandler.class); - @Inject protected UserCredentialsDao ucDao; private DocumentBuilderFactory dbf = null; protected HandlerDescription handlerDesc = new HandlerDescription( "EC2AuthenticationHandler" ); @@ -117,9 +117,7 @@ public class AuthenticationHandler implements Handler { logger.debug( "X509 cert's uniqueId: " + uniqueId ); // -> find the Cloud API key and the secret key from the cert's uniqueId - /* UserCredentialsDao credentialDao = new UserCredentialsDao(); - UserCredentials cloudKeys = credentialDao.getByCertUniqueId( uniqueId ); - */ + UserCredentialsDao ucDao = new UserCredentialsDaoImpl(); UserCredentialsVO cloudKeys = ucDao.getByCertUniqueId(uniqueId); if ( null == cloudKeys ) { logger.error( "Cert does not map to Cloud API keys: " + uniqueId );