Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@adastradev/user-management-sdk

Package Overview
Dependencies
Maintainers
39
Versions
122
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@adastradev/user-management-sdk - npm Package Compare versions

Comparing version 4.0.0-beta.1676655854634 to 4.0.0-beta.1677171773821

76

dist/CognitoUserPoolLocatorUserManagementByTenantId.js

@@ -41,2 +41,3 @@ "use strict";

var UserManagementApi_1 = require("./UserManagementApi");
// import Logger from '@adastradev/astra-logger';
/**

@@ -51,33 +52,48 @@ * Locates a cognito user pool appropriate for a given tenantId via REST lookup against the

CognitoUserPoolLocatorUserManagementByTenantId.prototype.getPoolForTenantId = function (tenantId) {
return new Promise(
// tslint:disable-next-line:ter-prefer-arrow-callback
function (resolve, reject) {
return __awaiter(this, void 0, void 0, function () {
var api, response, result, error_1;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
api = new UserManagementApi_1.UserManagementApi(process.env.USER_MANAGEMENT_URI, this.region, { type: 'None' });
_a.label = 1;
case 1:
_a.trys.push([1, 3, , 4]);
return [4 /*yield*/, api.getUserPool(tenantId)];
case 2:
response = _a.sent();
result = {
ClientId: response.data.cognito_app_client_id,
IdentityPoolId: response.data.cognito_identity_pool_id,
UserPoolId: response.data.cognito_user_pool_id
};
resolve(result);
return [3 /*break*/, 4];
case 3:
error_1 = _a.sent();
reject(error_1);
return [3 /*break*/, 4];
case 4: return [2 /*return*/];
}
});
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
// const { accessKeyId, secretAccessKey, sessionToken, expired, expireTime, needsRefresh } =
// await AWS.config.credentialProvider.resolvePromise();
// Logger.debug(
// `automation: resolved IAM credentials, expireTime: ${expireTime} expired: ${expired} needsRefresh: ${needsRefresh()}`
// );
// const adminCredentials: IAMCredentialsWithSession = {
// type: 'IAM',
// accessKeyId,
// secretAccessKey,
// sessionToken
// };
return [2 /*return*/, new Promise(
// tslint:disable-next-line:ter-prefer-arrow-callback
function (resolve, reject) {
return __awaiter(this, void 0, void 0, function () {
var api, response, result, error_1;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
api = new UserManagementApi_1.UserManagementApi(process.env.USER_MANAGEMENT_URI, this.region, { type: 'IAM' });
_a.label = 1;
case 1:
_a.trys.push([1, 3, , 4]);
return [4 /*yield*/, api.getUserPool(tenantId)];
case 2:
response = _a.sent();
result = {
ClientId: response.data.cognito_app_client_id,
IdentityPoolId: response.data.cognito_identity_pool_id,
UserPoolId: response.data.cognito_user_pool_id
};
resolve(result);
return [3 /*break*/, 4];
case 3:
error_1 = _a.sent();
reject(error_1);
return [3 /*break*/, 4];
case 4: return [2 /*return*/];
}
});
});
}.bind(this))];
});
}.bind(this));
});
};

@@ -84,0 +100,0 @@ return CognitoUserPoolLocatorUserManagementByTenantId;

@@ -13,2 +13,5 @@ "use strict";

// });
// export interface IAMCredentialsWithSession extends IAMCredentials {
// sessionToken: string;
// }
var UserManagementApi = /** @class */ (function () {

@@ -15,0 +18,0 @@ function UserManagementApi(serviceEndpointUri, region, credentials, apigClient) {

{
"name": "@adastradev/user-management-sdk",
"version": "4.0.0-beta.1676655854634",
"version": "4.0.0-beta.1677171773821",
"description": "Astra user management SDK for JavaScript in the browser and Node.js",

@@ -33,2 +33,3 @@ "main": "dist/index.js",

"dependencies": {
"@adastradev/astra-logger": "^1.4.7",
"@adastradev/aws-api-gateway-client": "^1.0.6",

@@ -35,0 +36,0 @@ "@adastradev/serverless-discovery-sdk": "^2.2.6",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc