Fix errore URL rilevato da Luigi / Carmine
This commit is contained in:
@@ -541,7 +541,8 @@ namespace MConnectSDK
|
||||
{
|
||||
// parametri chiamata
|
||||
Uri callUri = new Uri(BaseUrl + "/oauth2/token");
|
||||
var payload = "{\"client_id\": \"test\"}";
|
||||
// encapsulo clientID
|
||||
var payload = "{\"client_id\": \"" + ClientID + "\"}";
|
||||
HttpContent callCont = new StringContent(payload, Encoding.UTF8, "application/json");
|
||||
|
||||
// controllo preliminare ping/cloud..
|
||||
@@ -573,7 +574,8 @@ namespace MConnectSDK
|
||||
{
|
||||
// parametri chiamata
|
||||
Uri callUri = new Uri(BaseUrl + "/oauth2/verification");
|
||||
var payload = "{\"client_id\": \"test\", \"device_code\": \"" + tokResp.device_code + "\"}";
|
||||
// !!! FARE fix hard coded !!!
|
||||
var payload = "{\"client_id\": \"" + ClientID + "\", \"device_code\": \"" + tokResp.device_code + "\"}";
|
||||
HttpContent callCont = new StringContent(payload, Encoding.UTF8, "application/json");
|
||||
// effettuo call effettiva
|
||||
var taskRes = Task.Run(() => Utils.postUriAsync(callUri, callCont));
|
||||
@@ -670,7 +672,7 @@ namespace MConnectSDK
|
||||
};
|
||||
}
|
||||
}
|
||||
catch(Exception exc)
|
||||
catch (Exception exc)
|
||||
{
|
||||
throw;
|
||||
}
|
||||
@@ -702,10 +704,10 @@ namespace MConnectSDK
|
||||
Result _currStatus = new Result();
|
||||
await Task.Run(() =>
|
||||
{
|
||||
// inizio con invio watchdog...
|
||||
setWatchdog();
|
||||
// init output
|
||||
_currStatus = preCheckStatus();
|
||||
// inizio con invio watchdog...
|
||||
setWatchdog();
|
||||
// init output
|
||||
_currStatus = preCheckStatus();
|
||||
reqStatus = _currStatus;
|
||||
});
|
||||
return _currStatus;
|
||||
@@ -1448,7 +1450,7 @@ namespace MConnectSDK
|
||||
UserImage = userImg
|
||||
};
|
||||
}
|
||||
else if(resp.statusCode==400 && callResult.IndexOf("Invalid password")>=0)
|
||||
else if (resp.statusCode == 400 && callResult.IndexOf("Invalid password") >= 0)
|
||||
{
|
||||
errore = new LoginErrorResult
|
||||
{
|
||||
|
||||
@@ -151,6 +151,12 @@
|
||||
<None Include="logs\.placeholder">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="mconnect.conf.production.yaml">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="mconnect.conf.staging.yaml">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="mconnect.conf.yaml">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
|
||||
Reference in New Issue
Block a user