add some more debug logging around sending confirmations
This commit is contained in:
parent
352a892075
commit
2409fac47e
1 changed files with 17 additions and 4 deletions
|
@ -184,15 +184,28 @@ impl SteamGuardAccount {
|
||||||
pub success: bool,
|
pub success: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
let resp: SendConfirmationResponse = client.get("https://steamcommunity.com/mobileconf/ajaxop".parse::<Url>().unwrap())
|
let resp = client.get("https://steamcommunity.com/mobileconf/ajaxop".parse::<Url>().unwrap())
|
||||||
.header("X-Requested-With", "com.valvesoftware.android.steam.community")
|
.header("X-Requested-With", "com.valvesoftware.android.steam.community")
|
||||||
.header(USER_AGENT, "Mozilla/5.0 (Linux; U; Android 4.1.1; en-us; Google Nexus 4 - 4.1.1 - API 16 - 768x1280 Build/JRO03S) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30")
|
.header(USER_AGENT, "Mozilla/5.0 (Linux; U; Android 4.1.1; en-us; Google Nexus 4 - 4.1.1 - API 16 - 768x1280 Build/JRO03S) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30")
|
||||||
.header(COOKIE, cookies.cookies(&url).unwrap())
|
.header(COOKIE, cookies.cookies(&url).unwrap())
|
||||||
.query(&query_params)
|
.query(&query_params)
|
||||||
.send()?
|
.send()?;
|
||||||
.json()?;
|
|
||||||
|
trace!("send_confirmation_ajax() response: {:?}", &resp);
|
||||||
|
debug!(
|
||||||
|
"send_confirmation_ajax() response status code: {}",
|
||||||
|
&resp.status()
|
||||||
|
);
|
||||||
|
|
||||||
|
let raw = resp.text()?;
|
||||||
|
debug!("send_confirmation_ajax() response body: {:?}", &raw);
|
||||||
|
|
||||||
|
let body: SendConfirmationResponse = serde_json::from_str(raw.as_str())?;
|
||||||
|
|
||||||
|
if !body.success {
|
||||||
|
return Err(anyhow!("Server responded with failure."));
|
||||||
|
}
|
||||||
|
|
||||||
ensure!(resp.success);
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue