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

@aws-sdk/token-providers

Package Overview
Dependencies
Maintainers
5
Versions
190
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aws-sdk/token-providers - npm Package Compare versions

Comparing version 3.387.0 to 3.388.0

dist-cjs/bundle/client-sso-oidc-browser.js

4

dist-cjs/getNewSsoOidcToken.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getNewSsoOidcToken = void 0;
const dist_node_1 = require("./client-sso-oidc-bundle/dist-node");
const client_sso_oidc_node_1 = require("./bundle/client-sso-oidc-node");
const getSsoOidcClient_1 = require("./getSsoOidcClient");
const getNewSsoOidcToken = (ssoToken, ssoRegion) => {
const ssoOidcClient = (0, getSsoOidcClient_1.getSsoOidcClient)(ssoRegion);
return ssoOidcClient.send(new dist_node_1.CreateTokenCommand({
return ssoOidcClient.send(new client_sso_oidc_node_1.CreateTokenCommand({
clientId: ssoToken.clientId,

@@ -10,0 +10,0 @@ clientSecret: ssoToken.clientSecret,

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getSsoOidcClient = void 0;
const dist_node_1 = require("./client-sso-oidc-bundle/dist-node");
const client_sso_oidc_node_1 = require("./bundle/client-sso-oidc-node");
const ssoOidcClientsHash = {};

@@ -10,3 +10,3 @@ const getSsoOidcClient = (ssoRegion) => {

}
const ssoOidcClient = new dist_node_1.SSOOIDCClient({ region: ssoRegion });
const ssoOidcClient = new client_sso_oidc_node_1.SSOOIDCClient({ region: ssoRegion });
ssoOidcClientsHash[ssoRegion] = ssoOidcClient;

@@ -13,0 +13,0 @@ return ssoOidcClient;

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
tslib_1.__exportStar(require("./client-sso-oidc-bundle/dist-node"), exports);
tslib_1.__exportStar(require("./bundle/client-sso-oidc-node"), exports);
tslib_1.__exportStar(require("./fromSso"), exports);
tslib_1.__exportStar(require("./fromStatic"), exports);
tslib_1.__exportStar(require("./nodeProvider"), exports);

@@ -1,2 +0,2 @@

import { CreateTokenCommand } from "./client-sso-oidc-bundle/dist-node";
import { CreateTokenCommand } from "./bundle/client-sso-oidc-node";
import { getSsoOidcClient } from "./getSsoOidcClient";

@@ -3,0 +3,0 @@ export const getNewSsoOidcToken = (ssoToken, ssoRegion) => {

@@ -1,2 +0,2 @@

import { SSOOIDCClient } from "./client-sso-oidc-bundle/dist-node";
import { SSOOIDCClient } from "./bundle/client-sso-oidc-node";
const ssoOidcClientsHash = {};

@@ -3,0 +3,0 @@ export const getSsoOidcClient = (ssoRegion) => {

@@ -1,4 +0,4 @@

export * from "./client-sso-oidc-bundle/dist-node";
export * from "./bundle/client-sso-oidc-node";
export * from "./fromSso";
export * from "./fromStatic";
export * from "./nodeProvider";

@@ -1,4 +0,4 @@

export * from "./client-sso-oidc-bundle/dist-node";
export * from "./bundle/client-sso-oidc-node";
export * from "./fromSso";
export * from "./fromStatic";
export * from "./nodeProvider";

@@ -1,4 +0,4 @@

export * from "./client-sso-oidc-bundle/dist-node";
export * from "./bundle/client-sso-oidc-node";
export * from "./fromSso";
export * from "./fromStatic";
export * from "./nodeProvider";
{
"name": "@aws-sdk/token-providers",
"version": "3.387.0",
"version": "3.388.0",
"description": "A collection of token providers",

@@ -9,4 +9,4 @@ "main": "./dist-cjs/index.js",

"scripts": {
"build:client-dist": "node ./scripts/esbuild",
"build": "yarn build:client-dist && concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
"build:client-bundle": "node ./scripts/esbuild",
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
"build:cjs": "tsc -p tsconfig.cjs.json",

@@ -31,6 +31,36 @@ "build:es": "tsc -p tsconfig.es.json",

"dependencies": {
"@aws-crypto/sha256-browser": "3.0.0",
"@aws-crypto/sha256-js": "3.0.0",
"@aws-sdk/middleware-host-header": "3.387.0",
"@aws-sdk/middleware-logger": "3.387.0",
"@aws-sdk/middleware-recursion-detection": "3.387.0",
"@aws-sdk/middleware-user-agent": "3.387.0",
"@aws-sdk/types": "3.387.0",
"@aws-sdk/util-endpoints": "3.387.0",
"@aws-sdk/util-user-agent-browser": "3.387.0",
"@aws-sdk/util-user-agent-node": "3.387.0",
"@smithy/config-resolver": "^2.0.2",
"@smithy/fetch-http-handler": "^2.0.2",
"@smithy/hash-node": "^2.0.2",
"@smithy/invalid-dependency": "^2.0.2",
"@smithy/middleware-content-length": "^2.0.2",
"@smithy/middleware-endpoint": "^2.0.2",
"@smithy/middleware-retry": "^2.0.2",
"@smithy/middleware-serde": "^2.0.2",
"@smithy/middleware-stack": "^2.0.0",
"@smithy/node-config-provider": "^2.0.2",
"@smithy/node-http-handler": "^2.0.2",
"@smithy/property-provider": "^2.0.0",
"@smithy/protocol-http": "^2.0.2",
"@smithy/shared-ini-file-loader": "^2.0.0",
"@smithy/smithy-client": "^2.0.2",
"@smithy/types": "^2.1.0",
"@smithy/url-parser": "^2.0.2",
"@smithy/util-base64": "^2.0.0",
"@smithy/util-body-length-browser": "^2.0.0",
"@smithy/util-body-length-node": "^2.0.0",
"@smithy/util-defaults-mode-browser": "^2.0.2",
"@smithy/util-defaults-mode-node": "^2.0.2",
"@smithy/util-retry": "^2.0.0",
"@smithy/util-utf8": "^2.0.0",
"tslib": "^2.5.0"

@@ -62,6 +92,6 @@ },

"browser": {
"./dist-es/client-sso-oidc-bundle/dist-node": "./dist-es/client-sso-oidc-bundle/dist-browser"
"./dist-es/bundle/client-sso-oidc-node": "./dist-es/bundle/client-sso-oidc-browser"
},
"react-native": {
"./dist-es/client-sso-oidc-bundle/dist-node": "./dist-es/client-sso-oidc-bundle/dist-browser"
"./dist-es/bundle/client-sso-oidc-node": "./dist-es/bundle/client-sso-oidc-browser"
},

@@ -68,0 +98,0 @@ "homepage": "https://github.com/aws/aws-sdk-js-v3/tree/main/packages/token-providers",

@@ -13,3 +13,3 @@ # @aws-sdk/token-providers

```ts
import { fromStatic } from "@aws-sdk/token-providers"
import { fromStatic } from "@aws-sdk/token-providers";

@@ -25,3 +25,3 @@ const token = { token: "TOKEN" };

```ts
import { fromSso } from "@aws-sdk/token-providers"
import { fromSso } from "@aws-sdk/token-providers";

@@ -35,3 +35,3 @@ // returns token from SSO token cache or ssoOidc.createToken() call.

```ts
import { nodeProvider } from "@aws-sdk/token-providers"
import { nodeProvider } from "@aws-sdk/token-providers";

@@ -43,1 +43,15 @@ // returns token from default providers.

[http-bearer-auth-trait]: https://smithy.io/2.0/spec/authentication-traits.html#smithy-api-httpbearerauth-trait
---
### Development
This package contains a minimal copy of the SSO OIDC client, instead of relying on the full client, which
would cause a circular dependency.
When regenerating the bundled version of the SSO OIDC client, run the esbuild.js script and then make the following changes:
- Remove any dependency of the generated client on the credential chain such that it would create
a circular dependency back to this package. Because we only need the `CreateTokenCommand`, the client, and this command's
associated `Exception`s, it is possible to remove auth dependencies.
- Ensure all required packages are declared in the `package.json` of token-providers.
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