@@ -12,18 +12,20 @@ import {
12
12
} from "@aws-sdk/middleware-host-header" ;
13
13
import { getLoggerPlugin } from "@aws-sdk/middleware-logger" ;
14
14
import { getRecursionDetectionPlugin } from "@aws-sdk/middleware-recursion-detection" ;
15
+ import {
16
+ AwsAuthInputConfig ,
17
+ AwsAuthResolvedConfig ,
18
+ getAwsAuthPlugin ,
19
+ resolveAwsAuthConfig ,
20
+ } from "@aws-sdk/middleware-signing" ;
15
21
import {
16
22
getUserAgentPlugin ,
17
23
resolveUserAgentConfig ,
18
24
UserAgentInputConfig ,
19
25
UserAgentResolvedConfig ,
20
26
} from "@aws-sdk/middleware-user-agent" ;
27
+ import { Credentials as __Credentials } from "@aws-sdk/types" ;
21
28
import { RegionInputConfig , RegionResolvedConfig , resolveRegionConfig } from "@smithy/config-resolver" ;
22
- import {
23
- DefaultIdentityProviderConfig ,
24
- getHttpAuthSchemeEndpointRuleSetPlugin ,
25
- getHttpSigningPlugin ,
26
- } from "@smithy/core" ;
27
29
import { getContentLengthPlugin } from "@smithy/middleware-content-length" ;
28
30
import { EndpointInputConfig , EndpointResolvedConfig , resolveEndpointConfig } from "@smithy/middleware-endpoint" ;
29
31
import { getRetryPlugin , resolveRetryConfig , RetryInputConfig , RetryResolvedConfig } from "@smithy/middleware-retry" ;
@@ -35,7 +37,6 @@ import {
35
37
SmithyResolvedConfiguration as __SmithyResolvedConfiguration ,
36
38
} from "@smithy/smithy-client" ;
37
39
import {
38
- AwsCredentialIdentityProvider ,
39
40
BodyLengthCalculator as __BodyLengthCalculator ,
40
41
CheckOptionalClientConfig as __CheckOptionalClientConfig ,
41
42
ChecksumConstructor as __ChecksumConstructor ,
@@ -52,12 +53,6 @@ import {
52
53
UserAgent as __UserAgent ,
53
54
} from "@smithy/types" ;
54
55
55
- import {
56
- defaultDynamoDBHttpAuthSchemeParametersProvider ,
57
- HttpAuthSchemeInputConfig ,
58
- HttpAuthSchemeResolvedConfig ,
59
- resolveHttpAuthSchemeConfig ,
60
- } from "./auth/httpAuthSchemeProvider" ;
61
56
import {
62
57
BatchExecuteStatementCommandInput ,
63
58
BatchExecuteStatementCommandOutput ,
@@ -380,22 +375,28 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
380
375
useFipsEndpoint ?: boolean | __Provider < boolean > ;
381
376
382
377
/**
383
- * The provider populating default tracking information to be sent with `user-agent`, `x-amz-user-agent` header
378
+ * The AWS region to which this client will send requests
379
+ */
380
+ region ?: string | __Provider < string > ;
381
+
382
+ /**
383
+ * Default credentials provider; Not available in browser runtime.
384
384
* @internal
385
385
*/
386
- defaultUserAgentProvider ?: Provider < __UserAgent > ;
386
+ credentialDefaultProvider ?: ( input : any ) => __Provider < __Credentials > ;
387
387
388
388
/**
389
- * The AWS region to which this client will send requests
389
+ * The provider populating default tracking information to be sent with `user-agent`, `x-amz-user-agent` header
390
+ * @internal
390
391
*/
391
- region ?: string | __Provider < string > ;
392
+ defaultUserAgentProvider ?: Provider < __UserAgent > ;
392
393
393
394
/**
394
- * Default credentials provider; Not available in browser runtime.
395
- * @deprecated
395
+ * The provider which populates default for endpointDiscoveryEnabled configuration, if it's
396
+ * not passed during client creation.
396
397
* @internal
397
398
*/
398
- credentialDefaultProvider ?: ( input : any ) => AwsCredentialIdentityProvider ;
399
+ endpointDiscoveryEnabledProvider ?: __Provider < boolean | undefined > ;
399
400
400
401
/**
401
402
* Value for how many times a request will be made at most in case of retry.
@@ -423,13 +424,6 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
423
424
* The {@link @smithy/smithy-client#DefaultsMode } that will be used to determine how certain default configuration options are resolved in the SDK.
424
425
*/
425
426
defaultsMode ?: __DefaultsMode | __Provider < __DefaultsMode > ;
426
-
427
- /**
428
- * The provider which populates default for endpointDiscoveryEnabled configuration, if it's
429
- * not passed during client creation.
430
- * @internal
431
- */
432
- endpointDiscoveryEnabledProvider ?: __Provider < boolean | undefined > ;
433
427
}
434
428
435
429
/**
@@ -441,8 +435,8 @@ export type DynamoDBClientConfigType = Partial<__SmithyConfiguration<__HttpHandl
441
435
EndpointInputConfig < EndpointParameters > &
442
436
RetryInputConfig &
443
437
HostHeaderInputConfig &
438
+ AwsAuthInputConfig &
444
439
UserAgentInputConfig &
445
- HttpAuthSchemeInputConfig &
446
440
EndpointDiscoveryInputConfig &
447
441
ClientInputEndpointParameters ;
448
442
/**
@@ -462,8 +456,8 @@ export type DynamoDBClientResolvedConfigType = __SmithyResolvedConfiguration<__H
462
456
EndpointResolvedConfig < EndpointParameters > &
463
457
RetryResolvedConfig &
464
458
HostHeaderResolvedConfig &
459
+ AwsAuthResolvedConfig &
465
460
UserAgentResolvedConfig &
466
- HttpAuthSchemeResolvedConfig &
467
461
EndpointDiscoveryResolvedConfig &
468
462
ClientResolvedEndpointParameters ;
469
463
/**
@@ -504,26 +498,15 @@ export class DynamoDBClient extends __Client<
504
498
*/
505
499
readonly config : DynamoDBClientResolvedConfig ;
506
500
507
- private getDefaultHttpAuthSchemeParametersProvider ( ) {
508
- return defaultDynamoDBHttpAuthSchemeParametersProvider ;
509
- }
510
-
511
- private getIdentityProviderConfigProvider ( ) {
512
- return async ( config : DynamoDBClientResolvedConfig ) =>
513
- new DefaultIdentityProviderConfig ( {
514
- "aws.auth#sigv4" : config . credentials ,
515
- } ) ;
516
- }
517
-
518
501
constructor ( ...[ configuration ] : __CheckOptionalClientConfig < DynamoDBClientConfig > ) {
519
502
const _config_0 = __getRuntimeConfig ( configuration || { } ) ;
520
503
const _config_1 = resolveClientEndpointParameters ( _config_0 ) ;
521
504
const _config_2 = resolveRegionConfig ( _config_1 ) ;
522
505
const _config_3 = resolveEndpointConfig ( _config_2 ) ;
523
506
const _config_4 = resolveRetryConfig ( _config_3 ) ;
524
507
const _config_5 = resolveHostHeaderConfig ( _config_4 ) ;
525
- const _config_6 = resolveUserAgentConfig ( _config_5 ) ;
526
- const _config_7 = resolveHttpAuthSchemeConfig ( _config_6 ) ;
508
+ const _config_6 = resolveAwsAuthConfig ( _config_5 ) ;
509
+ const _config_7 = resolveUserAgentConfig ( _config_6 ) ;
527
510
const _config_8 = resolveEndpointDiscoveryConfig ( _config_7 , {
528
511
endpointDiscoveryCommandCtor : DescribeEndpointsCommand ,
529
512
} ) ;
@@ -535,14 +518,8 @@ export class DynamoDBClient extends __Client<
535
518
this . middlewareStack . use ( getHostHeaderPlugin ( this . config ) ) ;
536
519
this . middlewareStack . use ( getLoggerPlugin ( this . config ) ) ;
537
520
this . middlewareStack . use ( getRecursionDetectionPlugin ( this . config ) ) ;
521
+ this . middlewareStack . use ( getAwsAuthPlugin ( this . config ) ) ;
538
522
this . middlewareStack . use ( getUserAgentPlugin ( this . config ) ) ;
539
- this . middlewareStack . use (
540
- getHttpAuthSchemeEndpointRuleSetPlugin ( this . config , {
541
- httpAuthSchemeParametersProvider : this . getDefaultHttpAuthSchemeParametersProvider ( ) ,
542
- identityProviderConfigProvider : this . getIdentityProviderConfigProvider ( ) ,
543
- } )
544
- ) ;
545
- this . middlewareStack . use ( getHttpSigningPlugin ( this . config ) ) ;
546
523
}
547
524
548
525
/**
0 commit comments