@Override
public UserDetails loadUserByUsername(String email)
throws UsernameNotFoundException {
try{
Customer customer = userService.getCustomerByEmail(email);
if(customer==null) throw new EmptyResultDataAccessException(1);
CartUserDetails userDetails = new CartUserDetails();
userDetails.userId = customer.getId();
userDetails.salt = customer.getSalt();
userDetails.password = customer.getPassword();
userDetails.username = customer.getEmail();
userDetails.enabled = customer.getStatus()==1;
logger.debug("Found user email={}, enabled={}", email, userDetails.enabled);
return userDetails;