123124125126127128129130131132133
List<String> roles = new ArrayList<>(); for (Authority authority : user.getAuthorities()) { roles.add(authority.getName()); } return new ResponseEntity<>( new UserDTO( user.getLogin(), null, user.getFirstName(), user.getLastName(), user.getEmail(),