1use steam_protos::{EAuthSessionGuardType, EAuthTokenPlatformType, ESessionPersistence};
4
5#[derive(Debug, Clone, Default)]
7pub struct LoginSessionOptions {
8 pub user_agent: Option<String>,
10 pub machine_id: Option<Vec<u8>>,
12 pub machine_friendly_name: Option<String>,
14}
15
16#[derive(Debug, Clone)]
18pub struct CredentialsDetails {
19 pub account_name: String,
21 pub password: String,
23 pub persistence: Option<ESessionPersistence>,
25 pub steam_guard_machine_token: Option<String>,
27 pub steam_guard_code: Option<String>,
29}
30
31#[derive(Debug, Clone)]
33pub struct StartSessionResponse {
34 pub action_required: bool,
36 pub valid_actions: Option<Vec<ValidAction>>,
38 pub qr_challenge_url: Option<String>,
40}
41
42#[derive(Debug, Clone)]
44pub struct ValidAction {
45 pub guard_type: EAuthSessionGuardType,
47 pub detail: Option<String>,
49}
50
51#[derive(Debug, Clone)]
53pub struct PollResult {
54 pub account_name: String,
56 pub refresh_token: String,
58 pub access_token: Option<String>,
60 pub new_guard_data: Option<String>,
62}
63
64#[derive(Debug, Clone)]
66pub struct ApproveAuthSessionRequest {
67 pub qr_challenge_url: String,
69 pub approve: bool,
71 pub persistence: Option<ESessionPersistence>,
73}
74
75#[derive(Debug, Clone)]
80pub struct StartAuthSessionResponse {
81 pub client_id: u64,
82 pub request_id: Vec<u8>,
83 pub poll_interval: f32,
84 pub allowed_confirmations: Vec<AllowedConfirmation>,
85 pub steam_id: Option<u64>,
86 pub weak_token: Option<String>,
87 pub challenge_url: Option<String>,
88 pub version: Option<i32>,
89}
90
91#[derive(Debug, Clone, PartialEq)]
93pub struct AllowedConfirmation {
94 pub confirmation_type: EAuthSessionGuardType,
95 pub message: Option<String>,
96}
97
98#[derive(Debug, Clone)]
100pub(crate) struct PlatformData {
101 pub website_id: String,
102 pub headers: std::collections::HashMap<String, String>,
103 pub device_details: DeviceDetails,
104}
105
106#[derive(Debug, Clone)]
108#[allow(dead_code)]
109pub(crate) struct DeviceDetails {
110 pub device_friendly_name: String,
111 pub platform_type: EAuthTokenPlatformType,
112 pub os_type: Option<i32>,
113 pub gaming_device_type: Option<u32>,
114 pub machine_id: Option<Vec<u8>>,
115}