Class UserService

java.lang.Object
com.omarigrant.budget.services.UserService

@Service public class UserService extends Object
A service for handling Users
  • Constructor Details

    • UserService

      public UserService()
  • Method Details

    • findUserFromJwtToken

      public User findUserFromJwtToken(org.springframework.security.oauth2.jwt.Jwt jwt)
      Return user from database using JWT token. Checks if user already exists by the oauth sub key, if not creates the user and returns it
      Parameters:
      jwt - OAuth2 JWT token
      Returns:
      User model
    • getAllBudgets

      public List<BudgetDTO> getAllBudgets(User user)
      Get all budgets associated with the user.
      Parameters:
      user - User model
      Returns:
      list of BudgetDTO models