Class ExternalUserService

java.lang.Object
app.YUP.service.ExternalUserService

@Service public class ExternalUserService extends Object
Service class for managing external users.
  • Constructor Details

    • ExternalUserService

      public ExternalUserService()
  • Method Details

    • createExternalUser

      public void createExternalUser(jakarta.servlet.http.HttpServletResponse response, ExternalProviderUser externalProviderUser)
      Creates a new external user or updates an existing one.
      Parameters:
      response - The HTTP response to set the JWT cookie.
      externalProviderUser - The external user details from the provider.
    • updateUser

      public void updateUser(ExternalUser externalUser, UserUpdateRequest userUpdateRequest)
    • getUserById

      public ExternalUser getUserById(String userId)
      Retrieves a user by their userId.
      Parameters:
      userId - The userId of the user to retrieve.
      Returns:
      The user with the given userId.
      Throws:
      ResourceNotFoundException - If the user is not found.
    • existsById

      public boolean existsById(String userId)
      Checks if a user exists by their userId.
      Parameters:
      userId - The userId of the user to check.
      Returns:
      True if the user exists, false otherwise.