diff --git a/src/auth.rs b/src/auth.rs index bcbfb1f8..e01748d5 100644 --- a/src/auth.rs +++ b/src/auth.rs @@ -100,6 +100,9 @@ pub struct OAuth { pub access_token: SecretString, pub token_type: String, pub scope: Vec, + pub expires_in: Option, + pub refresh_token: Option, + pub refresh_token_expires_in: Option, } /// The wire format of the OAuth struct. @@ -108,6 +111,9 @@ struct OAuthWire { access_token: String, token_type: String, scope: String, + expires_in: Option, + refresh_token: Option, + refresh_token_expires_in: Option, } impl From for OAuth { @@ -116,6 +122,9 @@ impl From for OAuth { access_token: SecretString::from(value.access_token), token_type: value.token_type, scope: value.scope.split(',').map(ToString::to_string).collect(), + expires_in: value.expires_in, + refresh_token: value.refresh_token.map(|t| SecretString::from(t)), + refresh_token_expires_in: value.refresh_token_expires_in, } } }