{"name":"@aws-sdk/token-providers","version":"3.772.0","description":"A collection of token providers","main":"./dist-cjs/index.js","module":"./dist-es/index.js","sideEffects":false,"scripts":{"build":"concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'","build:cjs":"node ../../scripts/compilation/inline token-providers","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4","clean":"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","test":"yarn g:vitest run","test:watch":"yarn g:vitest watch"},"keywords":["aws","token"],"author":{"name":"AWS SDK for JavaScript Team","url":"https://aws.amazon.com/javascript/"},"license":"Apache-2.0","dependencies":{"@aws-sdk/nested-clients":"3.772.0","@aws-sdk/types":"3.734.0","@smithy/property-provider":"^4.0.1","@smithy/shared-ini-file-loader":"^4.0.1","@smithy/types":"^4.1.0","tslib":"^2.6.2"},"devDependencies":{"@tsconfig/recommended":"1.0.1","@types/node":"^18.19.69","concurrently":"7.0.0","downlevel-dts":"0.10.1","rimraf":"3.0.2","typescript":"~5.2.2"},"types":"./dist-types/index.d.ts","engines":{"node":">=18.0.0"},"typesVersions":{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},"browser":{},"react-native":{},"homepage":"https://github.com/aws/aws-sdk-js-v3/tree/main/packages/token-providers","repository":{"type":"git","url":"git+https://github.com/aws/aws-sdk-js-v3.git","directory":"packages/token-providers"},"_id":"@aws-sdk/token-providers@3.772.0","bugs":{"url":"https://github.com/aws/aws-sdk-js-v3/issues"},"_nodeVersion":"18.20.6","_npmVersion":"10.9.2","dist":{"integrity":"sha512-d1Waa1vyebuokcAWYlkZdtFlciIgob7B39vPRmtxMObbGumJKiOy/qCe2/FB/72h1Ej9Ih32lwvbxUjORQWN4g==","shasum":"752fd0331c19fe28f94bbe9b6d90c59516976bdb","tarball":"http://registry-npm.ywwl.com/@aws-sdk/token-providers/download/@aws-sdk/token-providers-3.772.0.tgz","fileCount":34,"unpackedSize":36521,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCc+dvcU7e/D8lrjYDC3hiZX1r5eoEWbrytHBOuwRhzJwIgFd0iGC4ClDK89W4afCXMT2ZgkotHHkbXbZLeilqJ+bA="}],"size":10650,"noattachment":false,"key":"/@aws-sdk/token-providers/-/@aws-sdk/token-providers-3.772.0.tgz"},"_npmUser":{"name":"aws-sdk-bot","email":"aws-sdk-js-automation@amazon.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/token-providers_3.772.0_1742500724780_0.11263800216193487"},"_hasShrinkwrap":false,"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## 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":1742500724978,"maintainers":[{"name":"amzn-oss","email":"osa-3p@amazon.com"},{"name":"aws-sdk-bot","email":"aws-sdk-js-automation@amazon.com"},{"name":"trivikr-aws","email":"trivikr@amazon.com"},{"name":"mattsb42-aws","email":"bullocm@amazon.com"},{"name":"kuhe","email":"george.jing.fu+npm@gmail.com"},{"name":"siddsriv","email":"srivastava41099@gmail.com"},{"name":"sreeja_aws","email":"sreejamilkuri@gmail.com"}],"_cnpm_publish_time":1742500724978,"dist-tags":{"latest":"3.1164.0"}}