@@ -141,7 +141,7 @@ impl ClientCredentials {
141
141
let request = match self {
142
142
ClientCredentials :: None { client_id } => request. form ( & RequestWithClientCredentials {
143
143
body : form,
144
- client_id,
144
+ client_id : Some ( client_id ) ,
145
145
client_secret : None ,
146
146
client_assertion : None ,
147
147
client_assertion_type : None ,
@@ -159,7 +159,7 @@ impl ClientCredentials {
159
159
. basic_auth ( username, Some ( password) )
160
160
. form ( & RequestWithClientCredentials {
161
161
body : form,
162
- client_id,
162
+ client_id : None ,
163
163
client_secret : None ,
164
164
client_assertion : None ,
165
165
client_assertion_type : None ,
@@ -171,7 +171,7 @@ impl ClientCredentials {
171
171
client_secret,
172
172
} => request. form ( & RequestWithClientCredentials {
173
173
body : form,
174
- client_id,
174
+ client_id : Some ( client_id ) ,
175
175
client_secret : Some ( client_secret) ,
176
176
client_assertion : None ,
177
177
client_assertion_type : None ,
@@ -195,7 +195,7 @@ impl ClientCredentials {
195
195
196
196
request. form ( & RequestWithClientCredentials {
197
197
body : form,
198
- client_id,
198
+ client_id : None ,
199
199
client_secret : None ,
200
200
client_assertion : Some ( jwt. as_str ( ) ) ,
201
201
client_assertion_type : Some ( JwtBearerClientAssertionType ) ,
@@ -228,7 +228,7 @@ impl ClientCredentials {
228
228
229
229
request. form ( & RequestWithClientCredentials {
230
230
body : form,
231
- client_id,
231
+ client_id : None ,
232
232
client_secret : None ,
233
233
client_assertion : Some ( client_assertion. as_str ( ) ) ,
234
234
client_assertion_type : Some ( JwtBearerClientAssertionType ) ,
@@ -260,7 +260,7 @@ impl ClientCredentials {
260
260
261
261
request. form ( & RequestWithClientCredentials {
262
262
body : form,
263
- client_id,
263
+ client_id : Some ( client_id ) ,
264
264
client_secret : Some ( client_secret. as_str ( ) ) ,
265
265
client_assertion : None ,
266
266
client_assertion_type : None ,
@@ -359,7 +359,8 @@ struct RequestWithClientCredentials<'a, T> {
359
359
#[ serde( flatten) ]
360
360
body : T ,
361
361
362
- client_id : & ' a str ,
362
+ #[ serde( skip_serializing_if = "Option::is_none" ) ]
363
+ client_id : Option < & ' a str > ,
363
364
#[ serde( skip_serializing_if = "Option::is_none" ) ]
364
365
client_secret : Option < & ' a str > ,
365
366
#[ serde( skip_serializing_if = "Option::is_none" ) ]
0 commit comments