@GET
@Path("account")
@Produces(MediaType.APPLICATION_JSON)
public CustomerPojoResponse getCustomer() {
CustomerPojoResponse customerPojoResponse = new CustomerPojoResponse();
Authentication authentication = SecurityContextHolder.getContext().getAuthentication();
if (!(authentication instanceof AnonymousAuthenticationToken)) {
String currentCustomerName = authentication.getName();
if(StringUtils.isNotEmpty(currentCustomerName)){
CustomerPojo customerPojo = customerPojoService.getCustomerByLoginOrEmail(currentCustomerName);
customerPojoResponse.setCustomerPojo(customerPojo);
}
}
// TODO : ERROR