Skip to content

Commit 4698c5d

Browse files
committed
chore(private): add config authSchemePreference
1 parent bb572d8 commit 4698c5d

File tree

12 files changed

+168
-13
lines changed

12 files changed

+168
-13
lines changed

private/aws-echo-service/src/auth/httpAuthSchemeProvider.ts

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@ import {
77
HttpAuthSchemeParameters,
88
HttpAuthSchemeParametersProvider,
99
HttpAuthSchemeProvider,
10+
Provider,
1011
} from "@smithy/types";
11-
import { getSmithyContext } from "@smithy/util-middleware";
12+
import { getSmithyContext, normalizeProvider } from "@smithy/util-middleware";
1213

1314
/**
1415
* @internal
@@ -68,6 +69,11 @@ export const defaultEchoServiceHttpAuthSchemeProvider: EchoServiceHttpAuthScheme
6869
* @internal
6970
*/
7071
export interface HttpAuthSchemeInputConfig {
72+
/**
73+
* 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
74+
*/
75+
authSchemePreference?: string[] | Provider<string[]>;
76+
7177
/**
7278
* Configuration of HttpAuthSchemes for a client which provides default identity providers and signers per auth scheme.
7379
* @internal
@@ -85,6 +91,11 @@ export interface HttpAuthSchemeInputConfig {
8591
* @internal
8692
*/
8793
export interface HttpAuthSchemeResolvedConfig {
94+
/**
95+
* 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
96+
*/
97+
readonly authSchemePreference: Provider<string[]>;
98+
8899
/**
89100
* Configuration of HttpAuthSchemes for a client which provides default identity providers and signers per auth scheme.
90101
* @internal
@@ -104,5 +115,7 @@ export interface HttpAuthSchemeResolvedConfig {
104115
export const resolveHttpAuthSchemeConfig = <T>(
105116
config: T & HttpAuthSchemeInputConfig
106117
): T & HttpAuthSchemeResolvedConfig => {
107-
return Object.assign(config, {}) as T & HttpAuthSchemeResolvedConfig;
118+
return Object.assign(config, {
119+
authSchemePreference: normalizeProvider(config.authSchemePreference ?? []),
120+
}) as T & HttpAuthSchemeResolvedConfig;
108121
};

private/aws-protocoltests-ec2/src/auth/httpAuthSchemeProvider.ts

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import {
1212
HttpAuthSchemeParameters,
1313
HttpAuthSchemeParametersProvider,
1414
HttpAuthSchemeProvider,
15+
Provider,
1516
} from "@smithy/types";
1617
import { getSmithyContext, normalizeProvider } from "@smithy/util-middleware";
1718

@@ -95,6 +96,11 @@ export const defaultEC2ProtocolHttpAuthSchemeProvider: EC2ProtocolHttpAuthScheme
9596
* @internal
9697
*/
9798
export interface HttpAuthSchemeInputConfig extends AwsSdkSigV4AuthInputConfig {
99+
/**
100+
* 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
101+
*/
102+
authSchemePreference?: string[] | Provider<string[]>;
103+
98104
/**
99105
* Configuration of HttpAuthSchemes for a client which provides default identity providers and signers per auth scheme.
100106
* @internal
@@ -112,6 +118,11 @@ export interface HttpAuthSchemeInputConfig extends AwsSdkSigV4AuthInputConfig {
112118
* @internal
113119
*/
114120
export interface HttpAuthSchemeResolvedConfig extends AwsSdkSigV4AuthResolvedConfig {
121+
/**
122+
* 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
123+
*/
124+
readonly authSchemePreference: Provider<string[]>;
125+
115126
/**
116127
* Configuration of HttpAuthSchemes for a client which provides default identity providers and signers per auth scheme.
117128
* @internal
@@ -132,5 +143,7 @@ export const resolveHttpAuthSchemeConfig = <T>(
132143
config: T & HttpAuthSchemeInputConfig & AwsSdkSigV4PreviouslyResolved
133144
): T & HttpAuthSchemeResolvedConfig => {
134145
const config_0 = resolveAwsSdkSigV4Config(config);
135-
return Object.assign(config_0, {}) as T & HttpAuthSchemeResolvedConfig;
146+
return Object.assign(config_0, {
147+
authSchemePreference: normalizeProvider(config.authSchemePreference ?? []),
148+
}) as T & HttpAuthSchemeResolvedConfig;
136149
};

private/aws-protocoltests-json-10/src/auth/httpAuthSchemeProvider.ts

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import {
1212
HttpAuthSchemeParameters,
1313
HttpAuthSchemeParametersProvider,
1414
HttpAuthSchemeProvider,
15+
Provider,
1516
} from "@smithy/types";
1617
import { getSmithyContext, normalizeProvider } from "@smithy/util-middleware";
1718

@@ -94,6 +95,11 @@ export const defaultJSONRPC10HttpAuthSchemeProvider: JSONRPC10HttpAuthSchemeProv
9495
* @internal
9596
*/
9697
export interface HttpAuthSchemeInputConfig extends AwsSdkSigV4AuthInputConfig {
98+
/**
99+
* 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
100+
*/
101+
authSchemePreference?: string[] | Provider<string[]>;
102+
97103
/**
98104
* Configuration of HttpAuthSchemes for a client which provides default identity providers and signers per auth scheme.
99105
* @internal
@@ -111,6 +117,11 @@ export interface HttpAuthSchemeInputConfig extends AwsSdkSigV4AuthInputConfig {
111117
* @internal
112118
*/
113119
export interface HttpAuthSchemeResolvedConfig extends AwsSdkSigV4AuthResolvedConfig {
120+
/**
121+
* 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
122+
*/
123+
readonly authSchemePreference: Provider<string[]>;
124+
114125
/**
115126
* Configuration of HttpAuthSchemes for a client which provides default identity providers and signers per auth scheme.
116127
* @internal
@@ -131,5 +142,7 @@ export const resolveHttpAuthSchemeConfig = <T>(
131142
config: T & HttpAuthSchemeInputConfig & AwsSdkSigV4PreviouslyResolved
132143
): T & HttpAuthSchemeResolvedConfig => {
133144
const config_0 = resolveAwsSdkSigV4Config(config);
134-
return Object.assign(config_0, {}) as T & HttpAuthSchemeResolvedConfig;
145+
return Object.assign(config_0, {
146+
authSchemePreference: normalizeProvider(config.authSchemePreference ?? []),
147+
}) as T & HttpAuthSchemeResolvedConfig;
135148
};

private/aws-protocoltests-json-machinelearning/src/auth/httpAuthSchemeProvider.ts

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import {
1212
HttpAuthSchemeParameters,
1313
HttpAuthSchemeParametersProvider,
1414
HttpAuthSchemeProvider,
15+
Provider,
1516
} from "@smithy/types";
1617
import { getSmithyContext, normalizeProvider } from "@smithy/util-middleware";
1718

@@ -95,6 +96,11 @@ export const defaultMachineLearningHttpAuthSchemeProvider: MachineLearningHttpAu
9596
* @internal
9697
*/
9798
export interface HttpAuthSchemeInputConfig extends AwsSdkSigV4AuthInputConfig {
99+
/**
100+
* 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
101+
*/
102+
authSchemePreference?: string[] | Provider<string[]>;
103+
98104
/**
99105
* Configuration of HttpAuthSchemes for a client which provides default identity providers and signers per auth scheme.
100106
* @internal
@@ -112,6 +118,11 @@ export interface HttpAuthSchemeInputConfig extends AwsSdkSigV4AuthInputConfig {
112118
* @internal
113119
*/
114120
export interface HttpAuthSchemeResolvedConfig extends AwsSdkSigV4AuthResolvedConfig {
121+
/**
122+
* 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
123+
*/
124+
readonly authSchemePreference: Provider<string[]>;
125+
115126
/**
116127
* Configuration of HttpAuthSchemes for a client which provides default identity providers and signers per auth scheme.
117128
* @internal
@@ -132,5 +143,7 @@ export const resolveHttpAuthSchemeConfig = <T>(
132143
config: T & HttpAuthSchemeInputConfig & AwsSdkSigV4PreviouslyResolved
133144
): T & HttpAuthSchemeResolvedConfig => {
134145
const config_0 = resolveAwsSdkSigV4Config(config);
135-
return Object.assign(config_0, {}) as T & HttpAuthSchemeResolvedConfig;
146+
return Object.assign(config_0, {
147+
authSchemePreference: normalizeProvider(config.authSchemePreference ?? []),
148+
}) as T & HttpAuthSchemeResolvedConfig;
136149
};

private/aws-protocoltests-json/src/auth/httpAuthSchemeProvider.ts

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import {
1212
HttpAuthSchemeParameters,
1313
HttpAuthSchemeParametersProvider,
1414
HttpAuthSchemeProvider,
15+
Provider,
1516
} from "@smithy/types";
1617
import { getSmithyContext, normalizeProvider } from "@smithy/util-middleware";
1718

@@ -95,6 +96,11 @@ export const defaultJsonProtocolHttpAuthSchemeProvider: JsonProtocolHttpAuthSche
9596
* @internal
9697
*/
9798
export interface HttpAuthSchemeInputConfig extends AwsSdkSigV4AuthInputConfig {
99+
/**
100+
* 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
101+
*/
102+
authSchemePreference?: string[] | Provider<string[]>;
103+
98104
/**
99105
* Configuration of HttpAuthSchemes for a client which provides default identity providers and signers per auth scheme.
100106
* @internal
@@ -112,6 +118,11 @@ export interface HttpAuthSchemeInputConfig extends AwsSdkSigV4AuthInputConfig {
112118
* @internal
113119
*/
114120
export interface HttpAuthSchemeResolvedConfig extends AwsSdkSigV4AuthResolvedConfig {
121+
/**
122+
* 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
123+
*/
124+
readonly authSchemePreference: Provider<string[]>;
125+
115126
/**
116127
* Configuration of HttpAuthSchemes for a client which provides default identity providers and signers per auth scheme.
117128
* @internal
@@ -132,5 +143,7 @@ export const resolveHttpAuthSchemeConfig = <T>(
132143
config: T & HttpAuthSchemeInputConfig & AwsSdkSigV4PreviouslyResolved
133144
): T & HttpAuthSchemeResolvedConfig => {
134145
const config_0 = resolveAwsSdkSigV4Config(config);
135-
return Object.assign(config_0, {}) as T & HttpAuthSchemeResolvedConfig;
146+
return Object.assign(config_0, {
147+
authSchemePreference: normalizeProvider(config.authSchemePreference ?? []),
148+
}) as T & HttpAuthSchemeResolvedConfig;
136149
};

private/aws-protocoltests-query/src/auth/httpAuthSchemeProvider.ts

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import {
1212
HttpAuthSchemeParameters,
1313
HttpAuthSchemeParametersProvider,
1414
HttpAuthSchemeProvider,
15+
Provider,
1516
} from "@smithy/types";
1617
import { getSmithyContext, normalizeProvider } from "@smithy/util-middleware";
1718

@@ -95,6 +96,11 @@ export const defaultQueryProtocolHttpAuthSchemeProvider: QueryProtocolHttpAuthSc
9596
* @internal
9697
*/
9798
export interface HttpAuthSchemeInputConfig extends AwsSdkSigV4AuthInputConfig {
99+
/**
100+
* 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
101+
*/
102+
authSchemePreference?: string[] | Provider<string[]>;
103+
98104
/**
99105
* Configuration of HttpAuthSchemes for a client which provides default identity providers and signers per auth scheme.
100106
* @internal
@@ -112,6 +118,11 @@ export interface HttpAuthSchemeInputConfig extends AwsSdkSigV4AuthInputConfig {
112118
* @internal
113119
*/
114120
export interface HttpAuthSchemeResolvedConfig extends AwsSdkSigV4AuthResolvedConfig {
121+
/**
122+
* 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
123+
*/
124+
readonly authSchemePreference: Provider<string[]>;
125+
115126
/**
116127
* Configuration of HttpAuthSchemes for a client which provides default identity providers and signers per auth scheme.
117128
* @internal
@@ -132,5 +143,7 @@ export const resolveHttpAuthSchemeConfig = <T>(
132143
config: T & HttpAuthSchemeInputConfig & AwsSdkSigV4PreviouslyResolved
133144
): T & HttpAuthSchemeResolvedConfig => {
134145
const config_0 = resolveAwsSdkSigV4Config(config);
135-
return Object.assign(config_0, {}) as T & HttpAuthSchemeResolvedConfig;
146+
return Object.assign(config_0, {
147+
authSchemePreference: normalizeProvider(config.authSchemePreference ?? []),
148+
}) as T & HttpAuthSchemeResolvedConfig;
136149
};

private/aws-protocoltests-restjson-apigateway/src/auth/httpAuthSchemeProvider.ts

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import {
1212
HttpAuthSchemeParameters,
1313
HttpAuthSchemeParametersProvider,
1414
HttpAuthSchemeProvider,
15+
Provider,
1516
} from "@smithy/types";
1617
import { getSmithyContext, normalizeProvider } from "@smithy/util-middleware";
1718

@@ -94,6 +95,11 @@ export const defaultAPIGatewayHttpAuthSchemeProvider: APIGatewayHttpAuthSchemePr
9495
* @internal
9596
*/
9697
export interface HttpAuthSchemeInputConfig extends AwsSdkSigV4AuthInputConfig {
98+
/**
99+
* 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
100+
*/
101+
authSchemePreference?: string[] | Provider<string[]>;
102+
97103
/**
98104
* Configuration of HttpAuthSchemes for a client which provides default identity providers and signers per auth scheme.
99105
* @internal
@@ -111,6 +117,11 @@ export interface HttpAuthSchemeInputConfig extends AwsSdkSigV4AuthInputConfig {
111117
* @internal
112118
*/
113119
export interface HttpAuthSchemeResolvedConfig extends AwsSdkSigV4AuthResolvedConfig {
120+
/**
121+
* 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
122+
*/
123+
readonly authSchemePreference: Provider<string[]>;
124+
114125
/**
115126
* Configuration of HttpAuthSchemes for a client which provides default identity providers and signers per auth scheme.
116127
* @internal
@@ -131,5 +142,7 @@ export const resolveHttpAuthSchemeConfig = <T>(
131142
config: T & HttpAuthSchemeInputConfig & AwsSdkSigV4PreviouslyResolved
132143
): T & HttpAuthSchemeResolvedConfig => {
133144
const config_0 = resolveAwsSdkSigV4Config(config);
134-
return Object.assign(config_0, {}) as T & HttpAuthSchemeResolvedConfig;
145+
return Object.assign(config_0, {
146+
authSchemePreference: normalizeProvider(config.authSchemePreference ?? []),
147+
}) as T & HttpAuthSchemeResolvedConfig;
135148
};

private/aws-protocoltests-restjson-glacier/src/auth/httpAuthSchemeProvider.ts

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import {
1212
HttpAuthSchemeParameters,
1313
HttpAuthSchemeParametersProvider,
1414
HttpAuthSchemeProvider,
15+
Provider,
1516
} from "@smithy/types";
1617
import { getSmithyContext, normalizeProvider } from "@smithy/util-middleware";
1718

@@ -94,6 +95,11 @@ export const defaultGlacierHttpAuthSchemeProvider: GlacierHttpAuthSchemeProvider
9495
* @internal
9596
*/
9697
export interface HttpAuthSchemeInputConfig extends AwsSdkSigV4AuthInputConfig {
98+
/**
99+
* 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
100+
*/
101+
authSchemePreference?: string[] | Provider<string[]>;
102+
97103
/**
98104
* Configuration of HttpAuthSchemes for a client which provides default identity providers and signers per auth scheme.
99105
* @internal
@@ -111,6 +117,11 @@ export interface HttpAuthSchemeInputConfig extends AwsSdkSigV4AuthInputConfig {
111117
* @internal
112118
*/
113119
export interface HttpAuthSchemeResolvedConfig extends AwsSdkSigV4AuthResolvedConfig {
120+
/**
121+
* 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
122+
*/
123+
readonly authSchemePreference: Provider<string[]>;
124+
114125
/**
115126
* Configuration of HttpAuthSchemes for a client which provides default identity providers and signers per auth scheme.
116127
* @internal
@@ -131,5 +142,7 @@ export const resolveHttpAuthSchemeConfig = <T>(
131142
config: T & HttpAuthSchemeInputConfig & AwsSdkSigV4PreviouslyResolved
132143
): T & HttpAuthSchemeResolvedConfig => {
133144
const config_0 = resolveAwsSdkSigV4Config(config);
134-
return Object.assign(config_0, {}) as T & HttpAuthSchemeResolvedConfig;
145+
return Object.assign(config_0, {
146+
authSchemePreference: normalizeProvider(config.authSchemePreference ?? []),
147+
}) as T & HttpAuthSchemeResolvedConfig;
135148
};

private/aws-protocoltests-restjson/src/auth/httpAuthSchemeProvider.ts

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import {
1212
HttpAuthSchemeParameters,
1313
HttpAuthSchemeParametersProvider,
1414
HttpAuthSchemeProvider,
15+
Provider,
1516
} from "@smithy/types";
1617
import { getSmithyContext, normalizeProvider } from "@smithy/util-middleware";
1718

@@ -97,6 +98,11 @@ export const defaultRestJsonProtocolHttpAuthSchemeProvider: RestJsonProtocolHttp
9798
* @internal
9899
*/
99100
export interface HttpAuthSchemeInputConfig extends AwsSdkSigV4AuthInputConfig {
101+
/**
102+
* 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
103+
*/
104+
authSchemePreference?: string[] | Provider<string[]>;
105+
100106
/**
101107
* Configuration of HttpAuthSchemes for a client which provides default identity providers and signers per auth scheme.
102108
* @internal
@@ -114,6 +120,11 @@ export interface HttpAuthSchemeInputConfig extends AwsSdkSigV4AuthInputConfig {
114120
* @internal
115121
*/
116122
export interface HttpAuthSchemeResolvedConfig extends AwsSdkSigV4AuthResolvedConfig {
123+
/**
124+
* 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
125+
*/
126+
readonly authSchemePreference: Provider<string[]>;
127+
117128
/**
118129
* Configuration of HttpAuthSchemes for a client which provides default identity providers and signers per auth scheme.
119130
* @internal
@@ -134,5 +145,7 @@ export const resolveHttpAuthSchemeConfig = <T>(
134145
config: T & HttpAuthSchemeInputConfig & AwsSdkSigV4PreviouslyResolved
135146
): T & HttpAuthSchemeResolvedConfig => {
136147
const config_0 = resolveAwsSdkSigV4Config(config);
137-
return Object.assign(config_0, {}) as T & HttpAuthSchemeResolvedConfig;
148+
return Object.assign(config_0, {
149+
authSchemePreference: normalizeProvider(config.authSchemePreference ?? []),
150+
}) as T & HttpAuthSchemeResolvedConfig;
138151
};

0 commit comments

Comments
 (0)