Skip to content

Commit

Permalink
chore(protocol_tests): move auth to standalone plugin (#2090)
Browse files Browse the repository at this point in the history
  • Loading branch information
trivikr committed Mar 1, 2021
1 parent b19c94f commit 05ef1b4
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 55 deletions.
22 changes: 11 additions & 11 deletions protocol_tests/aws-ec2/EC2ProtocolClient.ts
Expand Up @@ -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
*/
Expand All @@ -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.
*/
Expand All @@ -228,18 +228,18 @@ export type EC2ProtocolClientConfig = Partial<__SmithyConfiguration<__HttpHandle
ClientDefaults &
RegionInputConfig &
EndpointsInputConfig &
AwsAuthInputConfig &
RetryInputConfig &
HostHeaderInputConfig &
AwsAuthInputConfig &
UserAgentInputConfig;

export type EC2ProtocolClientResolvedConfig = __SmithyResolvedConfiguration<__HttpHandlerOptions> &
Required<ClientDefaults> &
RegionResolvedConfig &
EndpointsResolvedConfig &
AwsAuthResolvedConfig &
RetryResolvedConfig &
HostHeaderResolvedConfig &
AwsAuthResolvedConfig &
UserAgentResolvedConfig;

/**
Expand All @@ -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));
}

Expand Down
22 changes: 11 additions & 11 deletions protocol_tests/aws-json/JsonProtocolClient.ts
Expand Up @@ -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
*/
Expand All @@ -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.
*/
Expand All @@ -195,18 +195,18 @@ export type JsonProtocolClientConfig = Partial<__SmithyConfiguration<__HttpHandl
ClientDefaults &
RegionInputConfig &
EndpointsInputConfig &
AwsAuthInputConfig &
RetryInputConfig &
HostHeaderInputConfig &
AwsAuthInputConfig &
UserAgentInputConfig;

export type JsonProtocolClientResolvedConfig = __SmithyResolvedConfiguration<__HttpHandlerOptions> &
Required<ClientDefaults> &
RegionResolvedConfig &
EndpointsResolvedConfig &
AwsAuthResolvedConfig &
RetryResolvedConfig &
HostHeaderResolvedConfig &
AwsAuthResolvedConfig &
UserAgentResolvedConfig;

export class JsonProtocolClient extends __Client<
Expand All @@ -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));
}

Expand Down
22 changes: 11 additions & 11 deletions protocol_tests/aws-query/QueryProtocolClient.ts
Expand Up @@ -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
*/
Expand All @@ -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.
*/
Expand All @@ -258,18 +258,18 @@ export type QueryProtocolClientConfig = Partial<__SmithyConfiguration<__HttpHand
ClientDefaults &
RegionInputConfig &
EndpointsInputConfig &
AwsAuthInputConfig &
RetryInputConfig &
HostHeaderInputConfig &
AwsAuthInputConfig &
UserAgentInputConfig;

export type QueryProtocolClientResolvedConfig = __SmithyResolvedConfiguration<__HttpHandlerOptions> &
Required<ClientDefaults> &
RegionResolvedConfig &
EndpointsResolvedConfig &
AwsAuthResolvedConfig &
RetryResolvedConfig &
HostHeaderResolvedConfig &
AwsAuthResolvedConfig &
UserAgentResolvedConfig;

/**
Expand All @@ -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));
}

Expand Down
22 changes: 11 additions & 11 deletions protocol_tests/aws-restjson/RestJsonProtocolClient.ts
Expand Up @@ -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
*/
Expand All @@ -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.
*/
Expand All @@ -336,18 +336,18 @@ export type RestJsonProtocolClientConfig = Partial<__SmithyConfiguration<__HttpH
ClientDefaults &
RegionInputConfig &
EndpointsInputConfig &
AwsAuthInputConfig &
RetryInputConfig &
HostHeaderInputConfig &
AwsAuthInputConfig &
UserAgentInputConfig;

export type RestJsonProtocolClientResolvedConfig = __SmithyResolvedConfiguration<__HttpHandlerOptions> &
Required<ClientDefaults> &
RegionResolvedConfig &
EndpointsResolvedConfig &
AwsAuthResolvedConfig &
RetryResolvedConfig &
HostHeaderResolvedConfig &
AwsAuthResolvedConfig &
UserAgentResolvedConfig;

/**
Expand All @@ -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));
}

Expand Down
22 changes: 11 additions & 11 deletions protocol_tests/aws-restxml/RestXmlProtocolClient.ts
Expand Up @@ -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
*/
Expand All @@ -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.
*/
Expand All @@ -369,18 +369,18 @@ export type RestXmlProtocolClientConfig = Partial<__SmithyConfiguration<__HttpHa
ClientDefaults &
RegionInputConfig &
EndpointsInputConfig &
AwsAuthInputConfig &
RetryInputConfig &
HostHeaderInputConfig &
AwsAuthInputConfig &
UserAgentInputConfig;

export type RestXmlProtocolClientResolvedConfig = __SmithyResolvedConfiguration<__HttpHandlerOptions> &
Required<ClientDefaults> &
RegionResolvedConfig &
EndpointsResolvedConfig &
AwsAuthResolvedConfig &
RetryResolvedConfig &
HostHeaderResolvedConfig &
AwsAuthResolvedConfig &
UserAgentResolvedConfig;

/**
Expand All @@ -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));
}

Expand Down

0 comments on commit 05ef1b4

Please sign in to comment.