add trace logging for finalize_authenticator
This commit is contained in:
parent
ad2cdd2a7e
commit
5cfdb84bc2
1 changed files with 8 additions and 3 deletions
|
@ -421,14 +421,18 @@ impl SteamApiClient {
|
||||||
"authenticator_time" => time_2fa.to_string(),
|
"authenticator_time" => time_2fa.to_string(),
|
||||||
};
|
};
|
||||||
|
|
||||||
let resp: SteamApiResponse<FinalizeAddAuthenticatorResponse> = self
|
let resp = self
|
||||||
.post(format!(
|
.post(format!(
|
||||||
"{}/ITwoFactorService/FinalizeAddAuthenticator/v0001",
|
"{}/ITwoFactorService/FinalizeAddAuthenticator/v0001",
|
||||||
STEAM_API_BASE.to_string()
|
STEAM_API_BASE.to_string()
|
||||||
))
|
))
|
||||||
.form(¶ms)
|
.form(¶ms)
|
||||||
.send()?
|
.send()?;
|
||||||
.json()?;
|
|
||||||
|
let text = resp.text()?;
|
||||||
|
trace!("raw finalize authenticator response: {}", text);
|
||||||
|
|
||||||
|
let resp: SteamApiResponse<FinalizeAddAuthenticatorResponse> = serde_json::from_str(text.as_str())?;
|
||||||
|
|
||||||
return Ok(resp.response);
|
return Ok(resp.response);
|
||||||
}
|
}
|
||||||
|
@ -549,6 +553,7 @@ impl AddAuthenticatorResponse {
|
||||||
#[derive(Debug, Clone, Deserialize)]
|
#[derive(Debug, Clone, Deserialize)]
|
||||||
pub struct FinalizeAddAuthenticatorResponse {
|
pub struct FinalizeAddAuthenticatorResponse {
|
||||||
pub status: i32,
|
pub status: i32,
|
||||||
|
#[serde(deserialize_with = "parse_json_string_as_number")]
|
||||||
pub server_time: u64,
|
pub server_time: u64,
|
||||||
pub want_more: bool,
|
pub want_more: bool,
|
||||||
pub success: bool,
|
pub success: bool,
|
||||||
|
|
Loading…
Reference in a new issue