Skip to content

feat(experimentalIdentityAndAuth): revert release of services with customizations #5289

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

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion clients/client-api-gateway/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"@aws-sdk/middleware-logger": "*",
"@aws-sdk/middleware-recursion-detection": "*",
"@aws-sdk/middleware-sdk-api-gateway": "*",
"@aws-sdk/middleware-signing": "*",
"@aws-sdk/middleware-user-agent": "*",
"@aws-sdk/region-config-resolver": "*",
"@aws-sdk/types": "*",
Expand Down Expand Up @@ -55,7 +56,6 @@
"@smithy/util-defaults-mode-browser": "^2.0.24",
"@smithy/util-defaults-mode-node": "^2.0.32",
"@smithy/util-endpoints": "^1.0.8",
"@smithy/util-middleware": "^2.0.9",
"@smithy/util-retry": "^2.0.9",
"@smithy/util-stream": "^2.0.24",
"@smithy/util-utf8": "^2.0.2",
Expand Down
59 changes: 19 additions & 40 deletions clients/client-api-gateway/src/APIGatewayClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,20 @@ import {
import { getLoggerPlugin } from "@aws-sdk/middleware-logger";
import { getRecursionDetectionPlugin } from "@aws-sdk/middleware-recursion-detection";
import { getAcceptHeaderPlugin } from "@aws-sdk/middleware-sdk-api-gateway";
import {
AwsAuthInputConfig,
AwsAuthResolvedConfig,
getAwsAuthPlugin,
resolveAwsAuthConfig,
} from "@aws-sdk/middleware-signing";
import {
getUserAgentPlugin,
resolveUserAgentConfig,
UserAgentInputConfig,
UserAgentResolvedConfig,
} from "@aws-sdk/middleware-user-agent";
import { Credentials as __Credentials } from "@aws-sdk/types";
import { RegionInputConfig, RegionResolvedConfig, resolveRegionConfig } from "@smithy/config-resolver";
import {
DefaultIdentityProviderConfig,
getHttpAuthSchemeEndpointRuleSetPlugin,
getHttpSigningPlugin,
} from "@smithy/core";
import { getContentLengthPlugin } from "@smithy/middleware-content-length";
import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint";
import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry";
Expand All @@ -31,7 +33,6 @@ import {
SmithyResolvedConfiguration as __SmithyResolvedConfiguration,
} from "@smithy/smithy-client";
import {
AwsCredentialIdentityProvider,
BodyLengthCalculator as __BodyLengthCalculator,
CheckOptionalClientConfig as __CheckOptionalClientConfig,
ChecksumConstructor as __ChecksumConstructor,
Expand All @@ -48,12 +49,6 @@ import {
UserAgent as __UserAgent,
} from "@smithy/types";

import {
defaultAPIGatewayHttpAuthSchemeParametersProvider,
HttpAuthSchemeInputConfig,
HttpAuthSchemeResolvedConfig,
resolveHttpAuthSchemeConfig,
} from "./auth/httpAuthSchemeProvider";
import { CreateApiKeyCommandInput, CreateApiKeyCommandOutput } from "./commands/CreateApiKeyCommand";
import { CreateAuthorizerCommandInput, CreateAuthorizerCommandOutput } from "./commands/CreateAuthorizerCommand";
import {
Expand Down Expand Up @@ -629,23 +624,22 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
*/
useFipsEndpoint?: boolean | __Provider<boolean>;

/**
* The provider populating default tracking information to be sent with `user-agent`, `x-amz-user-agent` header
* @internal
*/
defaultUserAgentProvider?: Provider<__UserAgent>;

/**
* The AWS region to which this client will send requests
*/
region?: string | __Provider<string>;

/**
* Default credentials provider; Not available in browser runtime.
* @deprecated
* @internal
*/
credentialDefaultProvider?: (input: any) => AwsCredentialIdentityProvider;
credentialDefaultProvider?: (input: any) => __Provider<__Credentials>;

/**
* The provider populating default tracking information to be sent with `user-agent`, `x-amz-user-agent` header
* @internal
*/
defaultUserAgentProvider?: Provider<__UserAgent>;

/**
* Value for how many times a request will be made at most in case of retry.
Expand Down Expand Up @@ -684,8 +678,8 @@ export type APIGatewayClientConfigType = Partial<__SmithyConfiguration<__HttpHan
EndpointInputConfig<EndpointParameters> &
RetryInputConfig &
HostHeaderInputConfig &
AwsAuthInputConfig &
UserAgentInputConfig &
HttpAuthSchemeInputConfig &
ClientInputEndpointParameters;
/**
* @public
Expand All @@ -704,8 +698,8 @@ export type APIGatewayClientResolvedConfigType = __SmithyResolvedConfiguration<_
EndpointResolvedConfig<EndpointParameters> &
RetryResolvedConfig &
HostHeaderResolvedConfig &
AwsAuthResolvedConfig &
UserAgentResolvedConfig &
HttpAuthSchemeResolvedConfig &
ClientResolvedEndpointParameters;
/**
* @public
Expand Down Expand Up @@ -737,8 +731,8 @@ export class APIGatewayClient extends __Client<
const _config_3 = resolveEndpointConfig(_config_2);
const _config_4 = resolveRetryConfig(_config_3);
const _config_5 = resolveHostHeaderConfig(_config_4);
const _config_6 = resolveUserAgentConfig(_config_5);
const _config_7 = resolveHttpAuthSchemeConfig(_config_6);
const _config_6 = resolveAwsAuthConfig(_config_5);
const _config_7 = resolveUserAgentConfig(_config_6);
const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
super(_config_8);
this.config = _config_8;
Expand All @@ -748,14 +742,8 @@ export class APIGatewayClient extends __Client<
this.middlewareStack.use(getHostHeaderPlugin(this.config));
this.middlewareStack.use(getLoggerPlugin(this.config));
this.middlewareStack.use(getRecursionDetectionPlugin(this.config));
this.middlewareStack.use(getAwsAuthPlugin(this.config));
this.middlewareStack.use(getUserAgentPlugin(this.config));
this.middlewareStack.use(
getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {
httpAuthSchemeParametersProvider: this.getDefaultHttpAuthSchemeParametersProvider(),
identityProviderConfigProvider: this.getIdentityProviderConfigProvider(),
})
);
this.middlewareStack.use(getHttpSigningPlugin(this.config));
}

/**
Expand All @@ -766,13 +754,4 @@ export class APIGatewayClient extends __Client<
destroy(): void {
super.destroy();
}
private getDefaultHttpAuthSchemeParametersProvider() {
return defaultAPIGatewayHttpAuthSchemeParametersProvider;
}
private getIdentityProviderConfigProvider() {
return async (config: APIGatewayClientResolvedConfig) =>
new DefaultIdentityProviderConfig({
"aws.auth#sigv4": config.credentials,
});
}
}

This file was deleted.

137 changes: 0 additions & 137 deletions clients/client-api-gateway/src/auth/httpAuthSchemeProvider.ts

This file was deleted.

5 changes: 1 addition & 4 deletions clients/client-api-gateway/src/extensionConfiguration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,10 @@ import { AwsRegionExtensionConfiguration } from "@aws-sdk/types";
import { HttpHandlerExtensionConfiguration } from "@smithy/protocol-http";
import { DefaultExtensionConfiguration } from "@smithy/types";

import { HttpAuthExtensionConfiguration } from "./auth/httpAuthExtensionConfiguration";

/**
* @internal
*/
export interface APIGatewayExtensionConfiguration
extends HttpHandlerExtensionConfiguration,
DefaultExtensionConfiguration,
AwsRegionExtensionConfiguration,
HttpAuthExtensionConfiguration {}
AwsRegionExtensionConfiguration {}
Loading