@aws-sdk/token-providers
Advanced tools
Comparing version 3.387.0 to 3.388.0
"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. |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
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
225660
4845
54
35
1
+ Added@aws-crypto/sha256-js@3.0.0
+ Added@smithy/hash-node@^2.0.2
+ Added@smithy/protocol-http@^2.0.2
+ Added@smithy/smithy-client@^2.0.2
+ Added@smithy/url-parser@^2.0.2
+ Added@smithy/util-base64@^2.0.0
+ Added@smithy/util-retry@^2.0.0
+ Added@smithy/util-utf8@^2.0.0
+ Added@aws-crypto/ie11-detection@3.0.0(transitive)
+ Added@aws-crypto/sha256-browser@3.0.0(transitive)
+ Added@aws-crypto/sha256-js@3.0.0(transitive)
+ Added@aws-crypto/supports-web-crypto@3.0.0(transitive)
+ Added@aws-crypto/util@3.0.0(transitive)
+ Added@aws-sdk/middleware-host-header@3.387.0(transitive)
+ Added@aws-sdk/middleware-logger@3.387.0(transitive)
+ Added@aws-sdk/middleware-recursion-detection@3.387.0(transitive)
+ Added@aws-sdk/middleware-user-agent@3.387.0(transitive)
+ Added@aws-sdk/util-endpoints@3.387.0(transitive)
+ Added@aws-sdk/util-locate-window@3.693.0(transitive)
+ Added@aws-sdk/util-user-agent-browser@3.387.0(transitive)
+ Added@aws-sdk/util-user-agent-node@3.387.0(transitive)
+ Added@aws-sdk/util-utf8-browser@3.259.0(transitive)
+ Added@smithy/abort-controller@2.2.0(transitive)
+ Added@smithy/config-resolver@2.2.0(transitive)
+ Added@smithy/credential-provider-imds@2.3.0(transitive)
+ Added@smithy/fetch-http-handler@2.5.0(transitive)
+ Added@smithy/hash-node@2.2.0(transitive)
+ Added@smithy/invalid-dependency@2.2.0(transitive)
+ Added@smithy/is-array-buffer@2.2.0(transitive)
+ Added@smithy/middleware-content-length@2.2.0(transitive)
+ Added@smithy/middleware-endpoint@2.5.1(transitive)
+ Added@smithy/middleware-retry@2.3.1(transitive)
+ Added@smithy/middleware-serde@2.3.0(transitive)
+ Added@smithy/middleware-stack@2.2.0(transitive)
+ Added@smithy/node-config-provider@2.3.0(transitive)
+ Added@smithy/node-http-handler@2.5.0(transitive)
+ Added@smithy/protocol-http@2.0.53.3.0(transitive)
+ Added@smithy/querystring-builder@2.2.0(transitive)
+ Added@smithy/querystring-parser@2.2.0(transitive)
+ Added@smithy/service-error-classification@2.1.5(transitive)
+ Added@smithy/smithy-client@2.5.1(transitive)
+ Added@smithy/url-parser@2.2.0(transitive)
+ Added@smithy/util-base64@2.3.0(transitive)
+ Added@smithy/util-body-length-browser@2.2.0(transitive)
+ Added@smithy/util-body-length-node@2.3.0(transitive)
+ Added@smithy/util-buffer-from@2.2.0(transitive)
+ Added@smithy/util-config-provider@2.3.0(transitive)
+ Added@smithy/util-defaults-mode-browser@2.2.1(transitive)
+ Added@smithy/util-defaults-mode-node@2.3.1(transitive)
+ Added@smithy/util-hex-encoding@2.2.0(transitive)
+ Added@smithy/util-middleware@2.2.0(transitive)
+ Added@smithy/util-retry@2.2.0(transitive)
+ Added@smithy/util-stream@2.2.0(transitive)
+ Added@smithy/util-uri-escape@2.2.0(transitive)
+ Added@smithy/util-utf8@2.3.0(transitive)
+ Addedbowser@2.11.0(transitive)
+ Addedtslib@1.14.1(transitive)
+ Addeduuid@9.0.1(transitive)