@adastradev/user-management-sdk
Advanced tools
Comparing version 3.0.1 to 4.0.0-beta.1653511514034
import { ICognitoUserPoolLocator } from './ICognitoUserPoolLocator'; | ||
import { CognitoUserSession } from 'amazon-cognito-identity-js'; | ||
import { GlobalConfigInstance } from 'aws-sdk/lib/config'; | ||
import { CognitoIdentityCredentials } from 'aws-sdk/global'; | ||
export declare function configureAwsProxy(awsConfig: GlobalConfigInstance): void; | ||
export declare class AuthManager { | ||
@@ -7,0 +5,0 @@ lastRefresh: number; |
@@ -39,22 +39,7 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.AuthManager = exports.configureAwsProxy = void 0; | ||
exports.AuthManager = void 0; | ||
var AWS = require("aws-sdk/global"); | ||
var amazon_cognito_identity_js_1 = require("amazon-cognito-identity-js"); | ||
var proxy = require('proxy-agent'); | ||
// tslint:disable-next-line:no-duplicate-imports | ||
var global_1 = require("aws-sdk/global"); | ||
function configureAwsProxy(awsConfig) { | ||
if (process.env.HTTP_PROXY || process.env.HTTPS_PROXY) { | ||
// TODO: does AWS support multiple proxy protocols simultaneously (HTTP and HTTPS proxy) | ||
// For now, this prefers HTTPS over HTTP proxy protocol for HTTPS requests | ||
var proxyUri = process.env.HTTP_PROXY; | ||
if (proxyUri === undefined) { | ||
proxyUri = process.env.HTTPS_PROXY; | ||
} | ||
awsConfig.update({ | ||
httpOptions: { agent: proxy(proxyUri) } | ||
}); | ||
} | ||
} | ||
exports.configureAwsProxy = configureAwsProxy; | ||
var AuthManager = /** @class */ (function () { | ||
@@ -66,3 +51,2 @@ function AuthManager(locator, region) { | ||
// AWS module configuration | ||
configureAwsProxy(AWS.config); | ||
AWS.config.region = region; | ||
@@ -69,0 +53,0 @@ } |
{ | ||
"name": "@adastradev/user-management-sdk", | ||
"version": "3.0.1", | ||
"version": "4.0.0-beta.1653511514034", | ||
"description": "Astra user management SDK for JavaScript in the browser and Node.js", | ||
@@ -36,5 +36,4 @@ "main": "dist/index.js", | ||
"amazon-cognito-identity-js": "^4.6.3", | ||
"axios": "^0.25.0", | ||
"node-fetch": "^2.6.7", | ||
"proxy-agent": "^5.0.0" | ||
"axios": "^0.26.0", | ||
"node-fetch": "^2.6.7" | ||
}, | ||
@@ -41,0 +40,0 @@ "devDependencies": { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 instances in 1 package
5
4
45231
579
1
- Removedproxy-agent@^5.0.0
- Removed@tootallnate/once@1.1.2(transitive)
- Removedacorn@8.14.0(transitive)
- Removedacorn-walk@8.3.4(transitive)
- Removedagent-base@6.0.2(transitive)
- Removedast-types@0.13.4(transitive)
- Removedaxios@0.25.0(transitive)
- Removedbytes@3.1.2(transitive)
- Removedcore-util-is@1.0.3(transitive)
- Removeddata-uri-to-buffer@3.0.1(transitive)
- Removeddebug@4.4.0(transitive)
- Removeddeep-is@0.1.4(transitive)
- Removeddegenerator@3.0.4(transitive)
- Removeddepd@2.0.0(transitive)
- Removedescodegen@1.14.3(transitive)
- Removedesprima@4.0.1(transitive)
- Removedestraverse@4.3.0(transitive)
- Removedesutils@2.0.3(transitive)
- Removedfast-levenshtein@2.0.6(transitive)
- Removedfile-uri-to-path@2.0.0(transitive)
- Removedfs-extra@8.1.0(transitive)
- Removedftp@0.3.10(transitive)
- Removedget-uri@3.0.2(transitive)
- Removedgraceful-fs@4.2.11(transitive)
- Removedhttp-errors@2.0.0(transitive)
- Removedhttp-proxy-agent@4.0.1(transitive)
- Removedhttps-proxy-agent@5.0.1(transitive)
- Removediconv-lite@0.4.24(transitive)
- Removedinherits@2.0.4(transitive)
- Removedip@1.1.9(transitive)
- Removedip-address@9.0.5(transitive)
- Removedisarray@0.0.1(transitive)
- Removedjsbn@1.1.0(transitive)
- Removedjsonfile@4.0.0(transitive)
- Removedlevn@0.3.0(transitive)
- Removedlru-cache@5.1.1(transitive)
- Removedms@2.1.3(transitive)
- Removednetmask@2.0.2(transitive)
- Removedoptionator@0.8.3(transitive)
- Removedpac-proxy-agent@5.0.0(transitive)
- Removedpac-resolver@5.0.1(transitive)
- Removedprelude-ls@1.1.2(transitive)
- Removedproxy-agent@5.0.0(transitive)
- Removedproxy-from-env@1.1.0(transitive)
- Removedraw-body@2.5.2(transitive)
- Removedreadable-stream@1.1.14(transitive)
- Removedsafer-buffer@2.1.2(transitive)
- Removedsetprototypeof@1.2.0(transitive)
- Removedsmart-buffer@4.2.0(transitive)
- Removedsocks@2.8.3(transitive)
- Removedsocks-proxy-agent@5.0.1(transitive)
- Removedsource-map@0.6.1(transitive)
- Removedsprintf-js@1.1.3(transitive)
- Removedstatuses@2.0.1(transitive)
- Removedstring_decoder@0.10.31(transitive)
- Removedtoidentifier@1.0.1(transitive)
- Removedtslib@2.8.1(transitive)
- Removedtype-check@0.3.2(transitive)
- Removeduniversalify@0.1.2(transitive)
- Removedunpipe@1.0.0(transitive)
- Removedvm2@3.9.19(transitive)
- Removedword-wrap@1.2.5(transitive)
- Removedxregexp@2.0.0(transitive)
- Removedyallist@3.1.1(transitive)
Updatedaxios@^0.26.0