CQ Hybris connector always adds to anonymous user cart instead of current logged in CQ user cart.
Hi Guys,
I am using CQ-Hyrbis connector version 5.6.2 ( cq-commerce-hybris-impl-5.6.2.jar ) and Hybris version is 5.0.4.
When ever I add any thing to cart it always add to anonymous user cart instead of current logged in CQ user cart.
I suspect there is some issue in BasicAuthHandler implemented in connector which is not authenticating users correctly and it always gets anonymous user session from Hybris.
Also authenticateUser method implementation is not calling any web service that actually authenticates user instead it just returns credentials.
public Map<String, String> authenticateUser(String username, String password) {
final Map<String, String> authData = new HashMap<String, String>();
authData.put(KEY_SESSION_USERNAME, username);
try {
authData.put(KEY_PASSWORD, crypto.protect(password));
} catch (CryptoException e) {
log.error("Could not encrypt password!");
return null;
}
return authData;
}
Appreciate if any one can give some pointers to fix the issue.
Thanks,
Madhav