@adastradev/user-management-sdk
Advanced tools
Comparing version 1.0.3-beta.1 to 1.0.3-beta.2
import { ICognitoUserPoolLocator } from './ICognitoUserPoolLocator'; | ||
import * as AWS from 'aws-sdk'; | ||
import { CognitoUserSession } from 'amazon-cognito-identity-js'; | ||
import { GlobalConfigInstance } from 'aws-sdk/lib/config'; | ||
export declare function configureAwsProxy(awsConfig: GlobalConfigInstance): void; | ||
export declare class AuthManager { | ||
@@ -5,0 +7,0 @@ private locator; |
@@ -40,2 +40,17 @@ "use strict"; | ||
var amazon_cognito_identity_js_1 = require("amazon-cognito-identity-js"); | ||
var proxy = require("proxy-agent"); | ||
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 () { | ||
@@ -45,2 +60,4 @@ function AuthManager(locator, region) { | ||
this.region = region; | ||
// AWS module configuration | ||
configureAwsProxy(AWS.config); | ||
AWS.config.region = region; | ||
@@ -47,0 +64,0 @@ } |
{ | ||
"name": "@adastradev/user-management-sdk", | ||
"version": "1.0.3-beta.1", | ||
"version": "1.0.3-beta.2", | ||
"description": "Astra user management SDK for JavaScript in the browser and Node.js", | ||
@@ -30,3 +30,4 @@ "main": "dist/index.js", | ||
"aws-sdk": "^2.354.0", | ||
"axios": "^0.19.0-beta.1" | ||
"axios": "^0.19.0-beta.1", | ||
"proxy-agent": "^3.0.3" | ||
}, | ||
@@ -33,0 +34,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
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
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
55229
32
844
6
5
+ Addedproxy-agent@^3.0.3
+ Addedagent-base@4.2.14.3.0(transitive)
+ Addedast-types@0.16.1(transitive)
+ Addedbytes@3.1.2(transitive)
+ Addedco@4.6.0(transitive)
+ Addedcore-util-is@1.0.3(transitive)
+ Addeddata-uri-to-buffer@1.2.0(transitive)
+ Addeddebug@2.6.94.3.7(transitive)
+ Addeddeep-is@0.1.4(transitive)
+ Addeddegenerator@1.0.4(transitive)
+ Addeddepd@2.0.0(transitive)
+ Addedes6-promise@4.2.8(transitive)
+ Addedes6-promisify@5.0.0(transitive)
+ Addedescodegen@1.14.3(transitive)
+ Addedesprima@3.1.34.0.1(transitive)
+ Addedestraverse@4.3.0(transitive)
+ Addedesutils@2.0.3(transitive)
+ Addedextend@3.0.2(transitive)
+ Addedfast-levenshtein@2.0.6(transitive)
+ Addedfile-uri-to-path@1.0.0(transitive)
+ Addedftp@0.3.10(transitive)
+ Addedget-uri@2.0.4(transitive)
+ Addedhttp-errors@2.0.0(transitive)
+ Addedhttp-proxy-agent@2.1.0(transitive)
+ Addedhttps-proxy-agent@3.0.1(transitive)
+ Addediconv-lite@0.4.24(transitive)
+ Addedip@1.1.51.1.9(transitive)
+ Addedisarray@0.0.1(transitive)
+ Addedlevn@0.3.0(transitive)
+ Addedlru-cache@5.1.1(transitive)
+ Addedms@2.0.02.1.3(transitive)
+ Addednetmask@1.0.6(transitive)
+ Addedoptionator@0.8.3(transitive)
+ Addedpac-proxy-agent@3.0.1(transitive)
+ Addedpac-resolver@3.0.0(transitive)
+ Addedprelude-ls@1.1.2(transitive)
+ Addedprocess-nextick-args@2.0.1(transitive)
+ Addedproxy-agent@3.1.1(transitive)
+ Addedproxy-from-env@1.1.0(transitive)
+ Addedraw-body@2.5.2(transitive)
+ Addedreadable-stream@1.1.142.3.8(transitive)
+ Addedsafe-buffer@5.1.2(transitive)
+ Addedsafer-buffer@2.1.2(transitive)
+ Addedsetprototypeof@1.2.0(transitive)
+ Addedsmart-buffer@4.2.0(transitive)
+ Addedsocks@2.3.3(transitive)
+ Addedsocks-proxy-agent@4.0.2(transitive)
+ Addedsource-map@0.6.1(transitive)
+ Addedstatuses@2.0.1(transitive)
+ Addedstring_decoder@0.10.311.1.1(transitive)
+ Addedthunkify@2.1.2(transitive)
+ Addedtoidentifier@1.0.1(transitive)
+ Addedtslib@2.8.1(transitive)
+ Addedtype-check@0.3.2(transitive)
+ Addedunpipe@1.0.0(transitive)
+ Addedutil-deprecate@1.0.2(transitive)
+ Addedword-wrap@1.2.5(transitive)
+ Addedxregexp@2.0.0(transitive)
+ Addedyallist@3.1.1(transitive)