verify_login.h 805 B

123456789101112131415161718192021222324
  1. // Copyright 2017 Citra Emulator Project
  2. // Licensed under GPLv2 or any later version
  3. // Refer to the license.txt file included.
  4. #pragma once
  5. #include <functional>
  6. #include <future>
  7. #include <string>
  8. namespace WebService {
  9. /**
  10. * Checks if username and token is valid
  11. * @param username Citra username to use for authentication.
  12. * @param token Citra token to use for authentication.
  13. * @param endpoint_url URL of the services.citra-emu.org endpoint.
  14. * @param func A function that gets exectued when the verification is finished
  15. * @returns Future with bool indicating whether the verification succeeded
  16. */
  17. std::future<bool> VerifyLogin(std::string& username, std::string& token,
  18. const std::string& endpoint_url, std::function<void()> func);
  19. } // namespace WebService