diff --git a/src/proto.rs b/src/proto.rs index 2bacb44..f33226c 100644 --- a/src/proto.rs +++ b/src/proto.rs @@ -37,6 +37,7 @@ pub struct Agent { pub struct Property { pub name: String, pub value: String, + #[serde(skip_serializing_if = "Option::is_none")] pub signature: Option, } @@ -83,7 +84,9 @@ pub struct AuthenticateRequest { pub agent: Agent, pub username: String, pub password: String, + #[serde(skip_serializing_if = "Option::is_none")] pub clientToken: Option, + #[serde(skip_serializing_if = "Option::is_none")] pub requestUser: Option, } @@ -101,6 +104,7 @@ pub struct RefreshRequest { pub accessToken: String, pub clientToken: String, pub selectedProfile: Option, + #[serde(skip_serializing_if = "Option::is_none")] pub requestUser: Option, } @@ -109,12 +113,14 @@ pub struct RefreshResponse { pub accessToken: String, pub clientToken: String, pub selectedProfile: Profile, + #[serde(skip_serializing_if = "Option::is_none")] pub user: Option, } #[derive(Serialize, Deserialize, Debug)] pub struct ValidateRequest { pub accessToken: String, + #[serde(skip_serializing_if = "Option::is_none")] pub clientToken: Option, } @@ -145,6 +151,7 @@ pub struct AccessToken { pub accessToken: String, pub clientToken: String, pub selectedProfile: Profile, + #[serde(skip_serializing_if = "Option::is_none")] pub availableProfiles: Option>, }