Customer customer = customerDao.find(username);
if(customer == null) {
return null;
}
List<Role> roles = customer.getRoles();
Role role = roles.get(0);
return new User(customer.getLogin(), customer.getPassword(), customer.isActive(), true, true, true, getAuthorities(role.getRoleInt()));
}