From 85431c39bf191725910703f699fe95da595f6adf Mon Sep 17 00:00:00 2001 From: Alexander Tkachev Date: Fri, 26 Jul 2019 11:40:52 +0700 Subject: CLOUD: Change interaction with /refresh endpoint Refresh token is now passed as custom HTTP header, not in GET parameter, to prevent them being written into server logs. --- backends/cloud/basestorage.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'backends/cloud') diff --git a/backends/cloud/basestorage.cpp b/backends/cloud/basestorage.cpp index bb198120ff..ea54a97fd9 100644 --- a/backends/cloud/basestorage.cpp +++ b/backends/cloud/basestorage.cpp @@ -139,8 +139,9 @@ void BaseStorage::refreshAccessToken(BoolCallback callback, Networking::ErrorCal if (errorCallback == nullptr) errorCallback = getErrorPrintingCallback(); - Common::String url = Common::String::format("https://cloud.scummvm.org/%s/refresh?code=%s", cloudProvider().c_str(), _refreshToken.c_str()); + Common::String url = Common::String::format("https://cloud.scummvm.org/%s/refresh", cloudProvider().c_str()); Networking::CurlJsonRequest *request = new Networking::CurlJsonRequest(innerCallback, errorCallback, url); + request->addHeader("X-ScummVM-Refresh-Token: " + _refreshToken); addRequest(request); } -- cgit v1.2.3