@aws-sdk/client-cognito-identity-provider 3.509.0 → 3.513.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.
Files changed (103) hide show
  1. package/dist-cjs/auth/httpAuthExtensionConfiguration.js +1 -0
  2. package/dist-cjs/auth/httpAuthSchemeProvider.js +156 -0
  3. package/dist-cjs/index.js +142 -237
  4. package/dist-cjs/runtimeConfig.shared.js +16 -0
  5. package/dist-es/CognitoIdentityProviderClient.js +17 -3
  6. package/dist-es/auth/httpAuthExtensionConfiguration.js +38 -0
  7. package/dist-es/auth/httpAuthSchemeProvider.js +150 -0
  8. package/dist-es/commands/AddCustomAttributesCommand.js +0 -2
  9. package/dist-es/commands/AdminAddUserToGroupCommand.js +0 -2
  10. package/dist-es/commands/AdminConfirmSignUpCommand.js +0 -2
  11. package/dist-es/commands/AdminCreateUserCommand.js +0 -2
  12. package/dist-es/commands/AdminDeleteUserAttributesCommand.js +0 -2
  13. package/dist-es/commands/AdminDeleteUserCommand.js +0 -2
  14. package/dist-es/commands/AdminDisableProviderForUserCommand.js +0 -2
  15. package/dist-es/commands/AdminDisableUserCommand.js +0 -2
  16. package/dist-es/commands/AdminEnableUserCommand.js +0 -2
  17. package/dist-es/commands/AdminForgetDeviceCommand.js +0 -2
  18. package/dist-es/commands/AdminGetDeviceCommand.js +0 -2
  19. package/dist-es/commands/AdminGetUserCommand.js +0 -2
  20. package/dist-es/commands/AdminInitiateAuthCommand.js +0 -2
  21. package/dist-es/commands/AdminLinkProviderForUserCommand.js +0 -2
  22. package/dist-es/commands/AdminListDevicesCommand.js +0 -2
  23. package/dist-es/commands/AdminListGroupsForUserCommand.js +0 -2
  24. package/dist-es/commands/AdminListUserAuthEventsCommand.js +0 -2
  25. package/dist-es/commands/AdminRemoveUserFromGroupCommand.js +0 -2
  26. package/dist-es/commands/AdminResetUserPasswordCommand.js +0 -2
  27. package/dist-es/commands/AdminRespondToAuthChallengeCommand.js +0 -2
  28. package/dist-es/commands/AdminSetUserMFAPreferenceCommand.js +0 -2
  29. package/dist-es/commands/AdminSetUserPasswordCommand.js +0 -2
  30. package/dist-es/commands/AdminSetUserSettingsCommand.js +0 -2
  31. package/dist-es/commands/AdminUpdateAuthEventFeedbackCommand.js +0 -2
  32. package/dist-es/commands/AdminUpdateDeviceStatusCommand.js +0 -2
  33. package/dist-es/commands/AdminUpdateUserAttributesCommand.js +0 -2
  34. package/dist-es/commands/AdminUserGlobalSignOutCommand.js +0 -2
  35. package/dist-es/commands/CreateGroupCommand.js +0 -2
  36. package/dist-es/commands/CreateIdentityProviderCommand.js +0 -2
  37. package/dist-es/commands/CreateResourceServerCommand.js +0 -2
  38. package/dist-es/commands/CreateUserImportJobCommand.js +0 -2
  39. package/dist-es/commands/CreateUserPoolClientCommand.js +0 -2
  40. package/dist-es/commands/CreateUserPoolCommand.js +0 -2
  41. package/dist-es/commands/CreateUserPoolDomainCommand.js +0 -2
  42. package/dist-es/commands/DeleteGroupCommand.js +0 -2
  43. package/dist-es/commands/DeleteIdentityProviderCommand.js +0 -2
  44. package/dist-es/commands/DeleteResourceServerCommand.js +0 -2
  45. package/dist-es/commands/DeleteUserPoolClientCommand.js +0 -2
  46. package/dist-es/commands/DeleteUserPoolCommand.js +0 -2
  47. package/dist-es/commands/DeleteUserPoolDomainCommand.js +0 -2
  48. package/dist-es/commands/DescribeIdentityProviderCommand.js +0 -2
  49. package/dist-es/commands/DescribeResourceServerCommand.js +0 -2
  50. package/dist-es/commands/DescribeRiskConfigurationCommand.js +0 -2
  51. package/dist-es/commands/DescribeUserImportJobCommand.js +0 -2
  52. package/dist-es/commands/DescribeUserPoolClientCommand.js +0 -2
  53. package/dist-es/commands/DescribeUserPoolCommand.js +0 -2
  54. package/dist-es/commands/DescribeUserPoolDomainCommand.js +0 -2
  55. package/dist-es/commands/GetCSVHeaderCommand.js +0 -2
  56. package/dist-es/commands/GetGroupCommand.js +0 -2
  57. package/dist-es/commands/GetIdentityProviderByIdentifierCommand.js +0 -2
  58. package/dist-es/commands/GetLogDeliveryConfigurationCommand.js +0 -2
  59. package/dist-es/commands/GetSigningCertificateCommand.js +0 -2
  60. package/dist-es/commands/GetUICustomizationCommand.js +0 -2
  61. package/dist-es/commands/GetUserPoolMfaConfigCommand.js +0 -2
  62. package/dist-es/commands/ListGroupsCommand.js +0 -2
  63. package/dist-es/commands/ListIdentityProvidersCommand.js +0 -2
  64. package/dist-es/commands/ListResourceServersCommand.js +0 -2
  65. package/dist-es/commands/ListTagsForResourceCommand.js +0 -2
  66. package/dist-es/commands/ListUserImportJobsCommand.js +0 -2
  67. package/dist-es/commands/ListUserPoolClientsCommand.js +0 -2
  68. package/dist-es/commands/ListUserPoolsCommand.js +0 -2
  69. package/dist-es/commands/ListUsersCommand.js +0 -2
  70. package/dist-es/commands/ListUsersInGroupCommand.js +0 -2
  71. package/dist-es/commands/SetLogDeliveryConfigurationCommand.js +0 -2
  72. package/dist-es/commands/SetRiskConfigurationCommand.js +0 -2
  73. package/dist-es/commands/SetUICustomizationCommand.js +0 -2
  74. package/dist-es/commands/SetUserPoolMfaConfigCommand.js +0 -2
  75. package/dist-es/commands/StartUserImportJobCommand.js +0 -2
  76. package/dist-es/commands/StopUserImportJobCommand.js +0 -2
  77. package/dist-es/commands/TagResourceCommand.js +0 -2
  78. package/dist-es/commands/UntagResourceCommand.js +0 -2
  79. package/dist-es/commands/UpdateGroupCommand.js +0 -2
  80. package/dist-es/commands/UpdateIdentityProviderCommand.js +0 -2
  81. package/dist-es/commands/UpdateResourceServerCommand.js +0 -2
  82. package/dist-es/commands/UpdateUserPoolClientCommand.js +0 -2
  83. package/dist-es/commands/UpdateUserPoolCommand.js +0 -2
  84. package/dist-es/commands/UpdateUserPoolDomainCommand.js +0 -2
  85. package/dist-es/runtimeConfig.shared.js +16 -0
  86. package/dist-es/runtimeExtensions.js +3 -0
  87. package/dist-types/CognitoIdentityProviderClient.d.ts +13 -11
  88. package/dist-types/auth/httpAuthExtensionConfiguration.d.ts +29 -0
  89. package/dist-types/auth/httpAuthSchemeProvider.d.ts +61 -0
  90. package/dist-types/extensionConfiguration.d.ts +2 -1
  91. package/dist-types/runtimeConfig.browser.d.ts +13 -3
  92. package/dist-types/runtimeConfig.d.ts +12 -2
  93. package/dist-types/runtimeConfig.native.d.ts +14 -4
  94. package/dist-types/runtimeConfig.shared.d.ts +13 -0
  95. package/dist-types/ts3.4/CognitoIdentityProviderClient.d.ts +11 -9
  96. package/dist-types/ts3.4/auth/httpAuthExtensionConfiguration.d.ts +32 -0
  97. package/dist-types/ts3.4/auth/httpAuthSchemeProvider.d.ts +44 -0
  98. package/dist-types/ts3.4/extensionConfiguration.d.ts +3 -1
  99. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +30 -5
  100. package/dist-types/ts3.4/runtimeConfig.d.ts +29 -4
  101. package/dist-types/ts3.4/runtimeConfig.native.d.ts +33 -8
  102. package/dist-types/ts3.4/runtimeConfig.shared.d.ts +30 -0
  103. package/package.json +16 -16
@@ -0,0 +1 @@
1
+ module.exports = require("../index.js");
@@ -0,0 +1,156 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.resolveHttpAuthSchemeConfig = exports.defaultCognitoIdentityProviderHttpAuthSchemeProvider = exports.defaultCognitoIdentityProviderHttpAuthSchemeParametersProvider = void 0;
4
+ const core_1 = require("@aws-sdk/core");
5
+ const util_middleware_1 = require("@smithy/util-middleware");
6
+ const defaultCognitoIdentityProviderHttpAuthSchemeParametersProvider = async (config, context, input) => {
7
+ return {
8
+ operation: (0, util_middleware_1.getSmithyContext)(context).operation,
9
+ region: (await (0, util_middleware_1.normalizeProvider)(config.region)()) ||
10
+ (() => {
11
+ throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
12
+ })(),
13
+ };
14
+ };
15
+ exports.defaultCognitoIdentityProviderHttpAuthSchemeParametersProvider = defaultCognitoIdentityProviderHttpAuthSchemeParametersProvider;
16
+ function createAwsAuthSigv4HttpAuthOption(authParameters) {
17
+ return {
18
+ schemeId: "aws.auth#sigv4",
19
+ signingProperties: {
20
+ name: "cognito-idp",
21
+ region: authParameters.region,
22
+ },
23
+ propertiesExtractor: (config, context) => ({
24
+ signingProperties: {
25
+ config,
26
+ context,
27
+ },
28
+ }),
29
+ };
30
+ }
31
+ function createSmithyApiNoAuthHttpAuthOption(authParameters) {
32
+ return {
33
+ schemeId: "smithy.api#noAuth",
34
+ };
35
+ }
36
+ const defaultCognitoIdentityProviderHttpAuthSchemeProvider = (authParameters) => {
37
+ const options = [];
38
+ switch (authParameters.operation) {
39
+ case "AssociateSoftwareToken": {
40
+ options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
41
+ break;
42
+ }
43
+ case "ChangePassword": {
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 "ForgetDevice": {
68
+ options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
69
+ break;
70
+ }
71
+ case "ForgotPassword": {
72
+ options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
73
+ break;
74
+ }
75
+ case "GetDevice": {
76
+ options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
77
+ break;
78
+ }
79
+ case "GetUser": {
80
+ options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
81
+ break;
82
+ }
83
+ case "GetUserAttributeVerificationCode": {
84
+ options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
85
+ break;
86
+ }
87
+ case "GlobalSignOut": {
88
+ options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
89
+ break;
90
+ }
91
+ case "InitiateAuth": {
92
+ options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
93
+ break;
94
+ }
95
+ case "ListDevices": {
96
+ options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
97
+ break;
98
+ }
99
+ case "ResendConfirmationCode": {
100
+ options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
101
+ break;
102
+ }
103
+ case "RespondToAuthChallenge": {
104
+ options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
105
+ break;
106
+ }
107
+ case "RevokeToken": {
108
+ options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
109
+ break;
110
+ }
111
+ case "SetUserMFAPreference": {
112
+ options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
113
+ break;
114
+ }
115
+ case "SetUserSettings": {
116
+ options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
117
+ break;
118
+ }
119
+ case "SignUp": {
120
+ options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
121
+ break;
122
+ }
123
+ case "UpdateAuthEventFeedback": {
124
+ options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
125
+ break;
126
+ }
127
+ case "UpdateDeviceStatus": {
128
+ options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
129
+ break;
130
+ }
131
+ case "UpdateUserAttributes": {
132
+ options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
133
+ break;
134
+ }
135
+ case "VerifySoftwareToken": {
136
+ options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
137
+ break;
138
+ }
139
+ case "VerifyUserAttribute": {
140
+ options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
141
+ break;
142
+ }
143
+ default: {
144
+ options.push(createAwsAuthSigv4HttpAuthOption(authParameters));
145
+ }
146
+ }
147
+ return options;
148
+ };
149
+ exports.defaultCognitoIdentityProviderHttpAuthSchemeProvider = defaultCognitoIdentityProviderHttpAuthSchemeProvider;
150
+ const resolveHttpAuthSchemeConfig = (config) => {
151
+ const config_0 = (0, core_1.resolveAwsSdkSigV4Config)(config);
152
+ return {
153
+ ...config_0,
154
+ };
155
+ };
156
+ exports.resolveHttpAuthSchemeConfig = resolveHttpAuthSchemeConfig;