{"name":"@aws-sdk/client-sso-oidc","version":"3.731.1","author":{"url":"https://aws.amazon.com/javascript/","name":"AWS SDK for JavaScript Team"},"license":"Apache-2.0","_id":"@aws-sdk/client-sso-oidc@3.731.1","homepage":"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sso-oidc","bugs":{"url":"https://github.com/aws/aws-sdk-js-v3/issues"},"dist":{"shasum":"e8cc7b58153be9044a12909ac11d9a39c3e7a89e","tarball":"http://registry-npm.ywwl.com/@aws-sdk/client-sso-oidc/download/@aws-sdk/client-sso-oidc-3.731.1.tgz","fileCount":80,"integrity":"sha512-jli6vZ3U33L5AHkBqQmB5pO9+R+qfWxsnc1VOsYsNwWVrrR6kA7WS+N+r19BZGHE6Rzo/fWo0KsHH1fc9mGjaw==","signatures":[{"sig":"MEUCIF+uhAXvplu3kU2jLZ6RnEg/i4WtEIDr5cosRLmCj+1xAiEAzLLtIrO7QmoOF4J2NakDqfYN/fbEezln1j3csq14Uf4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":291361,"size":45156,"noattachment":false,"key":"/@aws-sdk/client-sso-oidc/-/@aws-sdk/client-sso-oidc-3.731.1.tgz"},"main":"./dist-cjs/index.js","types":"./dist-types/index.d.ts","module":"./dist-es/index.js","browser":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"engines":{"node":">=18.0.0"},"scripts":{"build":"concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'","clean":"rimraf ./dist-* && rimraf *.tsbuildinfo","build:es":"tsc -p tsconfig.es.json","build:cjs":"node ../../scripts/compilation/inline client-sso-oidc","build:types":"tsc -p tsconfig.types.json","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo sso-oidc","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4"},"_npmUser":{"name":"aws-sdk-bot","email":"aws-sdk-js-automation@amazon.com"},"repository":{"url":"git+https://github.com/aws/aws-sdk-js-v3.git","type":"git","directory":"clients/client-sso-oidc"},"_npmVersion":"10.7.0","description":"AWS SDK for JavaScript Sso Oidc Client for Node.js, Browser and React Native","directories":{},"sideEffects":false,"_nodeVersion":"18.20.3","dependencies":{"tslib":"^2.6.2","@smithy/core":"^3.0.0","@aws-sdk/core":"3.731.0","@smithy/types":"^4.0.0","@aws-sdk/types":"3.731.0","@smithy/hash-node":"^4.0.0","@smithy/util-utf8":"^4.0.0","@smithy/url-parser":"^4.0.0","@smithy/util-retry":"^4.0.0","@smithy/util-base64":"^4.0.0","@aws-crypto/sha256-js":"5.2.0","@smithy/protocol-http":"^5.0.0","@smithy/smithy-client":"^4.0.0","@smithy/util-endpoints":"^3.0.0","@aws-sdk/util-endpoints":"3.731.0","@smithy/config-resolver":"^4.0.0","@smithy/util-middleware":"^4.0.0","@smithy/middleware-retry":"^4.0.0","@smithy/middleware-serde":"^4.0.0","@smithy/middleware-stack":"^4.0.0","@smithy/node-http-handler":"^4.0.0","@aws-crypto/sha256-browser":"5.2.0","@aws-sdk/middleware-logger":"3.731.0","@smithy/fetch-http-handler":"^5.0.0","@smithy/invalid-dependency":"^4.0.0","@smithy/middleware-endpoint":"^4.0.0","@smithy/node-config-provider":"^4.0.0","@aws-sdk/util-user-agent-node":"3.731.0","@smithy/util-body-length-node":"^4.0.0","@aws-sdk/middleware-user-agent":"3.731.0","@aws-sdk/middleware-host-header":"3.731.0","@aws-sdk/region-config-resolver":"3.731.0","@smithy/util-defaults-mode-node":"^4.0.0","@aws-sdk/util-user-agent-browser":"3.731.0","@smithy/util-body-length-browser":"^4.0.0","@aws-sdk/credential-provider-node":"3.731.1","@smithy/middleware-content-length":"^4.0.0","@smithy/util-defaults-mode-browser":"^4.0.0","@aws-sdk/middleware-recursion-detection":"3.731.0"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},"typesVersions":{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},"_hasShrinkwrap":false,"devDependencies":{"rimraf":"3.0.2","typescript":"~5.2.2","@types/node":"^18.19.69","concurrently":"7.0.0","downlevel-dts":"0.10.1","@tsconfig/node18":"18.2.4"},"_npmOperationalInternal":{"tmp":"tmp/client-sso-oidc_3.731.1_1737181595515_0.6706457769290319","host":"s3://npm-registry-packages-npm-production"},"readme":"<!-- generated file, do not edit directly -->\n\n# @aws-sdk/client-sso-oidc\n\n## Description\n\nAWS SDK for JavaScript SSOOIDC Client for Node.js, Browser and React Native.\n\n<p>IAM Identity Center OpenID Connect (OIDC) is a web service that enables a client (such as CLI or a\nnative application) to register with IAM Identity Center. The service also enables the client to fetch the\nuser’s access token upon successful authentication and authorization with IAM Identity Center.</p>\n<p>\n<b>API namespaces</b>\n</p>\n<p>IAM Identity Center uses the <code>sso</code> and <code>identitystore</code> API namespaces. IAM Identity Center\nOpenID Connect uses the <code>sso-oidc</code> namespace.</p>\n<p>\n<b>Considerations for using this guide</b>\n</p>\n<p>Before you begin using this guide, we recommend that you first review the following\nimportant information about how the IAM Identity Center OIDC service works.</p>\n<ul>\n<li>\n<p>The IAM Identity Center OIDC service currently implements only the portions of the OAuth 2.0 Device\nAuthorization Grant standard (<a href=\"https://tools.ietf.org/html/rfc8628\">https://tools.ietf.org/html/rfc8628</a>) that are necessary to enable single\nsign-on authentication with the CLI. </p>\n</li>\n<li>\n<p>With older versions of the CLI, the service only emits OIDC access tokens, so to\nobtain a new token, users must explicitly re-authenticate. To access the OIDC flow that\nsupports token refresh and doesn’t require re-authentication, update to the latest CLI\nversion (1.27.10 for CLI V1 and 2.9.0 for CLI V2) with support for OIDC token refresh\nand configurable IAM Identity Center session durations. For more information, see <a href=\"https://docs.aws.amazon.com/singlesignon/latest/userguide/configure-user-session.html\">Configure Amazon Web Services access portal session duration </a>. </p>\n</li>\n<li>\n<p>The access tokens provided by this service grant access to all Amazon Web Services account\nentitlements assigned to an IAM Identity Center user, not just a particular application.</p>\n</li>\n<li>\n<p>The documentation in this guide does not describe the mechanism to convert the access\ntoken into Amazon Web Services Auth (“sigv4”) credentials for use with IAM-protected Amazon Web Services service\nendpoints. For more information, see <a href=\"https://docs.aws.amazon.com/singlesignon/latest/PortalAPIReference/API_GetRoleCredentials.html\">GetRoleCredentials</a> in the <i>IAM Identity Center Portal API Reference\nGuide</i>.</p>\n</li>\n</ul>\n<p>For general information about IAM Identity Center, see <a href=\"https://docs.aws.amazon.com/singlesignon/latest/userguide/what-is.html\">What is\nIAM Identity Center?</a> in the <i>IAM Identity Center User Guide</i>.</p>\n\n## Installing\n\nTo install this package, simply type add or install @aws-sdk/client-sso-oidc\nusing your favorite package manager:\n\n- `npm install @aws-sdk/client-sso-oidc`\n- `yarn add @aws-sdk/client-sso-oidc`\n- `pnpm add @aws-sdk/client-sso-oidc`\n\n## Getting Started\n\n### Import\n\nThe AWS SDK is modulized by clients and commands.\nTo send a request, you only need to import the `SSOOIDCClient` and\nthe commands you need, for example `CreateTokenCommand`:\n\n```js\n// ES5 example\nconst { SSOOIDCClient, CreateTokenCommand } = require(\"@aws-sdk/client-sso-oidc\");\n```\n\n```ts\n// ES6+ example\nimport { SSOOIDCClient, CreateTokenCommand } from \"@aws-sdk/client-sso-oidc\";\n```\n\n### Usage\n\nTo send a request, you:\n\n- Initiate client with configuration (e.g. credentials, region).\n- Initiate command with input parameters.\n- Call `send` operation on client with command object as input.\n- If you are using a custom http handler, you may call `destroy()` to close open connections.\n\n```js\n// a client can be shared by different commands.\nconst client = new SSOOIDCClient({ region: \"REGION\" });\n\nconst params = {\n  /** input parameters */\n};\nconst command = new CreateTokenCommand(params);\n```\n\n#### Async/await\n\nWe recommend using [await](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/await)\noperator to wait for the promise returned by send operation as follows:\n\n```js\n// async/await.\ntry {\n  const data = await client.send(command);\n  // process data.\n} catch (error) {\n  // error handling.\n} finally {\n  // finally.\n}\n```\n\nAsync-await is clean, concise, intuitive, easy to debug and has better error handling\nas compared to using Promise chains or callbacks.\n\n#### Promises\n\nYou can also use [Promise chaining](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_promises#chaining)\nto execute send operation.\n\n```js\nclient.send(command).then(\n  (data) => {\n    // process data.\n  },\n  (error) => {\n    // error handling.\n  }\n);\n```\n\nPromises can also be called using `.catch()` and `.finally()` as follows:\n\n```js\nclient\n  .send(command)\n  .then((data) => {\n    // process data.\n  })\n  .catch((error) => {\n    // error handling.\n  })\n  .finally(() => {\n    // finally.\n  });\n```\n\n#### Callbacks\n\nWe do not recommend using callbacks because of [callback hell](http://callbackhell.com/),\nbut they are supported by the send operation.\n\n```js\n// callbacks.\nclient.send(command, (err, data) => {\n  // process err and data.\n});\n```\n\n#### v2 compatible style\n\nThe client can also send requests using v2 compatible style.\nHowever, it results in a bigger bundle size and may be dropped in next major version. More details in the blog post\non [modular packages in AWS SDK for JavaScript](https://aws.amazon.com/blogs/developer/modular-packages-in-aws-sdk-for-javascript/)\n\n```ts\nimport * as AWS from \"@aws-sdk/client-sso-oidc\";\nconst client = new AWS.SSOOIDC({ region: \"REGION\" });\n\n// async/await.\ntry {\n  const data = await client.createToken(params);\n  // process data.\n} catch (error) {\n  // error handling.\n}\n\n// Promises.\nclient\n  .createToken(params)\n  .then((data) => {\n    // process data.\n  })\n  .catch((error) => {\n    // error handling.\n  });\n\n// callbacks.\nclient.createToken(params, (err, data) => {\n  // process err and data.\n});\n```\n\n### Troubleshooting\n\nWhen the service returns an exception, the error will include the exception information,\nas well as response metadata (e.g. request id).\n\n```js\ntry {\n  const data = await client.send(command);\n  // process data.\n} catch (error) {\n  const { requestId, cfId, extendedRequestId } = error.$metadata;\n  console.log({ requestId, cfId, extendedRequestId });\n  /**\n   * The keys within exceptions are also parsed.\n   * You can access them by specifying exception names:\n   * if (error.name === 'SomeServiceException') {\n   *     const value = error.specialKeyInException;\n   * }\n   */\n}\n```\n\n## Getting Help\n\nPlease use these community resources for getting help.\nWe use the GitHub issues for tracking bugs and feature requests, but have limited bandwidth to address them.\n\n- Visit [Developer Guide](https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/welcome.html)\n  or [API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/index.html).\n- Check out the blog posts tagged with [`aws-sdk-js`](https://aws.amazon.com/blogs/developer/tag/aws-sdk-js/)\n  on AWS Developer Blog.\n- Ask a question on [StackOverflow](https://stackoverflow.com/questions/tagged/aws-sdk-js) and tag it with `aws-sdk-js`.\n- Join the AWS JavaScript community on [gitter](https://gitter.im/aws/aws-sdk-js-v3).\n- If it turns out that you may have found a bug, please [open an issue](https://github.com/aws/aws-sdk-js-v3/issues/new/choose).\n\nTo test your universal JavaScript code in Node.js, browser and react-native environments,\nvisit our [code samples repo](https://github.com/aws-samples/aws-sdk-js-tests).\n\n## Contributing\n\nThis client code is generated automatically. Any modifications will be overwritten the next time the `@aws-sdk/client-sso-oidc` package is updated.\nTo contribute to client you can check our [generate clients scripts](https://github.com/aws/aws-sdk-js-v3/tree/main/scripts/generate-clients).\n\n## License\n\nThis SDK is distributed under the\n[Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0),\nsee LICENSE for more information.\n\n## Client Commands (Operations List)\n\n<details>\n<summary>\nCreateToken\n</summary>\n\n[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/sso-oidc/command/CreateTokenCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-sso-oidc/Interface/CreateTokenCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-sso-oidc/Interface/CreateTokenCommandOutput/)\n\n</details>\n<details>\n<summary>\nCreateTokenWithIAM\n</summary>\n\n[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/sso-oidc/command/CreateTokenWithIAMCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-sso-oidc/Interface/CreateTokenWithIAMCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-sso-oidc/Interface/CreateTokenWithIAMCommandOutput/)\n\n</details>\n<details>\n<summary>\nRegisterClient\n</summary>\n\n[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/sso-oidc/command/RegisterClientCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-sso-oidc/Interface/RegisterClientCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-sso-oidc/Interface/RegisterClientCommandOutput/)\n\n</details>\n<details>\n<summary>\nStartDeviceAuthorization\n</summary>\n\n[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/sso-oidc/command/StartDeviceAuthorizationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-sso-oidc/Interface/StartDeviceAuthorizationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-sso-oidc/Interface/StartDeviceAuthorizationCommandOutput/)\n\n</details>\n","publish_time":1737181595719,"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":1737181595719,"dist-tags":{"alpha":"1.0.0-alpha.24","beta":"1.0.0-beta.5","gamma":"1.0.0-gamma.11","latest":"3.1163.0","rc":"3.5.1-rc.0"}}