use steamkit_protos::steam::CAuthenticationPollAuthSessionStatusResponse;
#[derive(Clone, Debug, Default, PartialEq, Eq)]
pub struct AuthPollResult {
pub account_name: String,
pub refresh_token: String,
pub access_token: String,
pub new_guard_data: Option<String>,
}
impl AuthPollResult {
pub fn from_response(response: &CAuthenticationPollAuthSessionStatusResponse) -> Self {
AuthPollResult {
account_name: response.account_name.clone().unwrap_or_default(),
refresh_token: response.refresh_token.clone().unwrap_or_default(),
access_token: response.access_token.clone().unwrap_or_default(),
new_guard_data: response.new_guard_data.clone(),
}
}
}