blob: da9a376cd612d7df58fb61d7fecbb70fbc6fc498 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
use chrono::{DateTime, Utc};
use oauth2::AccessToken;
use serde::{Deserialize, Serialize};
use crate::auth::AuthError;
const XBOX_LIVE_AUTH: &str = "https://user.auth.xboxlive.com/user/authenticate";
#[derive(Debug, Serialize)]
#[serde(rename_all = "PascalCase")]
struct XboxLiveAuthRequestProperties<'a> {
auth_method: &'a str,
site_name: &'a str,
rps_ticket: &'a str
}
#[derive(Debug, Serialize)]
#[serde(rename_all = "PascalCase")]
struct XboxLiveAuthRequest<'a> {
properties: XboxLiveAuthRequestProperties<'a>,
relying_party: &'a str,
token_type: &'a str
}
#[derive(Debug, Deserialize)]
#[serde(rename_all = "PascalCase")]
struct XboxLiveAuthResponse {
token: String,
not_after: DateTime<Utc>
}
pub fn xbox_live_login(client: &reqwest::Client, access_token: &AccessToken) -> Result<(), AuthError> {
}
|