Skip to content

Commit bb572d8

Browse files
committed
chore(client-s3): add config authSchemePreference
1 parent a296b25 commit bb572d8

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

clients/client-s3/src/auth/httpAuthSchemeProvider.ts

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import {
2121
HttpAuthSchemeParametersProvider,
2222
HttpAuthSchemeProvider,
2323
Logger,
24+
Provider,
2425
} from "@smithy/types";
2526
import { getSmithyContext, normalizeProvider } from "@smithy/util-middleware";
2627

@@ -286,6 +287,11 @@ export const defaultS3HttpAuthSchemeProvider: S3HttpAuthSchemeProvider = createE
286287
* @internal
287288
*/
288289
export interface HttpAuthSchemeInputConfig extends AwsSdkSigV4AuthInputConfig, AwsSdkSigV4AAuthInputConfig {
290+
/**
291+
* A comma-separated list of case-sensitive auth scheme names. An auth scheme name is a fully qualified auth scheme ID with the namespace prefix trimmed. For example, the auth scheme with ID aws.auth#sigv4 is named sigv4. @public
292+
*/
293+
authSchemePreference?: string[] | Provider<string[]>;
294+
289295
/**
290296
* Configuration of HttpAuthSchemes for a client which provides default identity providers and signers per auth scheme.
291297
* @internal
@@ -303,6 +309,11 @@ export interface HttpAuthSchemeInputConfig extends AwsSdkSigV4AuthInputConfig, A
303309
* @internal
304310
*/
305311
export interface HttpAuthSchemeResolvedConfig extends AwsSdkSigV4AuthResolvedConfig, AwsSdkSigV4AAuthResolvedConfig {
312+
/**
313+
* A comma-separated list of case-sensitive auth scheme names. An auth scheme name is a fully qualified auth scheme ID with the namespace prefix trimmed. For example, the auth scheme with ID aws.auth#sigv4 is named sigv4. @public
314+
*/
315+
readonly authSchemePreference: Provider<string[]>;
316+
306317
/**
307318
* Configuration of HttpAuthSchemes for a client which provides default identity providers and signers per auth scheme.
308319
* @internal
@@ -324,5 +335,7 @@ export const resolveHttpAuthSchemeConfig = <T>(
324335
): T & HttpAuthSchemeResolvedConfig => {
325336
const config_0 = resolveAwsSdkSigV4Config(config);
326337
const config_1 = resolveAwsSdkSigV4AConfig(config_0);
327-
return Object.assign(config_1, {}) as T & HttpAuthSchemeResolvedConfig;
338+
return Object.assign(config_1, {
339+
authSchemePreference: normalizeProvider(config.authSchemePreference ?? []),
340+
}) as T & HttpAuthSchemeResolvedConfig;
328341
};

0 commit comments

Comments
 (0)