@@ -14,12 +14,19 @@ import {
14
14
import { getLoggerPlugin } from "@aws-sdk/middleware-logger" ;
15
15
import { getRecursionDetectionPlugin } from "@aws-sdk/middleware-recursion-detection" ;
16
16
import { getRegionRedirectMiddlewarePlugin , getValidateBucketNamePlugin } from "@aws-sdk/middleware-sdk-s3" ;
17
+ import {
18
+ AwsAuthInputConfig ,
19
+ AwsAuthResolvedConfig ,
20
+ getAwsAuthPlugin ,
21
+ resolveAwsAuthConfig ,
22
+ } from "@aws-sdk/middleware-signing" ;
17
23
import {
18
24
getUserAgentPlugin ,
19
25
resolveUserAgentConfig ,
20
26
UserAgentInputConfig ,
21
27
UserAgentResolvedConfig ,
22
28
} from "@aws-sdk/middleware-user-agent" ;
29
+ import { Credentials as __Credentials } from "@aws-sdk/types" ;
23
30
import {
24
31
EndpointsInputConfig ,
25
32
EndpointsResolvedConfig ,
@@ -28,7 +35,6 @@ import {
28
35
resolveEndpointsConfig ,
29
36
resolveRegionConfig ,
30
37
} from "@smithy/config-resolver" ;
31
- import { DefaultIdentityProviderConfig , getHttpAuthSchemePlugin , getHttpSigningPlugin } from "@smithy/core" ;
32
38
import { getContentLengthPlugin } from "@smithy/middleware-content-length" ;
33
39
import { getRetryPlugin , resolveRetryConfig , RetryInputConfig , RetryResolvedConfig } from "@smithy/middleware-retry" ;
34
40
import { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http" ;
@@ -39,7 +45,6 @@ import {
39
45
SmithyResolvedConfiguration as __SmithyResolvedConfiguration ,
40
46
} from "@smithy/smithy-client" ;
41
47
import {
42
- AwsCredentialIdentityProvider ,
43
48
BodyLengthCalculator as __BodyLengthCalculator ,
44
49
CheckOptionalClientConfig as __CheckOptionalClientConfig ,
45
50
ChecksumConstructor as __ChecksumConstructor ,
@@ -56,12 +61,6 @@ import {
56
61
UserAgent as __UserAgent ,
57
62
} from "@smithy/types" ;
58
63
59
- import {
60
- defaultS3HttpAuthSchemeParametersProvider ,
61
- HttpAuthSchemeInputConfig ,
62
- HttpAuthSchemeResolvedConfig ,
63
- resolveHttpAuthSchemeConfig ,
64
- } from "./auth/httpAuthSchemeProvider" ;
65
64
import {
66
65
DeleteObjectTaggingCommandInput ,
67
66
DeleteObjectTaggingCommandOutput ,
@@ -183,6 +182,12 @@ export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHand
183
182
*/
184
183
region ?: string | __Provider < string > ;
185
184
185
+ /**
186
+ * Default credentials provider; Not available in browser runtime.
187
+ * @internal
188
+ */
189
+ credentialDefaultProvider ?: ( input : any ) => __Provider < __Credentials > ;
190
+
186
191
/**
187
192
* Fetch related hostname, signing name or signing region with given region.
188
193
* @internal
@@ -204,13 +209,6 @@ export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHand
204
209
*/
205
210
defaultUserAgentProvider ?: Provider < __UserAgent > ;
206
211
207
- /**
208
- * Default credentials provider; Not available in browser runtime.
209
- * @deprecated
210
- * @internal
211
- */
212
- credentialDefaultProvider ?: ( input : any ) => AwsCredentialIdentityProvider ;
213
-
214
212
/**
215
213
* Value for how many times a request will be made at most in case of retry.
216
214
*/
@@ -248,9 +246,9 @@ export type S3ClientConfigType = Partial<__SmithyConfiguration<__HttpHandlerOpti
248
246
EndpointsInputConfig &
249
247
RetryInputConfig &
250
248
HostHeaderInputConfig &
249
+ AwsAuthInputConfig &
251
250
BucketEndpointInputConfig &
252
- UserAgentInputConfig &
253
- HttpAuthSchemeInputConfig ;
251
+ UserAgentInputConfig ;
254
252
/**
255
253
* @public
256
254
*
@@ -268,9 +266,9 @@ export type S3ClientResolvedConfigType = __SmithyResolvedConfiguration<__HttpHan
268
266
EndpointsResolvedConfig &
269
267
RetryResolvedConfig &
270
268
HostHeaderResolvedConfig &
269
+ AwsAuthResolvedConfig &
271
270
BucketEndpointResolvedConfig &
272
- UserAgentResolvedConfig &
273
- HttpAuthSchemeResolvedConfig ;
271
+ UserAgentResolvedConfig ;
274
272
/**
275
273
* @public
276
274
*
@@ -298,9 +296,9 @@ export class S3Client extends __Client<
298
296
const _config_2 = resolveEndpointsConfig ( _config_1 ) ;
299
297
const _config_3 = resolveRetryConfig ( _config_2 ) ;
300
298
const _config_4 = resolveHostHeaderConfig ( _config_3 ) ;
301
- const _config_5 = resolveBucketEndpointConfig ( _config_4 ) ;
302
- const _config_6 = resolveUserAgentConfig ( _config_5 ) ;
303
- const _config_7 = resolveHttpAuthSchemeConfig ( _config_6 ) ;
299
+ const _config_5 = resolveAwsAuthConfig ( _config_4 ) ;
300
+ const _config_6 = resolveBucketEndpointConfig ( _config_5 ) ;
301
+ const _config_7 = resolveUserAgentConfig ( _config_6 ) ;
304
302
const _config_8 = resolveRuntimeExtensions ( _config_7 , configuration ?. extensions || [ ] ) ;
305
303
super ( _config_8 ) ;
306
304
this . config = _config_8 ;
@@ -309,17 +307,11 @@ export class S3Client extends __Client<
309
307
this . middlewareStack . use ( getHostHeaderPlugin ( this . config ) ) ;
310
308
this . middlewareStack . use ( getLoggerPlugin ( this . config ) ) ;
311
309
this . middlewareStack . use ( getRecursionDetectionPlugin ( this . config ) ) ;
310
+ this . middlewareStack . use ( getAwsAuthPlugin ( this . config ) ) ;
312
311
this . middlewareStack . use ( getValidateBucketNamePlugin ( this . config ) ) ;
313
312
this . middlewareStack . use ( getAddExpectContinuePlugin ( this . config ) ) ;
314
313
this . middlewareStack . use ( getRegionRedirectMiddlewarePlugin ( this . config ) ) ;
315
314
this . middlewareStack . use ( getUserAgentPlugin ( this . config ) ) ;
316
- this . middlewareStack . use (
317
- getHttpAuthSchemePlugin ( this . config , {
318
- httpAuthSchemeParametersProvider : this . getDefaultHttpAuthSchemeParametersProvider ( ) ,
319
- identityProviderConfigProvider : this . getIdentityProviderConfigProvider ( ) ,
320
- } )
321
- ) ;
322
- this . middlewareStack . use ( getHttpSigningPlugin ( this . config ) ) ;
323
315
}
324
316
325
317
/**
@@ -330,14 +322,4 @@ export class S3Client extends __Client<
330
322
destroy ( ) : void {
331
323
super . destroy ( ) ;
332
324
}
333
- private getDefaultHttpAuthSchemeParametersProvider ( ) {
334
- return defaultS3HttpAuthSchemeParametersProvider ;
335
- }
336
- private getIdentityProviderConfigProvider ( ) {
337
- return async ( config : S3ClientResolvedConfig ) =>
338
- new DefaultIdentityProviderConfig ( {
339
- "aws.auth#sigv4" : config . credentials ,
340
- "aws.auth#sigv4a" : config . credentials ,
341
- } ) ;
342
- }
343
325
}
0 commit comments