@aws-sdk/client-cognito-identity-provider 3.511.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.
- package/dist-cjs/auth/httpAuthExtensionConfiguration.js +1 -0
- package/dist-cjs/auth/httpAuthSchemeProvider.js +156 -0
- package/dist-cjs/index.js +142 -237
- package/dist-cjs/runtimeConfig.shared.js +16 -0
- package/dist-es/CognitoIdentityProviderClient.js +17 -3
- package/dist-es/auth/httpAuthExtensionConfiguration.js +38 -0
- package/dist-es/auth/httpAuthSchemeProvider.js +150 -0
- package/dist-es/commands/AddCustomAttributesCommand.js +0 -2
- package/dist-es/commands/AdminAddUserToGroupCommand.js +0 -2
- package/dist-es/commands/AdminConfirmSignUpCommand.js +0 -2
- package/dist-es/commands/AdminCreateUserCommand.js +0 -2
- package/dist-es/commands/AdminDeleteUserAttributesCommand.js +0 -2
- package/dist-es/commands/AdminDeleteUserCommand.js +0 -2
- package/dist-es/commands/AdminDisableProviderForUserCommand.js +0 -2
- package/dist-es/commands/AdminDisableUserCommand.js +0 -2
- package/dist-es/commands/AdminEnableUserCommand.js +0 -2
- package/dist-es/commands/AdminForgetDeviceCommand.js +0 -2
- package/dist-es/commands/AdminGetDeviceCommand.js +0 -2
- package/dist-es/commands/AdminGetUserCommand.js +0 -2
- package/dist-es/commands/AdminInitiateAuthCommand.js +0 -2
- package/dist-es/commands/AdminLinkProviderForUserCommand.js +0 -2
- package/dist-es/commands/AdminListDevicesCommand.js +0 -2
- package/dist-es/commands/AdminListGroupsForUserCommand.js +0 -2
- package/dist-es/commands/AdminListUserAuthEventsCommand.js +0 -2
- package/dist-es/commands/AdminRemoveUserFromGroupCommand.js +0 -2
- package/dist-es/commands/AdminResetUserPasswordCommand.js +0 -2
- package/dist-es/commands/AdminRespondToAuthChallengeCommand.js +0 -2
- package/dist-es/commands/AdminSetUserMFAPreferenceCommand.js +0 -2
- package/dist-es/commands/AdminSetUserPasswordCommand.js +0 -2
- package/dist-es/commands/AdminSetUserSettingsCommand.js +0 -2
- package/dist-es/commands/AdminUpdateAuthEventFeedbackCommand.js +0 -2
- package/dist-es/commands/AdminUpdateDeviceStatusCommand.js +0 -2
- package/dist-es/commands/AdminUpdateUserAttributesCommand.js +0 -2
- package/dist-es/commands/AdminUserGlobalSignOutCommand.js +0 -2
- package/dist-es/commands/CreateGroupCommand.js +0 -2
- package/dist-es/commands/CreateIdentityProviderCommand.js +0 -2
- package/dist-es/commands/CreateResourceServerCommand.js +0 -2
- package/dist-es/commands/CreateUserImportJobCommand.js +0 -2
- package/dist-es/commands/CreateUserPoolClientCommand.js +0 -2
- package/dist-es/commands/CreateUserPoolCommand.js +0 -2
- package/dist-es/commands/CreateUserPoolDomainCommand.js +0 -2
- package/dist-es/commands/DeleteGroupCommand.js +0 -2
- package/dist-es/commands/DeleteIdentityProviderCommand.js +0 -2
- package/dist-es/commands/DeleteResourceServerCommand.js +0 -2
- package/dist-es/commands/DeleteUserPoolClientCommand.js +0 -2
- package/dist-es/commands/DeleteUserPoolCommand.js +0 -2
- package/dist-es/commands/DeleteUserPoolDomainCommand.js +0 -2
- package/dist-es/commands/DescribeIdentityProviderCommand.js +0 -2
- package/dist-es/commands/DescribeResourceServerCommand.js +0 -2
- package/dist-es/commands/DescribeRiskConfigurationCommand.js +0 -2
- package/dist-es/commands/DescribeUserImportJobCommand.js +0 -2
- package/dist-es/commands/DescribeUserPoolClientCommand.js +0 -2
- package/dist-es/commands/DescribeUserPoolCommand.js +0 -2
- package/dist-es/commands/DescribeUserPoolDomainCommand.js +0 -2
- package/dist-es/commands/GetCSVHeaderCommand.js +0 -2
- package/dist-es/commands/GetGroupCommand.js +0 -2
- package/dist-es/commands/GetIdentityProviderByIdentifierCommand.js +0 -2
- package/dist-es/commands/GetLogDeliveryConfigurationCommand.js +0 -2
- package/dist-es/commands/GetSigningCertificateCommand.js +0 -2
- package/dist-es/commands/GetUICustomizationCommand.js +0 -2
- package/dist-es/commands/GetUserPoolMfaConfigCommand.js +0 -2
- package/dist-es/commands/ListGroupsCommand.js +0 -2
- package/dist-es/commands/ListIdentityProvidersCommand.js +0 -2
- package/dist-es/commands/ListResourceServersCommand.js +0 -2
- package/dist-es/commands/ListTagsForResourceCommand.js +0 -2
- package/dist-es/commands/ListUserImportJobsCommand.js +0 -2
- package/dist-es/commands/ListUserPoolClientsCommand.js +0 -2
- package/dist-es/commands/ListUserPoolsCommand.js +0 -2
- package/dist-es/commands/ListUsersCommand.js +0 -2
- package/dist-es/commands/ListUsersInGroupCommand.js +0 -2
- package/dist-es/commands/SetLogDeliveryConfigurationCommand.js +0 -2
- package/dist-es/commands/SetRiskConfigurationCommand.js +0 -2
- package/dist-es/commands/SetUICustomizationCommand.js +0 -2
- package/dist-es/commands/SetUserPoolMfaConfigCommand.js +0 -2
- package/dist-es/commands/StartUserImportJobCommand.js +0 -2
- package/dist-es/commands/StopUserImportJobCommand.js +0 -2
- package/dist-es/commands/TagResourceCommand.js +0 -2
- package/dist-es/commands/UntagResourceCommand.js +0 -2
- package/dist-es/commands/UpdateGroupCommand.js +0 -2
- package/dist-es/commands/UpdateIdentityProviderCommand.js +0 -2
- package/dist-es/commands/UpdateResourceServerCommand.js +0 -2
- package/dist-es/commands/UpdateUserPoolClientCommand.js +0 -2
- package/dist-es/commands/UpdateUserPoolCommand.js +0 -2
- package/dist-es/commands/UpdateUserPoolDomainCommand.js +0 -2
- package/dist-es/runtimeConfig.shared.js +16 -0
- package/dist-es/runtimeExtensions.js +3 -0
- package/dist-types/CognitoIdentityProviderClient.d.ts +13 -11
- package/dist-types/auth/httpAuthExtensionConfiguration.d.ts +29 -0
- package/dist-types/auth/httpAuthSchemeProvider.d.ts +61 -0
- package/dist-types/extensionConfiguration.d.ts +2 -1
- package/dist-types/runtimeConfig.browser.d.ts +13 -3
- package/dist-types/runtimeConfig.d.ts +12 -2
- package/dist-types/runtimeConfig.native.d.ts +14 -4
- package/dist-types/runtimeConfig.shared.d.ts +13 -0
- package/dist-types/ts3.4/CognitoIdentityProviderClient.d.ts +11 -9
- package/dist-types/ts3.4/auth/httpAuthExtensionConfiguration.d.ts +32 -0
- package/dist-types/ts3.4/auth/httpAuthSchemeProvider.d.ts +44 -0
- package/dist-types/ts3.4/extensionConfiguration.d.ts +3 -1
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +30 -5
- package/dist-types/ts3.4/runtimeConfig.d.ts +29 -4
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +33 -8
- package/dist-types/ts3.4/runtimeConfig.shared.d.ts +30 -0
- package/package.json +7 -7
|
@@ -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;
|