37class RestRemoteService :
42 endpointBaseUrl(endpoint),
43 proxySettings(proxySettings),
44 session(MIKTEX_SESSION()),
45 webSession(WebSession::Create(
nullptr))
57 std::pair<bool, MiKTeX::Packages::RepositoryInfo> TryGetRepositoryInfo(
const std::string& repositoryUrl)
override;
66 void SetAuthHeader(
const std::string& token)
68 webSession->SetCustomHeaders({ {
"Authorization",
"Bearer " + token} });
72 std::string MakeUrl(
const std::string& path,
const std::initializer_list<std::string>& query)
74 std::string url = endpointBaseUrl + path;
78 for (
const std::string& q : query)
90 std::string endpointBaseUrl;
96 std::shared_ptr<MiKTeX::Core::Session> session;
99 std::shared_ptr<WebSession> webSession;
105 std::chrono::time_point<std::chrono::system_clock> tokenNotValidAfter;