@@ -7,20 +7,18 @@ import {
7
7
} from "@aws-sdk/middleware-host-header" ;
8
8
import { getLoggerPlugin } from "@aws-sdk/middleware-logger" ;
9
9
import { getRecursionDetectionPlugin } from "@aws-sdk/middleware-recursion-detection" ;
10
- import {
11
- AwsAuthInputConfig ,
12
- AwsAuthResolvedConfig ,
13
- getAwsAuthPlugin ,
14
- resolveAwsAuthConfig ,
15
- } from "@aws-sdk/middleware-signing" ;
16
10
import {
17
11
getUserAgentPlugin ,
18
12
resolveUserAgentConfig ,
19
13
UserAgentInputConfig ,
20
14
UserAgentResolvedConfig ,
21
15
} from "@aws-sdk/middleware-user-agent" ;
22
- import { Credentials as __Credentials } from "@aws-sdk/types" ;
23
16
import { RegionInputConfig , RegionResolvedConfig , resolveRegionConfig } from "@smithy/config-resolver" ;
17
+ import {
18
+ DefaultIdentityProviderConfig ,
19
+ getHttpAuthSchemeEndpointRuleSetPlugin ,
20
+ getHttpSigningPlugin ,
21
+ } from "@smithy/core" ;
24
22
import { getContentLengthPlugin } from "@smithy/middleware-content-length" ;
25
23
import { EndpointInputConfig , EndpointResolvedConfig , resolveEndpointConfig } from "@smithy/middleware-endpoint" ;
26
24
import { getRetryPlugin , resolveRetryConfig , RetryInputConfig , RetryResolvedConfig } from "@smithy/middleware-retry" ;
@@ -32,6 +30,7 @@ import {
32
30
SmithyResolvedConfiguration as __SmithyResolvedConfiguration ,
33
31
} from "@smithy/smithy-client" ;
34
32
import {
33
+ AwsCredentialIdentityProvider ,
35
34
BodyLengthCalculator as __BodyLengthCalculator ,
36
35
CheckOptionalClientConfig as __CheckOptionalClientConfig ,
37
36
ChecksumConstructor as __ChecksumConstructor ,
@@ -48,6 +47,12 @@ import {
48
47
UserAgent as __UserAgent ,
49
48
} from "@smithy/types" ;
50
49
50
+ import {
51
+ defaultCloudFrontKeyValueStoreHttpAuthSchemeParametersProvider ,
52
+ HttpAuthSchemeInputConfig ,
53
+ HttpAuthSchemeResolvedConfig ,
54
+ resolveHttpAuthSchemeConfig ,
55
+ } from "./auth/httpAuthSchemeProvider" ;
51
56
import { DeleteKeyCommandInput , DeleteKeyCommandOutput } from "./commands/DeleteKeyCommand" ;
52
57
import {
53
58
DescribeKeyValueStoreCommandInput ,
@@ -189,9 +194,10 @@ export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHand
189
194
190
195
/**
191
196
* Default credentials provider; Not available in browser runtime.
197
+ * @deprecated
192
198
* @internal
193
199
*/
194
- credentialDefaultProvider ?: ( input : any ) => __Provider < __Credentials > ;
200
+ credentialDefaultProvider ?: ( input : any ) => AwsCredentialIdentityProvider ;
195
201
196
202
/**
197
203
* Value for how many times a request will be made at most in case of retry.
@@ -231,7 +237,7 @@ export type CloudFrontKeyValueStoreClientConfigType = Partial<__SmithyConfigurat
231
237
RegionInputConfig &
232
238
HostHeaderInputConfig &
233
239
EndpointInputConfig < EndpointParameters > &
234
- AwsAuthInputConfig &
240
+ HttpAuthSchemeInputConfig &
235
241
ClientInputEndpointParameters ;
236
242
/**
237
243
* @public
@@ -251,7 +257,7 @@ export type CloudFrontKeyValueStoreClientResolvedConfigType = __SmithyResolvedCo
251
257
RegionResolvedConfig &
252
258
HostHeaderResolvedConfig &
253
259
EndpointResolvedConfig < EndpointParameters > &
254
- AwsAuthResolvedConfig &
260
+ HttpAuthSchemeResolvedConfig &
255
261
ClientResolvedEndpointParameters ;
256
262
/**
257
263
* @public
@@ -283,7 +289,7 @@ export class CloudFrontKeyValueStoreClient extends __Client<
283
289
const _config_4 = resolveRegionConfig ( _config_3 ) ;
284
290
const _config_5 = resolveHostHeaderConfig ( _config_4 ) ;
285
291
const _config_6 = resolveEndpointConfig ( _config_5 ) ;
286
- const _config_7 = resolveAwsAuthConfig ( _config_6 ) ;
292
+ const _config_7 = resolveHttpAuthSchemeConfig ( _config_6 ) ;
287
293
const _config_8 = resolveRuntimeExtensions ( _config_7 , configuration ?. extensions || [ ] ) ;
288
294
super ( _config_8 ) ;
289
295
this . config = _config_8 ;
@@ -293,7 +299,17 @@ export class CloudFrontKeyValueStoreClient extends __Client<
293
299
this . middlewareStack . use ( getHostHeaderPlugin ( this . config ) ) ;
294
300
this . middlewareStack . use ( getLoggerPlugin ( this . config ) ) ;
295
301
this . middlewareStack . use ( getRecursionDetectionPlugin ( this . config ) ) ;
296
- this . middlewareStack . use ( getAwsAuthPlugin ( this . config ) ) ;
302
+ this . middlewareStack . use (
303
+ getHttpAuthSchemeEndpointRuleSetPlugin ( this . config , {
304
+ httpAuthSchemeParametersProvider : defaultCloudFrontKeyValueStoreHttpAuthSchemeParametersProvider ,
305
+ identityProviderConfigProvider : async ( config : CloudFrontKeyValueStoreClientResolvedConfig ) =>
306
+ new DefaultIdentityProviderConfig ( {
307
+ "aws.auth#sigv4" : config . credentials ,
308
+ "aws.auth#sigv4a" : config . credentials ,
309
+ } ) ,
310
+ } )
311
+ ) ;
312
+ this . middlewareStack . use ( getHttpSigningPlugin ( this . config ) ) ;
297
313
}
298
314
299
315
/**
0 commit comments