Skip to content

Commit 6debe90

Browse files
committed
xal: Store XalAppParameters in TokenStore too
1 parent b8823d3 commit 6debe90

File tree

4 files changed

+8
-1
lines changed

4 files changed

+8
-1
lines changed

xal/src/authenticator.rs

+4
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,10 @@ impl XalAuthenticator {
142142
}
143143

144144
impl XalAuthenticator {
145+
pub fn app_params(&self) -> XalAppParameters {
146+
self.app_params.clone()
147+
}
148+
145149
pub fn client_params(&self) -> XalClientParameters {
146150
self.client_params.clone()
147151
}

xal/src/bin/auth-cli.rs

+1
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ When finished, paste the Redirect URL and hit [ENTER]"#,
129129
println!("Transfer token={:?}", transfer_token);
130130

131131
let ts = TokenStore {
132+
app_params: xal.app_params(),
132133
client_params: xal.client_params(),
133134
wl_token: wl_token_clone,
134135
sisu_tokens: auth_response,

xal/src/bin/auth-webview.rs

+1
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ async fn continue_auth(
6464
println!("Transfer token={:?}", transfer_token);
6565

6666
let ts = TokenStore {
67+
app_params: xal.app_params(),
6768
client_params: xal.client_params(),
6869
wl_token: wl_token_clone,
6970
sisu_tokens: auth_response,

xal/src/utils.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,13 @@ use std::fs;
44

55
use crate::authenticator::SpecialTokenResponse;
66
use crate::{
7-
app_params::XalClientParameters,
7+
app_params::{XalAppParameters, XalClientParameters},
88
models::response::{SisuAuthorizationResponse, XCloudTokenResponse, XSTSResponse},
99
};
1010

1111
#[derive(Serialize, Deserialize, Debug)]
1212
pub struct TokenStore {
13+
pub app_params: XalAppParameters,
1314
pub client_params: XalClientParameters,
1415
pub wl_token: SpecialTokenResponse,
1516
pub sisu_tokens: SisuAuthorizationResponse,

0 commit comments

Comments
 (0)