Ejemplo n.º 1
0
  @Override
  public Long findToken(String token) throws UserNotFoundException {
    Authentication authentication = authenticationRepository.findByToken(token);

    if (authentication == null) throw new UserNotFoundException();

    return authentication.getIdUser();
  }