CLOUDSTACK-3112. UserCredentials that is injected in AuthenticationHandler is not picked up

This commit is contained in:
Likitha Shetty 2013-07-08 15:35:29 +05:30
parent 814630c542
commit 24e9797807
1 changed files with 2 additions and 4 deletions

View File

@ -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 );