@aws-sdk/client-cognito-identity-provider 3.957.0 → 3.958.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -24,8 +24,7 @@ const getRuntimeConfig = (config) => {
24
24
  defaultsMode,
25
25
  bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_browser_1.calculateBodyLength,
26
26
  credentialDefaultProvider: config?.credentialDefaultProvider ?? ((_) => () => Promise.reject(new Error("Credential is missing"))),
27
- defaultUserAgentProvider: config?.defaultUserAgentProvider ??
28
- (0, util_user_agent_browser_1.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
27
+ defaultUserAgentProvider: config?.defaultUserAgentProvider ?? (0, util_user_agent_browser_1.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
29
28
  maxAttempts: config?.maxAttempts ?? util_retry_1.DEFAULT_MAX_ATTEMPTS,
30
29
  region: config?.region ?? (0, invalid_dependency_1.invalidProvider)("Region is missing"),
31
30
  requestHandler: fetch_http_handler_1.FetchHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
@@ -34,11 +34,9 @@ const getRuntimeConfig = (config) => {
34
34
  authSchemePreference: config?.authSchemePreference ?? (0, node_config_provider_1.loadConfig)(core_1.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
35
35
  bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength,
36
36
  credentialDefaultProvider: config?.credentialDefaultProvider ?? credential_provider_node_1.defaultProvider,
37
- defaultUserAgentProvider: config?.defaultUserAgentProvider ??
38
- (0, util_user_agent_node_1.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
37
+ defaultUserAgentProvider: config?.defaultUserAgentProvider ?? (0, util_user_agent_node_1.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
39
38
  maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
40
- region: config?.region ??
41
- (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, { ...config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),
39
+ region: config?.region ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, { ...config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),
42
40
  requestHandler: node_http_handler_1.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
43
41
  retryMode: config?.retryMode ??
44
42
  (0, node_config_provider_1.loadConfig)({
@@ -3,10 +3,9 @@ import { getSmithyContext, normalizeProvider } from "@smithy/util-middleware";
3
3
  export const defaultCognitoIdentityProviderHttpAuthSchemeParametersProvider = async (config, context, input) => {
4
4
  return {
5
5
  operation: getSmithyContext(context).operation,
6
- region: (await normalizeProvider(config.region)()) ||
7
- (() => {
8
- throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
9
- })(),
6
+ region: await normalizeProvider(config.region)() || (() => {
7
+ throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
8
+ })(),
10
9
  };
11
10
  };
12
11
  function createAwsAuthSigv4HttpAuthOption(authParameters) {
@@ -32,134 +31,198 @@ function createSmithyApiNoAuthHttpAuthOption(authParameters) {
32
31
  export const defaultCognitoIdentityProviderHttpAuthSchemeProvider = (authParameters) => {
33
32
  const options = [];
34
33
  switch (authParameters.operation) {
35
- case "AssociateSoftwareToken": {
36
- options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
37
- break;
38
- }
39
- case "ChangePassword": {
40
- options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
41
- break;
42
- }
43
- case "CompleteWebAuthnRegistration": {
44
- options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
45
- break;
46
- }
47
- case "ConfirmDevice": {
48
- options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
49
- break;
50
- }
51
- case "ConfirmForgotPassword": {
52
- options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
53
- break;
54
- }
55
- case "ConfirmSignUp": {
56
- options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
57
- break;
58
- }
59
- case "DeleteUser": {
60
- options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
61
- break;
62
- }
63
- case "DeleteUserAttributes": {
64
- options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
65
- break;
66
- }
67
- case "DeleteWebAuthnCredential": {
68
- options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
69
- break;
70
- }
71
- case "ForgetDevice": {
72
- options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
73
- break;
74
- }
75
- case "ForgotPassword": {
76
- options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
77
- break;
78
- }
79
- case "GetDevice": {
80
- options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
81
- break;
82
- }
83
- case "GetTokensFromRefreshToken": {
84
- options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
85
- break;
86
- }
87
- case "GetUser": {
88
- options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
89
- break;
90
- }
91
- case "GetUserAttributeVerificationCode": {
92
- options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
93
- break;
94
- }
95
- case "GetUserAuthFactors": {
96
- options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
97
- break;
98
- }
99
- case "GlobalSignOut": {
100
- options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
101
- break;
102
- }
103
- case "InitiateAuth": {
104
- options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
105
- break;
106
- }
107
- case "ListDevices": {
108
- options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
109
- break;
110
- }
111
- case "ListWebAuthnCredentials": {
112
- options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
113
- break;
114
- }
115
- case "ResendConfirmationCode": {
116
- options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
117
- break;
118
- }
119
- case "RespondToAuthChallenge": {
120
- options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
121
- break;
122
- }
123
- case "RevokeToken": {
124
- options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
125
- break;
126
- }
127
- case "SetUserMFAPreference": {
128
- options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
129
- break;
130
- }
131
- case "SetUserSettings": {
132
- options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
133
- break;
134
- }
135
- case "SignUp": {
136
- options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
137
- break;
138
- }
139
- case "StartWebAuthnRegistration": {
140
- options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
141
- break;
142
- }
143
- case "UpdateAuthEventFeedback": {
144
- options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
145
- break;
146
- }
147
- case "UpdateDeviceStatus": {
148
- options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
149
- break;
150
- }
151
- case "UpdateUserAttributes": {
152
- options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
153
- break;
154
- }
155
- case "VerifySoftwareToken": {
156
- options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
157
- break;
158
- }
159
- case "VerifyUserAttribute": {
160
- options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
161
- break;
162
- }
34
+ case "AssociateSoftwareToken":
35
+ {
36
+ options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
37
+ break;
38
+ }
39
+ ;
40
+ case "ChangePassword":
41
+ {
42
+ options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
43
+ break;
44
+ }
45
+ ;
46
+ case "CompleteWebAuthnRegistration":
47
+ {
48
+ options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
49
+ break;
50
+ }
51
+ ;
52
+ case "ConfirmDevice":
53
+ {
54
+ options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
55
+ break;
56
+ }
57
+ ;
58
+ case "ConfirmForgotPassword":
59
+ {
60
+ options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
61
+ break;
62
+ }
63
+ ;
64
+ case "ConfirmSignUp":
65
+ {
66
+ options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
67
+ break;
68
+ }
69
+ ;
70
+ case "DeleteUser":
71
+ {
72
+ options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
73
+ break;
74
+ }
75
+ ;
76
+ case "DeleteUserAttributes":
77
+ {
78
+ options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
79
+ break;
80
+ }
81
+ ;
82
+ case "DeleteWebAuthnCredential":
83
+ {
84
+ options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
85
+ break;
86
+ }
87
+ ;
88
+ case "ForgetDevice":
89
+ {
90
+ options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
91
+ break;
92
+ }
93
+ ;
94
+ case "ForgotPassword":
95
+ {
96
+ options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
97
+ break;
98
+ }
99
+ ;
100
+ case "GetDevice":
101
+ {
102
+ options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
103
+ break;
104
+ }
105
+ ;
106
+ case "GetTokensFromRefreshToken":
107
+ {
108
+ options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
109
+ break;
110
+ }
111
+ ;
112
+ case "GetUser":
113
+ {
114
+ options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
115
+ break;
116
+ }
117
+ ;
118
+ case "GetUserAttributeVerificationCode":
119
+ {
120
+ options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
121
+ break;
122
+ }
123
+ ;
124
+ case "GetUserAuthFactors":
125
+ {
126
+ options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
127
+ break;
128
+ }
129
+ ;
130
+ case "GlobalSignOut":
131
+ {
132
+ options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
133
+ break;
134
+ }
135
+ ;
136
+ case "InitiateAuth":
137
+ {
138
+ options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
139
+ break;
140
+ }
141
+ ;
142
+ case "ListDevices":
143
+ {
144
+ options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
145
+ break;
146
+ }
147
+ ;
148
+ case "ListWebAuthnCredentials":
149
+ {
150
+ options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
151
+ break;
152
+ }
153
+ ;
154
+ case "ResendConfirmationCode":
155
+ {
156
+ options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
157
+ break;
158
+ }
159
+ ;
160
+ case "RespondToAuthChallenge":
161
+ {
162
+ options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
163
+ break;
164
+ }
165
+ ;
166
+ case "RevokeToken":
167
+ {
168
+ options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
169
+ break;
170
+ }
171
+ ;
172
+ case "SetUserMFAPreference":
173
+ {
174
+ options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
175
+ break;
176
+ }
177
+ ;
178
+ case "SetUserSettings":
179
+ {
180
+ options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
181
+ break;
182
+ }
183
+ ;
184
+ case "SignUp":
185
+ {
186
+ options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
187
+ break;
188
+ }
189
+ ;
190
+ case "StartWebAuthnRegistration":
191
+ {
192
+ options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
193
+ break;
194
+ }
195
+ ;
196
+ case "UpdateAuthEventFeedback":
197
+ {
198
+ options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
199
+ break;
200
+ }
201
+ ;
202
+ case "UpdateDeviceStatus":
203
+ {
204
+ options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
205
+ break;
206
+ }
207
+ ;
208
+ case "UpdateUserAttributes":
209
+ {
210
+ options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
211
+ break;
212
+ }
213
+ ;
214
+ case "VerifySoftwareToken":
215
+ {
216
+ options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
217
+ break;
218
+ }
219
+ ;
220
+ case "VerifyUserAttribute":
221
+ {
222
+ options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
223
+ break;
224
+ }
225
+ ;
163
226
  default: {
164
227
  options.push(createAwsAuthSigv4HttpAuthOption(authParameters));
165
228
  }
@@ -1,10 +1,10 @@
1
+ export * from "./Interfaces";
1
2
  export * from "./AdminListGroupsForUserPaginator";
2
3
  export * from "./AdminListUserAuthEventsPaginator";
3
- export * from "./Interfaces";
4
4
  export * from "./ListGroupsPaginator";
5
5
  export * from "./ListIdentityProvidersPaginator";
6
6
  export * from "./ListResourceServersPaginator";
7
7
  export * from "./ListUserPoolClientsPaginator";
8
8
  export * from "./ListUserPoolsPaginator";
9
- export * from "./ListUsersInGroupPaginator";
10
9
  export * from "./ListUsersPaginator";
10
+ export * from "./ListUsersInGroupPaginator";
@@ -20,8 +20,7 @@ export const getRuntimeConfig = (config) => {
20
20
  defaultsMode,
21
21
  bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
22
22
  credentialDefaultProvider: config?.credentialDefaultProvider ?? ((_) => () => Promise.reject(new Error("Credential is missing"))),
23
- defaultUserAgentProvider: config?.defaultUserAgentProvider ??
24
- createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
23
+ defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
25
24
  maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS,
26
25
  region: config?.region ?? invalidProvider("Region is missing"),
27
26
  requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
@@ -1,7 +1,7 @@
1
1
  import packageInfo from "../package.json";
2
- import { NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, emitWarningIfUnsupportedVersion as awsCheckVersion } from "@aws-sdk/core";
2
+ import { emitWarningIfUnsupportedVersion as awsCheckVersion, NODE_AUTH_SCHEME_PREFERENCE_OPTIONS } from "@aws-sdk/core";
3
3
  import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node";
4
- import { NODE_APP_ID_CONFIG_OPTIONS, createDefaultUserAgentProvider } from "@aws-sdk/util-user-agent-node";
4
+ import { createDefaultUserAgentProvider, NODE_APP_ID_CONFIG_OPTIONS } from "@aws-sdk/util-user-agent-node";
5
5
  import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, } from "@smithy/config-resolver";
6
6
  import { Hash } from "@smithy/hash-node";
7
7
  import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@smithy/middleware-retry";
@@ -30,11 +30,9 @@ export const getRuntimeConfig = (config) => {
30
30
  authSchemePreference: config?.authSchemePreference ?? loadNodeConfig(NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
31
31
  bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
32
32
  credentialDefaultProvider: config?.credentialDefaultProvider ?? credentialDefaultProvider,
33
- defaultUserAgentProvider: config?.defaultUserAgentProvider ??
34
- createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
33
+ defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
35
34
  maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
36
- region: config?.region ??
37
- loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, { ...NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),
35
+ region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, { ...NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),
38
36
  requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
39
37
  retryMode: config?.retryMode ??
40
38
  loadNodeConfig({