Skip to content

Commit 05ef1b4

Browse files
authored
chore(protocol_tests): move auth to standalone plugin (#2090)
1 parent b19c94f commit 05ef1b4

File tree

5 files changed

+55
-55
lines changed

5 files changed

+55
-55
lines changed

protocol_tests/aws-ec2/EC2ProtocolClient.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -192,11 +192,6 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
192192
*/
193193
serviceId?: string;
194194

195-
/**
196-
* Default credentials provider; Not available in browser runtime
197-
*/
198-
credentialDefaultProvider?: (input: any) => __Provider<__Credentials>;
199-
200195
/**
201196
* The AWS region to which this client will send requests
202197
*/
@@ -212,6 +207,11 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
212207
*/
213208
logger?: __Logger;
214209

210+
/**
211+
* Default credentials provider; Not available in browser runtime.
212+
*/
213+
credentialDefaultProvider?: (input: any) => __Provider<__Credentials>;
214+
215215
/**
216216
* Fetch related hostname, signing name or signing region with given region.
217217
*/
@@ -228,18 +228,18 @@ export type EC2ProtocolClientConfig = Partial<__SmithyConfiguration<__HttpHandle
228228
ClientDefaults &
229229
RegionInputConfig &
230230
EndpointsInputConfig &
231-
AwsAuthInputConfig &
232231
RetryInputConfig &
233232
HostHeaderInputConfig &
233+
AwsAuthInputConfig &
234234
UserAgentInputConfig;
235235

236236
export type EC2ProtocolClientResolvedConfig = __SmithyResolvedConfiguration<__HttpHandlerOptions> &
237237
Required<ClientDefaults> &
238238
RegionResolvedConfig &
239239
EndpointsResolvedConfig &
240-
AwsAuthResolvedConfig &
241240
RetryResolvedConfig &
242241
HostHeaderResolvedConfig &
242+
AwsAuthResolvedConfig &
243243
UserAgentResolvedConfig;
244244

245245
/**
@@ -260,17 +260,17 @@ export class EC2ProtocolClient extends __Client<
260260
};
261261
let _config_1 = resolveRegionConfig(_config_0);
262262
let _config_2 = resolveEndpointsConfig(_config_1);
263-
let _config_3 = resolveAwsAuthConfig(_config_2);
264-
let _config_4 = resolveRetryConfig(_config_3);
265-
let _config_5 = resolveHostHeaderConfig(_config_4);
263+
let _config_3 = resolveRetryConfig(_config_2);
264+
let _config_4 = resolveHostHeaderConfig(_config_3);
265+
let _config_5 = resolveAwsAuthConfig(_config_4);
266266
let _config_6 = resolveUserAgentConfig(_config_5);
267267
super(_config_6);
268268
this.config = _config_6;
269-
this.middlewareStack.use(getAwsAuthPlugin(this.config));
270269
this.middlewareStack.use(getRetryPlugin(this.config));
271270
this.middlewareStack.use(getContentLengthPlugin(this.config));
272271
this.middlewareStack.use(getHostHeaderPlugin(this.config));
273272
this.middlewareStack.use(getLoggerPlugin(this.config));
273+
this.middlewareStack.use(getAwsAuthPlugin(this.config));
274274
this.middlewareStack.use(getUserAgentPlugin(this.config));
275275
}
276276

protocol_tests/aws-json/JsonProtocolClient.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -159,11 +159,6 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
159159
*/
160160
serviceId?: string;
161161

162-
/**
163-
* Default credentials provider; Not available in browser runtime
164-
*/
165-
credentialDefaultProvider?: (input: any) => __Provider<__Credentials>;
166-
167162
/**
168163
* The AWS region to which this client will send requests
169164
*/
@@ -179,6 +174,11 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
179174
*/
180175
logger?: __Logger;
181176

177+
/**
178+
* Default credentials provider; Not available in browser runtime.
179+
*/
180+
credentialDefaultProvider?: (input: any) => __Provider<__Credentials>;
181+
182182
/**
183183
* Fetch related hostname, signing name or signing region with given region.
184184
*/
@@ -195,18 +195,18 @@ export type JsonProtocolClientConfig = Partial<__SmithyConfiguration<__HttpHandl
195195
ClientDefaults &
196196
RegionInputConfig &
197197
EndpointsInputConfig &
198-
AwsAuthInputConfig &
199198
RetryInputConfig &
200199
HostHeaderInputConfig &
200+
AwsAuthInputConfig &
201201
UserAgentInputConfig;
202202

203203
export type JsonProtocolClientResolvedConfig = __SmithyResolvedConfiguration<__HttpHandlerOptions> &
204204
Required<ClientDefaults> &
205205
RegionResolvedConfig &
206206
EndpointsResolvedConfig &
207-
AwsAuthResolvedConfig &
208207
RetryResolvedConfig &
209208
HostHeaderResolvedConfig &
209+
AwsAuthResolvedConfig &
210210
UserAgentResolvedConfig;
211211

212212
export class JsonProtocolClient extends __Client<
@@ -224,17 +224,17 @@ export class JsonProtocolClient extends __Client<
224224
};
225225
let _config_1 = resolveRegionConfig(_config_0);
226226
let _config_2 = resolveEndpointsConfig(_config_1);
227-
let _config_3 = resolveAwsAuthConfig(_config_2);
228-
let _config_4 = resolveRetryConfig(_config_3);
229-
let _config_5 = resolveHostHeaderConfig(_config_4);
227+
let _config_3 = resolveRetryConfig(_config_2);
228+
let _config_4 = resolveHostHeaderConfig(_config_3);
229+
let _config_5 = resolveAwsAuthConfig(_config_4);
230230
let _config_6 = resolveUserAgentConfig(_config_5);
231231
super(_config_6);
232232
this.config = _config_6;
233-
this.middlewareStack.use(getAwsAuthPlugin(this.config));
234233
this.middlewareStack.use(getRetryPlugin(this.config));
235234
this.middlewareStack.use(getContentLengthPlugin(this.config));
236235
this.middlewareStack.use(getHostHeaderPlugin(this.config));
237236
this.middlewareStack.use(getLoggerPlugin(this.config));
237+
this.middlewareStack.use(getAwsAuthPlugin(this.config));
238238
this.middlewareStack.use(getUserAgentPlugin(this.config));
239239
}
240240

protocol_tests/aws-query/QueryProtocolClient.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -222,11 +222,6 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
222222
*/
223223
serviceId?: string;
224224

225-
/**
226-
* Default credentials provider; Not available in browser runtime
227-
*/
228-
credentialDefaultProvider?: (input: any) => __Provider<__Credentials>;
229-
230225
/**
231226
* The AWS region to which this client will send requests
232227
*/
@@ -242,6 +237,11 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
242237
*/
243238
logger?: __Logger;
244239

240+
/**
241+
* Default credentials provider; Not available in browser runtime.
242+
*/
243+
credentialDefaultProvider?: (input: any) => __Provider<__Credentials>;
244+
245245
/**
246246
* Fetch related hostname, signing name or signing region with given region.
247247
*/
@@ -258,18 +258,18 @@ export type QueryProtocolClientConfig = Partial<__SmithyConfiguration<__HttpHand
258258
ClientDefaults &
259259
RegionInputConfig &
260260
EndpointsInputConfig &
261-
AwsAuthInputConfig &
262261
RetryInputConfig &
263262
HostHeaderInputConfig &
263+
AwsAuthInputConfig &
264264
UserAgentInputConfig;
265265

266266
export type QueryProtocolClientResolvedConfig = __SmithyResolvedConfiguration<__HttpHandlerOptions> &
267267
Required<ClientDefaults> &
268268
RegionResolvedConfig &
269269
EndpointsResolvedConfig &
270-
AwsAuthResolvedConfig &
271270
RetryResolvedConfig &
272271
HostHeaderResolvedConfig &
272+
AwsAuthResolvedConfig &
273273
UserAgentResolvedConfig;
274274

275275
/**
@@ -290,17 +290,17 @@ export class QueryProtocolClient extends __Client<
290290
};
291291
let _config_1 = resolveRegionConfig(_config_0);
292292
let _config_2 = resolveEndpointsConfig(_config_1);
293-
let _config_3 = resolveAwsAuthConfig(_config_2);
294-
let _config_4 = resolveRetryConfig(_config_3);
295-
let _config_5 = resolveHostHeaderConfig(_config_4);
293+
let _config_3 = resolveRetryConfig(_config_2);
294+
let _config_4 = resolveHostHeaderConfig(_config_3);
295+
let _config_5 = resolveAwsAuthConfig(_config_4);
296296
let _config_6 = resolveUserAgentConfig(_config_5);
297297
super(_config_6);
298298
this.config = _config_6;
299-
this.middlewareStack.use(getAwsAuthPlugin(this.config));
300299
this.middlewareStack.use(getRetryPlugin(this.config));
301300
this.middlewareStack.use(getContentLengthPlugin(this.config));
302301
this.middlewareStack.use(getHostHeaderPlugin(this.config));
303302
this.middlewareStack.use(getLoggerPlugin(this.config));
303+
this.middlewareStack.use(getAwsAuthPlugin(this.config));
304304
this.middlewareStack.use(getUserAgentPlugin(this.config));
305305
}
306306

protocol_tests/aws-restjson/RestJsonProtocolClient.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -300,11 +300,6 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
300300
*/
301301
serviceId?: string;
302302

303-
/**
304-
* Default credentials provider; Not available in browser runtime
305-
*/
306-
credentialDefaultProvider?: (input: any) => __Provider<__Credentials>;
307-
308303
/**
309304
* The AWS region to which this client will send requests
310305
*/
@@ -320,6 +315,11 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
320315
*/
321316
logger?: __Logger;
322317

318+
/**
319+
* Default credentials provider; Not available in browser runtime.
320+
*/
321+
credentialDefaultProvider?: (input: any) => __Provider<__Credentials>;
322+
323323
/**
324324
* Fetch related hostname, signing name or signing region with given region.
325325
*/
@@ -336,18 +336,18 @@ export type RestJsonProtocolClientConfig = Partial<__SmithyConfiguration<__HttpH
336336
ClientDefaults &
337337
RegionInputConfig &
338338
EndpointsInputConfig &
339-
AwsAuthInputConfig &
340339
RetryInputConfig &
341340
HostHeaderInputConfig &
341+
AwsAuthInputConfig &
342342
UserAgentInputConfig;
343343

344344
export type RestJsonProtocolClientResolvedConfig = __SmithyResolvedConfiguration<__HttpHandlerOptions> &
345345
Required<ClientDefaults> &
346346
RegionResolvedConfig &
347347
EndpointsResolvedConfig &
348-
AwsAuthResolvedConfig &
349348
RetryResolvedConfig &
350349
HostHeaderResolvedConfig &
350+
AwsAuthResolvedConfig &
351351
UserAgentResolvedConfig;
352352

353353
/**
@@ -368,17 +368,17 @@ export class RestJsonProtocolClient extends __Client<
368368
};
369369
let _config_1 = resolveRegionConfig(_config_0);
370370
let _config_2 = resolveEndpointsConfig(_config_1);
371-
let _config_3 = resolveAwsAuthConfig(_config_2);
372-
let _config_4 = resolveRetryConfig(_config_3);
373-
let _config_5 = resolveHostHeaderConfig(_config_4);
371+
let _config_3 = resolveRetryConfig(_config_2);
372+
let _config_4 = resolveHostHeaderConfig(_config_3);
373+
let _config_5 = resolveAwsAuthConfig(_config_4);
374374
let _config_6 = resolveUserAgentConfig(_config_5);
375375
super(_config_6);
376376
this.config = _config_6;
377-
this.middlewareStack.use(getAwsAuthPlugin(this.config));
378377
this.middlewareStack.use(getRetryPlugin(this.config));
379378
this.middlewareStack.use(getContentLengthPlugin(this.config));
380379
this.middlewareStack.use(getHostHeaderPlugin(this.config));
381380
this.middlewareStack.use(getLoggerPlugin(this.config));
381+
this.middlewareStack.use(getAwsAuthPlugin(this.config));
382382
this.middlewareStack.use(getUserAgentPlugin(this.config));
383383
}
384384

protocol_tests/aws-restxml/RestXmlProtocolClient.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -333,11 +333,6 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
333333
*/
334334
serviceId?: string;
335335

336-
/**
337-
* Default credentials provider; Not available in browser runtime
338-
*/
339-
credentialDefaultProvider?: (input: any) => __Provider<__Credentials>;
340-
341336
/**
342337
* The AWS region to which this client will send requests
343338
*/
@@ -353,6 +348,11 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
353348
*/
354349
logger?: __Logger;
355350

351+
/**
352+
* Default credentials provider; Not available in browser runtime.
353+
*/
354+
credentialDefaultProvider?: (input: any) => __Provider<__Credentials>;
355+
356356
/**
357357
* Fetch related hostname, signing name or signing region with given region.
358358
*/
@@ -369,18 +369,18 @@ export type RestXmlProtocolClientConfig = Partial<__SmithyConfiguration<__HttpHa
369369
ClientDefaults &
370370
RegionInputConfig &
371371
EndpointsInputConfig &
372-
AwsAuthInputConfig &
373372
RetryInputConfig &
374373
HostHeaderInputConfig &
374+
AwsAuthInputConfig &
375375
UserAgentInputConfig;
376376

377377
export type RestXmlProtocolClientResolvedConfig = __SmithyResolvedConfiguration<__HttpHandlerOptions> &
378378
Required<ClientDefaults> &
379379
RegionResolvedConfig &
380380
EndpointsResolvedConfig &
381-
AwsAuthResolvedConfig &
382381
RetryResolvedConfig &
383382
HostHeaderResolvedConfig &
383+
AwsAuthResolvedConfig &
384384
UserAgentResolvedConfig;
385385

386386
/**
@@ -401,17 +401,17 @@ export class RestXmlProtocolClient extends __Client<
401401
};
402402
let _config_1 = resolveRegionConfig(_config_0);
403403
let _config_2 = resolveEndpointsConfig(_config_1);
404-
let _config_3 = resolveAwsAuthConfig(_config_2);
405-
let _config_4 = resolveRetryConfig(_config_3);
406-
let _config_5 = resolveHostHeaderConfig(_config_4);
404+
let _config_3 = resolveRetryConfig(_config_2);
405+
let _config_4 = resolveHostHeaderConfig(_config_3);
406+
let _config_5 = resolveAwsAuthConfig(_config_4);
407407
let _config_6 = resolveUserAgentConfig(_config_5);
408408
super(_config_6);
409409
this.config = _config_6;
410-
this.middlewareStack.use(getAwsAuthPlugin(this.config));
411410
this.middlewareStack.use(getRetryPlugin(this.config));
412411
this.middlewareStack.use(getContentLengthPlugin(this.config));
413412
this.middlewareStack.use(getHostHeaderPlugin(this.config));
414413
this.middlewareStack.use(getLoggerPlugin(this.config));
414+
this.middlewareStack.use(getAwsAuthPlugin(this.config));
415415
this.middlewareStack.use(getUserAgentPlugin(this.config));
416416
}
417417

0 commit comments

Comments
 (0)