@@ -8,18 +8,20 @@ import {
8
8
import { getLoggerPlugin } from "@aws-sdk/middleware-logger" ;
9
9
import { getRecursionDetectionPlugin } from "@aws-sdk/middleware-recursion-detection" ;
10
10
import { getAcceptHeaderPlugin } from "@aws-sdk/middleware-sdk-api-gateway" ;
11
+ import {
12
+ AwsAuthInputConfig ,
13
+ AwsAuthResolvedConfig ,
14
+ getAwsAuthPlugin ,
15
+ resolveAwsAuthConfig ,
16
+ } from "@aws-sdk/middleware-signing" ;
11
17
import {
12
18
getUserAgentPlugin ,
13
19
resolveUserAgentConfig ,
14
20
UserAgentInputConfig ,
15
21
UserAgentResolvedConfig ,
16
22
} from "@aws-sdk/middleware-user-agent" ;
23
+ import { Credentials as __Credentials } from "@aws-sdk/types" ;
17
24
import { RegionInputConfig , RegionResolvedConfig , resolveRegionConfig } from "@smithy/config-resolver" ;
18
- import {
19
- DefaultIdentityProviderConfig ,
20
- getHttpAuthSchemeEndpointRuleSetPlugin ,
21
- getHttpSigningPlugin ,
22
- } from "@smithy/core" ;
23
25
import { getContentLengthPlugin } from "@smithy/middleware-content-length" ;
24
26
import { EndpointInputConfig , EndpointResolvedConfig , resolveEndpointConfig } from "@smithy/middleware-endpoint" ;
25
27
import { getRetryPlugin , resolveRetryConfig , RetryInputConfig , RetryResolvedConfig } from "@smithy/middleware-retry" ;
@@ -31,7 +33,6 @@ import {
31
33
SmithyResolvedConfiguration as __SmithyResolvedConfiguration ,
32
34
} from "@smithy/smithy-client" ;
33
35
import {
34
- AwsCredentialIdentityProvider ,
35
36
BodyLengthCalculator as __BodyLengthCalculator ,
36
37
CheckOptionalClientConfig as __CheckOptionalClientConfig ,
37
38
ChecksumConstructor as __ChecksumConstructor ,
@@ -48,12 +49,6 @@ import {
48
49
UserAgent as __UserAgent ,
49
50
} from "@smithy/types" ;
50
51
51
- import {
52
- defaultAPIGatewayHttpAuthSchemeParametersProvider ,
53
- HttpAuthSchemeInputConfig ,
54
- HttpAuthSchemeResolvedConfig ,
55
- resolveHttpAuthSchemeConfig ,
56
- } from "./auth/httpAuthSchemeProvider" ;
57
52
import { CreateApiKeyCommandInput , CreateApiKeyCommandOutput } from "./commands/CreateApiKeyCommand" ;
58
53
import { CreateAuthorizerCommandInput , CreateAuthorizerCommandOutput } from "./commands/CreateAuthorizerCommand" ;
59
54
import {
@@ -629,23 +624,22 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
629
624
*/
630
625
useFipsEndpoint ?: boolean | __Provider < boolean > ;
631
626
632
- /**
633
- * The provider populating default tracking information to be sent with `user-agent`, `x-amz-user-agent` header
634
- * @internal
635
- */
636
- defaultUserAgentProvider ?: Provider < __UserAgent > ;
637
-
638
627
/**
639
628
* The AWS region to which this client will send requests
640
629
*/
641
630
region ?: string | __Provider < string > ;
642
631
643
632
/**
644
633
* Default credentials provider; Not available in browser runtime.
645
- * @deprecated
646
634
* @internal
647
635
*/
648
- credentialDefaultProvider ?: ( input : any ) => AwsCredentialIdentityProvider ;
636
+ credentialDefaultProvider ?: ( input : any ) => __Provider < __Credentials > ;
637
+
638
+ /**
639
+ * The provider populating default tracking information to be sent with `user-agent`, `x-amz-user-agent` header
640
+ * @internal
641
+ */
642
+ defaultUserAgentProvider ?: Provider < __UserAgent > ;
649
643
650
644
/**
651
645
* Value for how many times a request will be made at most in case of retry.
@@ -684,8 +678,8 @@ export type APIGatewayClientConfigType = Partial<__SmithyConfiguration<__HttpHan
684
678
EndpointInputConfig < EndpointParameters > &
685
679
RetryInputConfig &
686
680
HostHeaderInputConfig &
681
+ AwsAuthInputConfig &
687
682
UserAgentInputConfig &
688
- HttpAuthSchemeInputConfig &
689
683
ClientInputEndpointParameters ;
690
684
/**
691
685
* @public
@@ -704,8 +698,8 @@ export type APIGatewayClientResolvedConfigType = __SmithyResolvedConfiguration<_
704
698
EndpointResolvedConfig < EndpointParameters > &
705
699
RetryResolvedConfig &
706
700
HostHeaderResolvedConfig &
701
+ AwsAuthResolvedConfig &
707
702
UserAgentResolvedConfig &
708
- HttpAuthSchemeResolvedConfig &
709
703
ClientResolvedEndpointParameters ;
710
704
/**
711
705
* @public
@@ -737,8 +731,8 @@ export class APIGatewayClient extends __Client<
737
731
const _config_3 = resolveEndpointConfig ( _config_2 ) ;
738
732
const _config_4 = resolveRetryConfig ( _config_3 ) ;
739
733
const _config_5 = resolveHostHeaderConfig ( _config_4 ) ;
740
- const _config_6 = resolveUserAgentConfig ( _config_5 ) ;
741
- const _config_7 = resolveHttpAuthSchemeConfig ( _config_6 ) ;
734
+ const _config_6 = resolveAwsAuthConfig ( _config_5 ) ;
735
+ const _config_7 = resolveUserAgentConfig ( _config_6 ) ;
742
736
const _config_8 = resolveRuntimeExtensions ( _config_7 , configuration ?. extensions || [ ] ) ;
743
737
super ( _config_8 ) ;
744
738
this . config = _config_8 ;
@@ -748,14 +742,8 @@ export class APIGatewayClient extends __Client<
748
742
this . middlewareStack . use ( getHostHeaderPlugin ( this . config ) ) ;
749
743
this . middlewareStack . use ( getLoggerPlugin ( this . config ) ) ;
750
744
this . middlewareStack . use ( getRecursionDetectionPlugin ( this . config ) ) ;
745
+ this . middlewareStack . use ( getAwsAuthPlugin ( this . config ) ) ;
751
746
this . middlewareStack . use ( getUserAgentPlugin ( this . config ) ) ;
752
- this . middlewareStack . use (
753
- getHttpAuthSchemeEndpointRuleSetPlugin ( this . config , {
754
- httpAuthSchemeParametersProvider : this . getDefaultHttpAuthSchemeParametersProvider ( ) ,
755
- identityProviderConfigProvider : this . getIdentityProviderConfigProvider ( ) ,
756
- } )
757
- ) ;
758
- this . middlewareStack . use ( getHttpSigningPlugin ( this . config ) ) ;
759
747
}
760
748
761
749
/**
@@ -766,13 +754,4 @@ export class APIGatewayClient extends __Client<
766
754
destroy ( ) : void {
767
755
super . destroy ( ) ;
768
756
}
769
- private getDefaultHttpAuthSchemeParametersProvider ( ) {
770
- return defaultAPIGatewayHttpAuthSchemeParametersProvider ;
771
- }
772
- private getIdentityProviderConfigProvider ( ) {
773
- return async ( config : APIGatewayClientResolvedConfig ) =>
774
- new DefaultIdentityProviderConfig ( {
775
- "aws.auth#sigv4" : config . credentials ,
776
- } ) ;
777
- }
778
757
}
0 commit comments