Fix a regression issue orca couldn't login into BBL cloud (#13407)
* Add ticket-based OAuth flow for third-party login in HttpServer * Fix legacy plugin login
This commit is contained in:
@@ -2502,7 +2502,7 @@ std::map<std::string, std::string> GUI_App::get_extra_header()
|
||||
std::map<std::string, std::string> extra_headers;
|
||||
extra_headers.insert(std::make_pair("X-BBL-Client-Type", "slicer"));
|
||||
extra_headers.insert(std::make_pair("X-BBL-Client-Name", SLIC3R_APP_NAME));
|
||||
extra_headers.insert(std::make_pair("X-BBL-Client-Version", VersionInfo::convert_full_version(SLIC3R_VERSION)));
|
||||
extra_headers.insert(std::make_pair("X-BBL-Client-Version", get_bbl_client_version()));
|
||||
#if defined(__WINDOWS__)
|
||||
#ifdef _M_X64
|
||||
extra_headers.insert(std::make_pair("X-BBL-OS-Type", "windows"));
|
||||
@@ -2524,6 +2524,16 @@ std::map<std::string, std::string> GUI_App::get_extra_header()
|
||||
return extra_headers;
|
||||
}
|
||||
|
||||
std::string GUI_App::get_bbl_client_version()
|
||||
{
|
||||
if (BBLNetworkPlugin::instance().get_get_my_token() == nullptr) {
|
||||
// Legacy Bambu plugin lacks bambu_network_get_my_token. Pin client
|
||||
// version so the auth server keeps using the ?access_token= redirect.
|
||||
return "01.10.01.50";
|
||||
}
|
||||
return VersionInfo::convert_full_version(SLIC3R_VERSION);
|
||||
}
|
||||
|
||||
//BBS
|
||||
void GUI_App::init_http_extra_header()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user