Ejemplo n.º 1
0
 @Transactional
 @Override
 public String findToken(UserAuth userAuth) throws UserNotFoundException {
   Authentication userAuthentication =
       authenticationRepository.findByIdUser(userService.findByUserAuth(userAuth));
   if (userAuthentication == null) throw new UserNotFoundException();
   return userAuthentication.getToken();
 }