@Override public Long findToken(String token) throws UserNotFoundException { Authentication authentication = authenticationRepository.findByToken(token); if (authentication == null) throw new UserNotFoundException(); return authentication.getIdUser(); }