From 05ef1b4910a769b83c42c13da024e5d1567696e1 Mon Sep 17 00:00:00 2001 From: Trivikram Kamat <16024985+trivikr@users.noreply.github.com> Date: Mon, 1 Mar 2021 14:27:57 -0800 Subject: [PATCH] chore(protocol_tests): move auth to standalone plugin (#2090) --- protocol_tests/aws-ec2/EC2ProtocolClient.ts | 22 +++++++++---------- protocol_tests/aws-json/JsonProtocolClient.ts | 22 +++++++++---------- .../aws-query/QueryProtocolClient.ts | 22 +++++++++---------- .../aws-restjson/RestJsonProtocolClient.ts | 22 +++++++++---------- .../aws-restxml/RestXmlProtocolClient.ts | 22 +++++++++---------- 5 files changed, 55 insertions(+), 55 deletions(-) diff --git a/protocol_tests/aws-ec2/EC2ProtocolClient.ts b/protocol_tests/aws-ec2/EC2ProtocolClient.ts index c9e631171052..4627fa3618b0 100644 --- a/protocol_tests/aws-ec2/EC2ProtocolClient.ts +++ b/protocol_tests/aws-ec2/EC2ProtocolClient.ts @@ -192,11 +192,6 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ serviceId?: string; - /** - * Default credentials provider; Not available in browser runtime - */ - credentialDefaultProvider?: (input: any) => __Provider<__Credentials>; - /** * The AWS region to which this client will send requests */ @@ -212,6 +207,11 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Default credentials provider; Not available in browser runtime. + */ + credentialDefaultProvider?: (input: any) => __Provider<__Credentials>; + /** * Fetch related hostname, signing name or signing region with given region. */ @@ -228,18 +228,18 @@ export type EC2ProtocolClientConfig = Partial<__SmithyConfiguration<__HttpHandle ClientDefaults & RegionInputConfig & EndpointsInputConfig & - AwsAuthInputConfig & RetryInputConfig & HostHeaderInputConfig & + AwsAuthInputConfig & UserAgentInputConfig; export type EC2ProtocolClientResolvedConfig = __SmithyResolvedConfiguration<__HttpHandlerOptions> & Required & RegionResolvedConfig & EndpointsResolvedConfig & - AwsAuthResolvedConfig & RetryResolvedConfig & HostHeaderResolvedConfig & + AwsAuthResolvedConfig & UserAgentResolvedConfig; /** @@ -260,17 +260,17 @@ export class EC2ProtocolClient extends __Client< }; let _config_1 = resolveRegionConfig(_config_0); let _config_2 = resolveEndpointsConfig(_config_1); - let _config_3 = resolveAwsAuthConfig(_config_2); - let _config_4 = resolveRetryConfig(_config_3); - let _config_5 = resolveHostHeaderConfig(_config_4); + let _config_3 = resolveRetryConfig(_config_2); + let _config_4 = resolveHostHeaderConfig(_config_3); + let _config_5 = resolveAwsAuthConfig(_config_4); let _config_6 = resolveUserAgentConfig(_config_5); super(_config_6); this.config = _config_6; - this.middlewareStack.use(getAwsAuthPlugin(this.config)); this.middlewareStack.use(getRetryPlugin(this.config)); this.middlewareStack.use(getContentLengthPlugin(this.config)); this.middlewareStack.use(getHostHeaderPlugin(this.config)); this.middlewareStack.use(getLoggerPlugin(this.config)); + this.middlewareStack.use(getAwsAuthPlugin(this.config)); this.middlewareStack.use(getUserAgentPlugin(this.config)); } diff --git a/protocol_tests/aws-json/JsonProtocolClient.ts b/protocol_tests/aws-json/JsonProtocolClient.ts index 1d1b98401b15..446d6496be7d 100644 --- a/protocol_tests/aws-json/JsonProtocolClient.ts +++ b/protocol_tests/aws-json/JsonProtocolClient.ts @@ -159,11 +159,6 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ serviceId?: string; - /** - * Default credentials provider; Not available in browser runtime - */ - credentialDefaultProvider?: (input: any) => __Provider<__Credentials>; - /** * The AWS region to which this client will send requests */ @@ -179,6 +174,11 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Default credentials provider; Not available in browser runtime. + */ + credentialDefaultProvider?: (input: any) => __Provider<__Credentials>; + /** * Fetch related hostname, signing name or signing region with given region. */ @@ -195,18 +195,18 @@ export type JsonProtocolClientConfig = Partial<__SmithyConfiguration<__HttpHandl ClientDefaults & RegionInputConfig & EndpointsInputConfig & - AwsAuthInputConfig & RetryInputConfig & HostHeaderInputConfig & + AwsAuthInputConfig & UserAgentInputConfig; export type JsonProtocolClientResolvedConfig = __SmithyResolvedConfiguration<__HttpHandlerOptions> & Required & RegionResolvedConfig & EndpointsResolvedConfig & - AwsAuthResolvedConfig & RetryResolvedConfig & HostHeaderResolvedConfig & + AwsAuthResolvedConfig & UserAgentResolvedConfig; export class JsonProtocolClient extends __Client< @@ -224,17 +224,17 @@ export class JsonProtocolClient extends __Client< }; let _config_1 = resolveRegionConfig(_config_0); let _config_2 = resolveEndpointsConfig(_config_1); - let _config_3 = resolveAwsAuthConfig(_config_2); - let _config_4 = resolveRetryConfig(_config_3); - let _config_5 = resolveHostHeaderConfig(_config_4); + let _config_3 = resolveRetryConfig(_config_2); + let _config_4 = resolveHostHeaderConfig(_config_3); + let _config_5 = resolveAwsAuthConfig(_config_4); let _config_6 = resolveUserAgentConfig(_config_5); super(_config_6); this.config = _config_6; - this.middlewareStack.use(getAwsAuthPlugin(this.config)); this.middlewareStack.use(getRetryPlugin(this.config)); this.middlewareStack.use(getContentLengthPlugin(this.config)); this.middlewareStack.use(getHostHeaderPlugin(this.config)); this.middlewareStack.use(getLoggerPlugin(this.config)); + this.middlewareStack.use(getAwsAuthPlugin(this.config)); this.middlewareStack.use(getUserAgentPlugin(this.config)); } diff --git a/protocol_tests/aws-query/QueryProtocolClient.ts b/protocol_tests/aws-query/QueryProtocolClient.ts index 7959a889f1c9..e6ad96f65bc0 100644 --- a/protocol_tests/aws-query/QueryProtocolClient.ts +++ b/protocol_tests/aws-query/QueryProtocolClient.ts @@ -222,11 +222,6 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ serviceId?: string; - /** - * Default credentials provider; Not available in browser runtime - */ - credentialDefaultProvider?: (input: any) => __Provider<__Credentials>; - /** * The AWS region to which this client will send requests */ @@ -242,6 +237,11 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Default credentials provider; Not available in browser runtime. + */ + credentialDefaultProvider?: (input: any) => __Provider<__Credentials>; + /** * Fetch related hostname, signing name or signing region with given region. */ @@ -258,18 +258,18 @@ export type QueryProtocolClientConfig = Partial<__SmithyConfiguration<__HttpHand ClientDefaults & RegionInputConfig & EndpointsInputConfig & - AwsAuthInputConfig & RetryInputConfig & HostHeaderInputConfig & + AwsAuthInputConfig & UserAgentInputConfig; export type QueryProtocolClientResolvedConfig = __SmithyResolvedConfiguration<__HttpHandlerOptions> & Required & RegionResolvedConfig & EndpointsResolvedConfig & - AwsAuthResolvedConfig & RetryResolvedConfig & HostHeaderResolvedConfig & + AwsAuthResolvedConfig & UserAgentResolvedConfig; /** @@ -290,17 +290,17 @@ export class QueryProtocolClient extends __Client< }; let _config_1 = resolveRegionConfig(_config_0); let _config_2 = resolveEndpointsConfig(_config_1); - let _config_3 = resolveAwsAuthConfig(_config_2); - let _config_4 = resolveRetryConfig(_config_3); - let _config_5 = resolveHostHeaderConfig(_config_4); + let _config_3 = resolveRetryConfig(_config_2); + let _config_4 = resolveHostHeaderConfig(_config_3); + let _config_5 = resolveAwsAuthConfig(_config_4); let _config_6 = resolveUserAgentConfig(_config_5); super(_config_6); this.config = _config_6; - this.middlewareStack.use(getAwsAuthPlugin(this.config)); this.middlewareStack.use(getRetryPlugin(this.config)); this.middlewareStack.use(getContentLengthPlugin(this.config)); this.middlewareStack.use(getHostHeaderPlugin(this.config)); this.middlewareStack.use(getLoggerPlugin(this.config)); + this.middlewareStack.use(getAwsAuthPlugin(this.config)); this.middlewareStack.use(getUserAgentPlugin(this.config)); } diff --git a/protocol_tests/aws-restjson/RestJsonProtocolClient.ts b/protocol_tests/aws-restjson/RestJsonProtocolClient.ts index a75aad774293..8020302d47b3 100644 --- a/protocol_tests/aws-restjson/RestJsonProtocolClient.ts +++ b/protocol_tests/aws-restjson/RestJsonProtocolClient.ts @@ -300,11 +300,6 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ serviceId?: string; - /** - * Default credentials provider; Not available in browser runtime - */ - credentialDefaultProvider?: (input: any) => __Provider<__Credentials>; - /** * The AWS region to which this client will send requests */ @@ -320,6 +315,11 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Default credentials provider; Not available in browser runtime. + */ + credentialDefaultProvider?: (input: any) => __Provider<__Credentials>; + /** * Fetch related hostname, signing name or signing region with given region. */ @@ -336,18 +336,18 @@ export type RestJsonProtocolClientConfig = Partial<__SmithyConfiguration<__HttpH ClientDefaults & RegionInputConfig & EndpointsInputConfig & - AwsAuthInputConfig & RetryInputConfig & HostHeaderInputConfig & + AwsAuthInputConfig & UserAgentInputConfig; export type RestJsonProtocolClientResolvedConfig = __SmithyResolvedConfiguration<__HttpHandlerOptions> & Required & RegionResolvedConfig & EndpointsResolvedConfig & - AwsAuthResolvedConfig & RetryResolvedConfig & HostHeaderResolvedConfig & + AwsAuthResolvedConfig & UserAgentResolvedConfig; /** @@ -368,17 +368,17 @@ export class RestJsonProtocolClient extends __Client< }; let _config_1 = resolveRegionConfig(_config_0); let _config_2 = resolveEndpointsConfig(_config_1); - let _config_3 = resolveAwsAuthConfig(_config_2); - let _config_4 = resolveRetryConfig(_config_3); - let _config_5 = resolveHostHeaderConfig(_config_4); + let _config_3 = resolveRetryConfig(_config_2); + let _config_4 = resolveHostHeaderConfig(_config_3); + let _config_5 = resolveAwsAuthConfig(_config_4); let _config_6 = resolveUserAgentConfig(_config_5); super(_config_6); this.config = _config_6; - this.middlewareStack.use(getAwsAuthPlugin(this.config)); this.middlewareStack.use(getRetryPlugin(this.config)); this.middlewareStack.use(getContentLengthPlugin(this.config)); this.middlewareStack.use(getHostHeaderPlugin(this.config)); this.middlewareStack.use(getLoggerPlugin(this.config)); + this.middlewareStack.use(getAwsAuthPlugin(this.config)); this.middlewareStack.use(getUserAgentPlugin(this.config)); } diff --git a/protocol_tests/aws-restxml/RestXmlProtocolClient.ts b/protocol_tests/aws-restxml/RestXmlProtocolClient.ts index d8f6b9e2480e..bf4c3d336633 100644 --- a/protocol_tests/aws-restxml/RestXmlProtocolClient.ts +++ b/protocol_tests/aws-restxml/RestXmlProtocolClient.ts @@ -333,11 +333,6 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ serviceId?: string; - /** - * Default credentials provider; Not available in browser runtime - */ - credentialDefaultProvider?: (input: any) => __Provider<__Credentials>; - /** * The AWS region to which this client will send requests */ @@ -353,6 +348,11 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__ */ logger?: __Logger; + /** + * Default credentials provider; Not available in browser runtime. + */ + credentialDefaultProvider?: (input: any) => __Provider<__Credentials>; + /** * Fetch related hostname, signing name or signing region with given region. */ @@ -369,18 +369,18 @@ export type RestXmlProtocolClientConfig = Partial<__SmithyConfiguration<__HttpHa ClientDefaults & RegionInputConfig & EndpointsInputConfig & - AwsAuthInputConfig & RetryInputConfig & HostHeaderInputConfig & + AwsAuthInputConfig & UserAgentInputConfig; export type RestXmlProtocolClientResolvedConfig = __SmithyResolvedConfiguration<__HttpHandlerOptions> & Required & RegionResolvedConfig & EndpointsResolvedConfig & - AwsAuthResolvedConfig & RetryResolvedConfig & HostHeaderResolvedConfig & + AwsAuthResolvedConfig & UserAgentResolvedConfig; /** @@ -401,17 +401,17 @@ export class RestXmlProtocolClient extends __Client< }; let _config_1 = resolveRegionConfig(_config_0); let _config_2 = resolveEndpointsConfig(_config_1); - let _config_3 = resolveAwsAuthConfig(_config_2); - let _config_4 = resolveRetryConfig(_config_3); - let _config_5 = resolveHostHeaderConfig(_config_4); + let _config_3 = resolveRetryConfig(_config_2); + let _config_4 = resolveHostHeaderConfig(_config_3); + let _config_5 = resolveAwsAuthConfig(_config_4); let _config_6 = resolveUserAgentConfig(_config_5); super(_config_6); this.config = _config_6; - this.middlewareStack.use(getAwsAuthPlugin(this.config)); this.middlewareStack.use(getRetryPlugin(this.config)); this.middlewareStack.use(getContentLengthPlugin(this.config)); this.middlewareStack.use(getHostHeaderPlugin(this.config)); this.middlewareStack.use(getLoggerPlugin(this.config)); + this.middlewareStack.use(getAwsAuthPlugin(this.config)); this.middlewareStack.use(getUserAgentPlugin(this.config)); }