Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(protocol_tests): move auth to standalone plugin #2090

Merged
merged 1 commit into from
Mar 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
22 changes: 11 additions & 11 deletions protocol_tests/aws-ec2/EC2ProtocolClient.ts
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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