{"_id":"@aws-sdk/token-providers@3.1163.0","bugs":{"url":"https://github.com/aws/aws-sdk-js-v3/issues"},"dist":{"shasum":"86aaefbdaee68f99fb3d566e8f5db61d70a979c2","tarball":"http://registry-npm.ywwl.com/@aws-sdk/token-providers/download/@aws-sdk/token-providers-3.1163.0.tgz","fileCount":37,"integrity":"sha512-yD7YaHQ2l+cWRSHzQan5ra7t7iLYUkYOWoxoAnfB8Qfa0ba9N3KrUr29yG1A2Gq/CZsBQmzJ3Hzwz1xSelttdw==","signatures":[{"sig":"MEUCIQD+qQfAaNyAE4k9E+nX3P+6x4odLYY/g/qXnaC5bYbdjAIgLzWnCNryZpHrEfqIN+m+8T5i6FineYN2LrZisows678=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDq+UgEwWsriShKJZCVB1rbS6bJxtFf68luQ5Yf/QgLdwIhALNJtSd114/hRr7WyWY+JGt8Zk1oSolcf7YF1BCMTdDq"}],"unpackedSize":39603,"size":10171,"noattachment":false,"key":"/@aws-sdk/token-providers/-/@aws-sdk/token-providers-3.1163.0.tgz"},"main":"./dist-cjs/index.js","name":"@aws-sdk/token-providers","types":"./dist-types/index.d.ts","author":{"url":"https://aws.amazon.com/sdk-for-javascript/","name":"AWS SDK for JavaScript Team"},"module":"./dist-es/index.js","browser":{},"engines":{"node":">=20.0.0"},"license":"Apache-2.0","scripts":{"test":"yarn g:vitest run","build":"concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs","clean":"premove dist-cjs dist-es dist-types","build:es":"premove dist-es && tsc -p tsconfig.es.json","build:cjs":"node ../../scripts/compilation/inline","test:watch":"yarn g:vitest watch","build:types":"premove dist-types && tsc -p tsconfig.types.json","extract:docs":"api-extractor run --local","test:integration":"yarn g:vitest run -c vitest.config.integ.mts","build:include:deps":"yarn g:turbo run build -F=\"$npm_package_name\"","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4","test:integration:watch":"yarn g:vitest watch -c vitest.config.integ.mts"},"version":"3.1163.0","_npmUser":{"name":"aws-sdk-bot","email":"aws-sdk-js-automation@amazon.com"},"homepage":"https://github.com/aws/aws-sdk-js-v3/tree/main/packages/token-providers","keywords":["aws","token"],"repository":{"url":"git+https://github.com/aws/aws-sdk-js-v3.git","type":"git","directory":"packages/token-providers"},"_npmVersion":"11.21.1","description":"A collection of token providers","directories":{},"maintainers":[{"name":"amzn-oss","email":"osa-3p@amazon.com"},{"name":"aws-sdk-bot","email":"aws-sdk-js-automation@amazon.com"}],"sideEffects":false,"_nodeVersion":"24.22.2","dependencies":{"tslib":"^2.6.2","@smithy/core":"^3.38.0","@aws-sdk/core":"^3.980.0","@smithy/types":"^4.19.0","@aws-sdk/types":"^3.975.0","@aws-sdk/nested-clients":"^3.998.0"},"react-native":{},"typesVersions":{"<4.5":{"dist-types/*":["dist-types/ts3.4/*"]}},"_hasShrinkwrap":false,"devDependencies":{"premove":"4.0.0","typescript":"~7.0.2","@types/node":"^20.14.8","concurrently":"7.0.0","downlevel-dts":"0.10.1","@tsconfig/recommended":"1.0.1"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/token-providers_3.1163.0_1793908278970_0.44375850212037093"},"readme":"# @aws-sdk/token-providers\n\n[![NPM version](https://img.shields.io/npm/v/@aws-sdk/token-providers/latest.svg)](https://www.npmjs.com/package/@aws-sdk/token-providers)\n[![NPM downloads](https://img.shields.io/npm/dm/@aws-sdk/token-providers.svg)](https://www.npmjs.com/package/@aws-sdk/token-providers)\n\nA collection of all token providers. The token providers should be used when the authorization\ntype is going to be token based. For example, the `bearer` authorization type set using\n[httpBearerAuth trait][http-bearer-auth-trait] in Smithy.\n\n## Static Token Provider\n\n```ts\nimport { fromStatic } from \"@aws-sdk/token-providers\";\n\nconst token = { token: \"TOKEN\" };\nconst staticTokenProvider = fromStatic(token);\n\nconst staticToken = await staticTokenProvider(); // returns { token: \"TOKEN\" }\n```\n\n## SSO Token Provider\n\n```ts\nimport { fromSso } from \"@aws-sdk/token-providers\";\n\n// returns token from SSO token cache or ssoOidc.createToken() call.\nconst ssoToken = await fromSso();\n```\n\n## Env Token Provider with Signing Name\n\n```ts\nimport { fromEnvSigningName } from \"@aws-sdk/token-providers\";\n\n// returns token from environment, where token's key is based on signing name.\nconst envSigningNameToken = await fromEnvSigningName({ signingName: \"signing name\" });\n```\n\n## Token Provider Chain\n\n```ts\nimport { nodeProvider } from \"@aws-sdk/token-providers\";\n\n// returns token from default providers.\nconst token = await nodeProvider();\n```\n\n[http-bearer-auth-trait]: https://smithy.io/2.0/spec/authentication-traits.html#smithy-api-httpbearerauth-trait\n\n---\n\n### Development\n\nThis package contains a minimal copy of the SSO OIDC client, instead of relying on the full client, which\nwould cause a circular dependency.\n\nWhen regenerating the bundled version of the SSO OIDC client, run the esbuild.js script and then make the following changes:\n\n- Remove any dependency of the generated client on the credential chain such that it would create\n  a circular dependency back to this package. Because we only need the `CreateTokenCommand`, the client, and this command's\n  associated `Exception`s, it is possible to remove auth dependencies.\n- Ensure all required packages are declared in the `package.json` of token-providers.\n","publish_time":1793908279090,"_cnpm_publish_time":1793908279090,"dist-tags":{"latest":"3.1164.0"}}