{"_id":"@aws-sdk/client-cognito-identity-node","_rev":"19-c3ea7cc1bb3a3e7cb6494984e6cbeda6","name":"@aws-sdk/client-cognito-identity-node","dist-tags":{"latest":"0.1.0-preview.2","preview":"0.1.0-preview.6"},"versions":{"0.1.0-preview.2":{"name":"@aws-sdk/client-cognito-identity-node","version":"0.1.0-preview.2","author":{"url":"https://aws.amazon.com/javascript/","name":"AWS SDK for JavaScript Team"},"license":"Apache-2.0","_id":"@aws-sdk/client-cognito-identity-node@0.1.0-preview.2","maintainers":[{"name":"trivikr-aws","email":"trivikr@amazon.com"},{"name":"aws-sdk-bot","email":"aws-sdk-js@amazon.com"},{"name":"zheallan","email":"zheallan@amazon.com"},{"name":"amzn-oss","email":"osa-3p@amazon.com"}],"dist":{"shasum":"f17ec54d5388f6a9283b8ddf8f83e62896c64c92","tarball":"https://registry.npmjs.org/@aws-sdk/client-cognito-identity-node/-/client-cognito-identity-node-0.1.0-preview.2.tgz","fileCount":629,"integrity":"sha512-Ej/a2u0v46TtFEEMWlPiFRSXxkr38Y5DvQNUW4d6h/M7KxUcWQ0BbUn3LaZjUWilCw2Iz7Jgn5G0nAP3EwfCKw==","signatures":[{"sig":"MEUCIQClGAV3cQXuAeKJ4Pn4DIPF17Hn+xLI8ZJTRKcOPpiH/gIgVmbuSK1mZccu0zsc2CASl/FElLFqWc/8h3sLsnfy0zg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":403669,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJddpCQCRA9TVsSAnZWagAAJ7MQAKSxOn3MaDSFAxG4TG7m\n3vY0P78uvU2KS0lnBeieFwCV2hXXT0a/GHyNwS7k4Fq4GBPTPz6272W1Qfi+\nqQUiw4YaJOlzizMRCOycdCdLTlYwts4r5LgpBywKFXfSOB5nCAXAKeX8XcAB\nB9FwLjq/7W3aF7bx/5/vxeT2zBeqt9fhaDb3G6cU1jhkuVqbHWfOv4NmB7zR\n3oAvZs0LLtJT2CvfQvhj2NB1b2KZicR6h8XlAjbxmqCBNy7aawOCzLmlujLO\nrhshWX4ymuE4dTlAqhCA9Rbp1tfDlRWFyw5VjfmWmCk+GjckDNRW5ywBlIkp\nwQUKWiZ0c5mdZy8VMhFtunUCnzw6/ZKUK8EIXQqh8YdoQqcKMy6mjD4K/du/\nxD9kpRRr18jIU7sq/nehhTetcABTx1J3FqbjPTjO+h85j+q7Pyjg5BvbGhbn\nq1G6GFG+enq/m9vxUSdy+LMyih9Oz3LxxaJ9SBpfBWaC2fAqlbMwTDj0MVNK\nonoq2I7YGnmiXfJhUhQHAs9B2Yjfo+OlxxsPlszM0Q4KT11shMi8hMCG46Ur\nH8dch7jhuidK1pYuU3r1nXxWIqe3kbjrjNjR4KXePdq2c8WOCpXgHLOGnGYM\ntPdKJW0TveLNm9mNzxtaoMcpnYLN6sWP24hsHQfnrzTgMJWGD6XukN/SwVYA\n1IdJ\r\n=tPqu\r\n-----END PGP SIGNATURE-----\r\n"},"main":"./index.js","types":"./index.d.ts","scripts":{"test":"exit 0","clean":"npm run remove-definitions && npm run remove-maps && npm run remove-js","pretest":"tsc","remove-js":"rimraf *.js && rimraf ./commands/*.js && rimraf ./model/*.js && rimraf ./types/*.js","smoke-test":"npm run pretest && node ./test/smoke/index.spec.js","remove-maps":"rimraf *.js.map && rimraf ./commands/*.js.map && rimraf ./model/*.js.map && rimraf ./types/*.js.map","prepublishOnly":"tsc","remove-definitions":"rimraf *.d.ts && rimraf ./commands/*.d.ts && rimraf ./model/*.d.ts rimraf ./types/*.d.ts","build-documentation":"npm run clean && typedoc ./","remove-documentation":"rimraf ./docs"},"_npmUser":{"name":"aws-sdk-bot","email":"aws-sdk-js@amazon.com"},"deprecated":"The package @aws-sdk/client-cognito-identity-node has been renamed to @aws-sdk/client-cognito-identity. Please install the renamed package.","_npmVersion":"6.9.0","description":"Node SDK for Amazon Cognito Identity","directories":{},"_nodeVersion":"10.1.0","dependencies":{"tslib":"^1.8.0","@aws-sdk/types":"^0.1.0-preview.5","@aws-sdk/hash-node":"^0.1.0-preview.5","@aws-sdk/json-parser":"^0.1.0-preview.5","@aws-sdk/core-handler":"^0.1.0-preview.5","@aws-sdk/json-builder":"^0.1.0-preview.5","@aws-sdk/signature-v4":"^0.1.0-preview.6","@aws-sdk/util-utf8-node":"^0.1.0-preview.3","@aws-sdk/config-resolver":"^0.1.0-preview.5","@aws-sdk/region-provider":"^0.1.0-preview.5","@aws-sdk/url-parser-node":"^0.1.0-preview.5","@aws-sdk/middleware-stack":"^0.1.0-preview.6","@aws-sdk/retry-middleware":"^0.1.0-preview.5","@aws-sdk/util-base64-node":"^0.1.0-preview.3","@aws-sdk/node-http-handler":"^0.1.0-preview.6","@aws-sdk/protocol-json-rpc":"^0.1.0-preview.6","@aws-sdk/signing-middleware":"^0.1.0-preview.6","@aws-sdk/util-user-agent-node":"^0.1.0-preview.6","@aws-sdk/middleware-serializer":"^0.1.0-preview.5","@aws-sdk/stream-collector-node":"^0.1.0-preview.5","@aws-sdk/util-body-length-node":"^0.1.0-preview.4","@aws-sdk/json-error-unmarshaller":"^0.1.0-preview.6","@aws-sdk/credential-provider-node":"^0.1.0-preview.6","@aws-sdk/middleware-content-length":"^0.1.0-preview.5","@aws-sdk/middleware-header-default":"^0.1.0-preview.5"},"_hasShrinkwrap":false,"devDependencies":{"rimraf":"^2.6.2","typedoc":"^0.14.2","typescript":"~3.4.0","@types/node":"^10.0.0","@aws-sdk/client-documentation-generator":"^0.1.0-preview.3"},"_npmOperationalInternal":{"tmp":"tmp/client-cognito-identity-node_0.1.0-preview.2_1568051343524_0.49929673654185613","host":"s3://npm-registry-packages"}},"0.1.0-preview.3":{"name":"@aws-sdk/client-cognito-identity-node","version":"0.1.0-preview.3","author":{"url":"https://aws.amazon.com/javascript/","name":"AWS SDK for JavaScript Team"},"license":"Apache-2.0","_id":"@aws-sdk/client-cognito-identity-node@0.1.0-preview.3","maintainers":[{"name":"amzn-oss","email":"osa-3p@amazon.com"},{"name":"aws-sdk-bot","email":"aws-sdk-js@amazon.com"},{"name":"trivikr-aws","email":"trivikr@amazon.com"},{"name":"zheallan","email":"zheallan@amazon.com"}],"dist":{"shasum":"6e23d3ed5109592283c104eaf2cd830ddccbf68a","tarball":"https://registry.npmjs.org/@aws-sdk/client-cognito-identity-node/-/client-cognito-identity-node-0.1.0-preview.3.tgz","fileCount":629,"integrity":"sha512-MXu+2DIl4BsiTpRoCwVca8xUrsnNyX07mLuDRhTDKRvLGnjZioxOEEIbhAKmApKppN3lXt+gyYRf2xmx94i46A==","signatures":[{"sig":"MEQCICgOYN+JZ5a5wpTgGLR6iOycQOJb4pEoWOadcz1CkYDaAiByJvUIqH/w4TR/joN4BQdWEZrBuJW5kBh2fPztCiqJNg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":399449,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdg6aYCRA9TVsSAnZWagAA1AoP/0aZCOiaHuSB96Rjpitk\nh9Ss2eBubhgbF7QBTo4bCigNcWCEnxxV/thhFoW1R6DcaXSg9PKNvQ2cWxzI\n7MrWuT6CG/rFl5x+QmqaVrCElh1OMyMZIocEre0/50xtR7lPItNqdBrHx1pi\n7e0SB0NXmadbS2pYMtlDDAJgiy2aINNQxi220RIK9L/dpBtCqKic/kfG/kl7\nPDP0vtL9Jam/midtixAQUTvmayQ+i0N0q9k7pIEZJnVn7rXg19pTEWptjEzs\nfD/gKmzawarAOFW2q+ebZJxYNG7q+1J5fRp1N8EfieA+JHTzKT+LLdUI07Xb\nGEeoucm7WPDRpGxpjCi73aj63Bn/wIl5vHAm3u8PlmhvlBtuZD8YD/DLOEB/\nn8u/LwjtA4VtpKyb2YNQjMD1+2WfJflc8pUeUWfQzi+sgxTuHoc72oe0IgyM\n2qhHeGpWw1OI6mhj4J3NL7wmkt2ncdgzvoUWJGKyOAOdnN7FPDxlCHx7albG\nSAbGlFql7MKGtkgHJHDCjvmwxYjTc1vfbktCCvb2GvWBNO9SF9dACgdnNJgV\nh2CxAjkQrMAJ6uSQ9CDpSbkzsOUl6D3nFRKWob6XCgPliM3PCtVKk/PMY4dX\n6Iwm25L29W4c6s053WtwSn8hq2aLeQ1fnv3hoo3LyiMlcFdQ4S0fUnCn2m3O\neJL6\r\n=AULg\r\n-----END PGP SIGNATURE-----\r\n"},"main":"./index.js","types":"./index.d.ts","readme":"# @aws-sdk/client-cognito-identity-node\n\n[![NPM version](https://img.shields.io/npm/v/@aws-sdk/client-cognito-identity-node/preview.svg)](https://www.npmjs.com/package/@aws-sdk/client-cognito-identity-node)\n[![NPM downloads](https://img.shields.io/npm/dm/@aws-sdk/client-cognito-identity-node.svg)](https://www.npmjs.com/package/@aws-sdk/client-cognito-identity-node)\n\n## Description\n\n<fullname>Amazon Cognito Federated Identities</fullname> <p>Amazon Cognito Federated Identities is a web service that delivers scoped temporary credentials to mobile devices and other untrusted environments. It uniquely identifies a device and supplies the user with a consistent identity over the lifetime of an application.</p> <p>Using Amazon Cognito Federated Identities, you can enable authentication with one or more third-party identity providers (Facebook, Google, or Login with Amazon) or an Amazon Cognito user pool, and you can also choose to support unauthenticated access from your app. Cognito delivers a unique identifier for each user and acts as an OpenID token provider trusted by AWS Security Token Service (STS) to access temporary, limited-privilege AWS credentials.</p> <p>For a description of the authentication flow from the Amazon Cognito Developer Guide see <a href=\"https://docs.aws.amazon.com/cognito/latest/developerguide/authentication-flow.html\">Authentication Flow</a>.</p> <p>For more information see <a href=\"https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-identity.html\">Amazon Cognito Federated Identities</a>.</p>\n\n## Installing\n\nTo install the this package using NPM, simply type the following into a terminal window:\n\n```\nnpm install @aws-sdk/client-cognito-identity-node\n```\n\n## Getting Started\n\n### Import\n\nThe AWS SDK is modulized by clients and commands in CommonJS modules. To send a request, you only need to import the client(`CognitoIdentityClient`) and the commands you need, for example `CreateIdentityPoolCommand`:\n\n```javascript\n//JavaScript\nconst {\n  CognitoIdentityClient\n} = require(\"@aws-sdk/client-cognito-identity-node/CognitoIdentityClient\");\nconst {\n  CreateIdentityPoolCommand\n} = require(\"@aws-sdk/client-cognito-identity-node/commands/CreateIdentityPoolCommand\");\n```\n\n```javascript\n//TypeScript\nimport { CognitoIdentityClient } from \"@aws-sdk/client-cognito-identity-node/CognitoIdentityClient\";\nimport { CreateIdentityPoolCommand } from \"@aws-sdk/client-cognito-identity-node/commands/CreateIdentityPoolCommand\";\n```\n\n### Usage\n\nTo send a request, you:\n\n- Initiate client with configuration (e.g. credentials, region). For more information you can refer to the [API reference][].\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```javascript\nconst cognitoIdentity = new CognitoIdentityClient({region: 'region'});\n//clients can be shared by different commands\nconst params = {\n  IdentityPoolName: /**a string value*/,\n  AllowUnauthenticatedIdentities: /**a boolean value*/,\n};\nconst createIdentityPoolCommand = new CreateIdentityPoolCommand(params);\ncognitoIdentity.send(createIdentityPoolCommand).then(data => {\n    // do something\n}).catch(error => {\n    // error handling\n})\n```\n\nIn addition to using promises, there are 2 other ways to send a request:\n\n```javascript\n// async/await\ntry {\n  const data = await cognitoIdentity.send(createIdentityPoolCommand);\n  // do something\n} catch (error) {\n  // error handling\n}\n```\n\n```javascript\n// callback\ncognitoIdentity.send(createIdentityPoolCommand, (err, data) => {\n  //do something\n});\n```\n\nThe SDK can also send requests using the simplified callback style from version 2 of the SDK.\n\n```javascript\nimport * as AWS from \"@aws-sdk/@aws-sdk/client-cognito-identity-node/CognitoIdentity\";\nconst cognitoIdentity = new AWS.CognitoIdentity({ region: \"region\" });\ncognitoIdentity.createIdentityPool(params, (err, data) => {\n  //do something\n});\n```\n\n### Troubleshooting\n\nWhen the service returns an exception, the error will include the exception information, as well as response metadata (e.g. request id).\n\n```javascript\ntry {\n  const data = await cognitoIdentity.send(createIdentityPoolCommand);\n  // do something\n} catch (error) {\n  const metadata = error.$metadata;\n  console.log(\n    `requestId: ${metadata.requestId}\ncfId: ${metadata.cfId}\nextendedRequestId: ${metadata.extendedRequestId}`\n  );\n  /*\nThe keys within exceptions are also parsed. 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. We use the GitHub issues for tracking bugs and feature requests and have limited bandwidth to address them.\n\n- Ask a question on [StackOverflow](https://stackoverflow.com/questions/tagged/aws-sdk-js) and tag it with `aws-sdk-js`\n- Come 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)\n\n## Contributing\n\nThis client code is generated automatically. Any modifications will be overwritten the next time the `@aws-sdk/@aws-sdk/client-cognito-identity-node' package is updated. To contribute to SDK you can checkout our [code generator package][].\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[code generator package]: https://github.com/aws/aws-sdk-js-v3/tree/master/packages/service-types-generator\n[api reference]: https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/\n","scripts":{"test":"exit 0","clean":"npm run remove-definitions && npm run remove-maps && npm run remove-js","pretest":"tsc","remove-js":"rimraf *.js && rimraf ./commands/*.js && rimraf ./model/*.js && rimraf ./types/*.js","smoke-test":"npm run pretest && node ./test/smoke/index.spec.js","remove-maps":"rimraf *.js.map && rimraf ./commands/*.js.map && rimraf ./model/*.js.map && rimraf ./types/*.js.map","prepublishOnly":"tsc","remove-definitions":"rimraf *.d.ts && rimraf ./commands/*.d.ts && rimraf ./model/*.d.ts rimraf ./types/*.d.ts","build-documentation":"npm run clean && typedoc ./","remove-documentation":"rimraf ./docs"},"_npmUser":{"name":"aws-sdk-bot","email":"aws-sdk-js@amazon.com"},"deprecated":"The package @aws-sdk/client-cognito-identity-node has been renamed to @aws-sdk/client-cognito-identity. Please install the renamed package.","_npmVersion":"6.9.0","description":"Node SDK for Amazon Cognito Identity","directories":{},"_nodeVersion":"10.1.0","dependencies":{"tslib":"^1.8.0","@aws-sdk/types":"^0.1.0-preview.5","@aws-sdk/hash-node":"^0.1.0-preview.6","@aws-sdk/json-parser":"^0.1.0-preview.5","@aws-sdk/core-handler":"^0.1.0-preview.5","@aws-sdk/json-builder":"^0.1.0-preview.5","@aws-sdk/signature-v4":"^0.1.0-preview.7","@aws-sdk/util-utf8-node":"^0.1.0-preview.4","@aws-sdk/config-resolver":"^0.1.0-preview.5","@aws-sdk/region-provider":"^0.1.0-preview.5","@aws-sdk/url-parser-node":"^0.1.0-preview.6","@aws-sdk/middleware-stack":"^0.1.0-preview.6","@aws-sdk/retry-middleware":"^0.1.0-preview.5","@aws-sdk/util-base64-node":"^0.1.0-preview.4","@aws-sdk/node-http-handler":"^0.1.0-preview.6","@aws-sdk/protocol-json-rpc":"^0.1.0-preview.6","@aws-sdk/signing-middleware":"^0.1.0-preview.7","@aws-sdk/util-user-agent-node":"^0.1.0-preview.7","@aws-sdk/middleware-serializer":"^0.1.0-preview.5","@aws-sdk/stream-collector-node":"^0.1.0-preview.6","@aws-sdk/util-body-length-node":"^0.1.0-preview.5","@aws-sdk/json-error-unmarshaller":"^0.1.0-preview.6","@aws-sdk/credential-provider-node":"^0.1.0-preview.7","@aws-sdk/middleware-content-length":"^0.1.0-preview.5","@aws-sdk/middleware-header-default":"^0.1.0-preview.5"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"rimraf":"^2.6.2","typedoc":"^0.14.2","typescript":"~3.4.0","@types/node":"^10.0.0","@aws-sdk/client-documentation-generator":"^0.1.0-preview.3"},"_npmOperationalInternal":{"tmp":"tmp/client-cognito-identity-node_0.1.0-preview.3_1568908952311_0.08155075761472053","host":"s3://npm-registry-packages"}},"0.1.0-preview.4":{"name":"@aws-sdk/client-cognito-identity-node","version":"0.1.0-preview.4","author":{"url":"https://aws.amazon.com/javascript/","name":"AWS SDK for JavaScript Team"},"license":"Apache-2.0","_id":"@aws-sdk/client-cognito-identity-node@0.1.0-preview.4","maintainers":[{"name":"amzn-oss","email":"osa-3p@amazon.com"},{"name":"aws-sdk-bot","email":"aws-sdk-js@amazon.com"},{"name":"trivikr-aws","email":"trivikr@amazon.com"},{"name":"zheallan","email":"zheallan@amazon.com"}],"dist":{"shasum":"ef96c720eb25d6e58388ca4582e37d6c0fe6ed7f","tarball":"https://registry.npmjs.org/@aws-sdk/client-cognito-identity-node/-/client-cognito-identity-node-0.1.0-preview.4.tgz","fileCount":629,"integrity":"sha512-pTabw9iC+VW0UAMApjVciG4P3i4gbzFxDS1YHGfDDermQ4Bgbo4Z3leXUGp/dlqCFs0PDfCvhEEOBqb+FCyrKQ==","signatures":[{"sig":"MEUCIQDkcRMvT6lx8vE6PKTVunKObRqUXV9od0ZF45oopj1q5gIgB86h/0yvUcnG9Xw8cprgr1mWuCJZHeeitET6Wnv0NxA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":399441,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJduNBQCRA9TVsSAnZWagAAnJgP/0dv1ryX0MDO0Mt6odnL\nW5yYHH3eQBf8Oz2aldijwT9PMErsORceUrO71Sslq6pSd8VLa0HMW6ZNHZOj\n9nzU4QWjEcokvoEzCDm2ew1GpQIBquQAacN/G3RXNlsiuk3hnw3/p8y9UHnQ\ndxuLFTRDITPlmeVRwsmoN+2zylMe04zL1G3XUFoqHJVvuVnKSsZ2FFBKo2ou\nwnPM5kNLyowgHp826dkq9W0nCir/h7dd3EVyzfMpg9L2ZAgmc4HNzilIFy47\n6zjMUZzKoAmgLsr24Icw+e9K180DG9oU9tcd/EmI+kOxaa//49dBpcoICVCl\nsKpyDbalVfN0wD85TSv1gfQdIorCEcf+D8O3VxUHWLLBoUNzXyMIclL6PwV3\niBC2H2APIrbRpg5UlnLU+3zQ6ZKKQgxHSgQDAUsD8d2rM5V3MHgWxnacCErt\nTNjTC8e0btOvyOYHM/HIEu3b0bsepOikZKjTl1pokzny4CZrnyFd/xMSqbPb\nnm6iQKCP3OXjiciUZfRUEjYO6tKCe6b5SeIx74dzHV6E2ivFvHK8v1TL2EhW\nM3A1WD6Q/iS3hJYlHo6IEYqrU2JdvK+WWbL3tXhj+J3BSb2qnZOw4ZTlgTF7\nMa12J3rMSAxYbc4IPlZLdgcvGl7BPxeekmtYFqzufKKAEFYMV8VURblERjLY\n1QxA\r\n=pFR7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"./index.js","types":"./index.d.ts","readme":"# @aws-sdk/client-cognito-identity-node\n\n[![NPM version](https://img.shields.io/npm/v/@aws-sdk/client-cognito-identity-node/preview.svg)](https://www.npmjs.com/package/@aws-sdk/client-cognito-identity-node)\n[![NPM downloads](https://img.shields.io/npm/dm/@aws-sdk/client-cognito-identity-node.svg)](https://www.npmjs.com/package/@aws-sdk/client-cognito-identity-node)\n\n## Description\n\n<fullname>Amazon Cognito Federated Identities</fullname> <p>Amazon Cognito Federated Identities is a web service that delivers scoped temporary credentials to mobile devices and other untrusted environments. It uniquely identifies a device and supplies the user with a consistent identity over the lifetime of an application.</p> <p>Using Amazon Cognito Federated Identities, you can enable authentication with one or more third-party identity providers (Facebook, Google, or Login with Amazon) or an Amazon Cognito user pool, and you can also choose to support unauthenticated access from your app. Cognito delivers a unique identifier for each user and acts as an OpenID token provider trusted by AWS Security Token Service (STS) to access temporary, limited-privilege AWS credentials.</p> <p>For a description of the authentication flow from the Amazon Cognito Developer Guide see <a href=\"https://docs.aws.amazon.com/cognito/latest/developerguide/authentication-flow.html\">Authentication Flow</a>.</p> <p>For more information see <a href=\"https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-identity.html\">Amazon Cognito Federated Identities</a>.</p>\n\n## Installing\n\nTo install the this package using NPM, simply type the following into a terminal window:\n\n```\nnpm install @aws-sdk/client-cognito-identity-node\n```\n\n## Getting Started\n\n### Import\n\nThe AWS SDK is modulized by clients and commands in CommonJS modules. To send a request, you only need to import the client(`CognitoIdentityClient`) and the commands you need, for example `CreateIdentityPoolCommand`:\n\n```javascript\n//JavaScript\nconst {\n  CognitoIdentityClient,\n  CreateIdentityPoolCommand\n} = require(\"@aws-sdk/client-cognito-identity-node\");\n```\n\n```javascript\n//TypeScript\nimport {\n  CognitoIdentityClient,\n  CreateIdentityPoolCommand\n} from \"@aws-sdk/client-cognito-identity-node\";\n```\n\n### Usage\n\nTo send a request, you:\n\n- Initiate client with configuration (e.g. credentials, region). For more information you can refer to the [API reference][].\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```javascript\nconst cognitoIdentity = new CognitoIdentityClient({region: 'region'});\n//clients can be shared by different commands\nconst params = {\n  IdentityPoolName: /**a string value*/,\n  AllowUnauthenticatedIdentities: /**a boolean value*/,\n};\nconst createIdentityPoolCommand = new CreateIdentityPoolCommand(params);\ncognitoIdentity.send(createIdentityPoolCommand).then(data => {\n    // do something\n}).catch(error => {\n    // error handling\n})\n```\n\nIn addition to using promises, there are 2 other ways to send a request:\n\n```javascript\n// async/await\ntry {\n  const data = await cognitoIdentity.send(createIdentityPoolCommand);\n  // do something\n} catch (error) {\n  // error handling\n}\n```\n\n```javascript\n// callback\ncognitoIdentity.send(createIdentityPoolCommand, (err, data) => {\n  //do something\n});\n```\n\nThe SDK can also send requests using the simplified callback style from version 2 of the SDK.\n\n```javascript\nimport * as AWS from \"@aws-sdk/client-cognito-identity-node\";\nconst cognitoIdentity = new AWS.CognitoIdentity({ region: \"region\" });\ncognitoIdentity.createIdentityPool(params, (err, data) => {\n  //do something\n});\n```\n\n### Troubleshooting\n\nWhen the service returns an exception, the error will include the exception information, as well as response metadata (e.g. request id).\n\n```javascript\ntry {\n  const data = await cognitoIdentity.send(createIdentityPoolCommand);\n  // do something\n} catch (error) {\n  const metadata = error.$metadata;\n  console.log(\n    `requestId: ${metadata.requestId}\ncfId: ${metadata.cfId}\nextendedRequestId: ${metadata.extendedRequestId}`\n  );\n  /*\nThe keys within exceptions are also parsed. 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. We use the GitHub issues for tracking bugs and feature requests and have limited bandwidth to address them.\n\n- Ask a question on [StackOverflow](https://stackoverflow.com/questions/tagged/aws-sdk-js) and tag it with `aws-sdk-js`\n- Come 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)\n\n## Contributing\n\nThis client code is generated automatically. Any modifications will be overwritten the next time the `@aws-sdk/@aws-sdk/client-cognito-identity-node' package is updated. To contribute to SDK you can checkout our [code generator package][].\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[code generator package]: https://github.com/aws/aws-sdk-js-v3/tree/master/packages/service-types-generator\n[api reference]: https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/\n","scripts":{"test":"exit 0","clean":"npm run remove-definitions && npm run remove-maps && npm run remove-js","pretest":"tsc","remove-js":"rimraf *.js && rimraf ./commands/*.js && rimraf ./model/*.js && rimraf ./types/*.js","smoke-test":"npm run pretest && node ./test/smoke/index.spec.js","remove-maps":"rimraf *.js.map && rimraf ./commands/*.js.map && rimraf ./model/*.js.map && rimraf ./types/*.js.map","prepublishOnly":"tsc","remove-definitions":"rimraf *.d.ts && rimraf ./commands/*.d.ts && rimraf ./model/*.d.ts rimraf ./types/*.d.ts","build-documentation":"npm run clean && typedoc ./","remove-documentation":"rimraf ./docs"},"_npmUser":{"name":"aws-sdk-bot","email":"aws-sdk-js@amazon.com"},"deprecated":"The package @aws-sdk/client-cognito-identity-node has been renamed to @aws-sdk/client-cognito-identity. Please install the renamed package.","_npmVersion":"6.9.0","description":"Node SDK for Amazon Cognito Identity","directories":{},"_nodeVersion":"10.1.0","dependencies":{"tslib":"^1.8.0","@aws-sdk/types":"^0.1.0-preview.6","@aws-sdk/hash-node":"^0.1.0-preview.7","@aws-sdk/json-parser":"^0.1.0-preview.6","@aws-sdk/core-handler":"^0.1.0-preview.6","@aws-sdk/json-builder":"^0.1.0-preview.6","@aws-sdk/signature-v4":"^0.1.0-preview.8","@aws-sdk/util-utf8-node":"^0.1.0-preview.4","@aws-sdk/config-resolver":"^0.1.0-preview.6","@aws-sdk/region-provider":"^0.1.0-preview.6","@aws-sdk/url-parser-node":"^0.1.0-preview.7","@aws-sdk/middleware-stack":"^0.1.0-preview.7","@aws-sdk/retry-middleware":"^0.1.0-preview.6","@aws-sdk/util-base64-node":"^0.1.0-preview.4","@aws-sdk/node-http-handler":"^0.1.0-preview.7","@aws-sdk/protocol-json-rpc":"^0.1.0-preview.7","@aws-sdk/signing-middleware":"^0.1.0-preview.8","@aws-sdk/util-user-agent-node":"^0.1.0-preview.8","@aws-sdk/middleware-serializer":"^0.1.0-preview.6","@aws-sdk/stream-collector-node":"^0.1.0-preview.7","@aws-sdk/util-body-length-node":"^0.1.0-preview.5","@aws-sdk/json-error-unmarshaller":"^0.1.0-preview.7","@aws-sdk/credential-provider-node":"^0.1.0-preview.8","@aws-sdk/middleware-content-length":"^0.1.0-preview.6","@aws-sdk/middleware-header-default":"^0.1.0-preview.6"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"rimraf":"^2.6.2","typedoc":"^0.14.2","typescript":"~3.4.0","@types/node":"^10.0.0","@aws-sdk/client-documentation-generator":"^0.1.0-preview.3"},"_npmOperationalInternal":{"tmp":"tmp/client-cognito-identity-node_0.1.0-preview.4_1572393039651_0.5873217890814981","host":"s3://npm-registry-packages"}},"0.1.0-preview.5":{"name":"@aws-sdk/client-cognito-identity-node","version":"0.1.0-preview.5","author":{"url":"https://aws.amazon.com/javascript/","name":"AWS SDK for JavaScript Team"},"license":"Apache-2.0","_id":"@aws-sdk/client-cognito-identity-node@0.1.0-preview.5","maintainers":[{"name":"amzn-oss","email":"osa-3p@amazon.com"},{"name":"aws-sdk-bot","email":"aws-sdk-js@amazon.com"},{"name":"trivikr-aws","email":"trivikr@amazon.com"},{"name":"zheallan","email":"zheallan@amazon.com"}],"dist":{"shasum":"8104354a0ce8fbb01afa867801c59d1ee05e1ff5","tarball":"https://registry.npmjs.org/@aws-sdk/client-cognito-identity-node/-/client-cognito-identity-node-0.1.0-preview.5.tgz","fileCount":629,"integrity":"sha512-EkxGVsnr9wFsBhoXA9V/vGqofa0OKWU4dGS7XnLrQ5EMx4zgY2Ap8Bzqhw0L1Xa+oD2w1A4bk4GYxnOrqSOgAw==","signatures":[{"sig":"MEUCIH30iW/aqwyt18pd+LVSH/ncE5U5GSpCPn9vRPF/flF5AiEAnj4ia9IbFrlBHPa440J74X59Ypz0JIBsrtJs2uOnlyg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":399685,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdueNWCRA9TVsSAnZWagAAXKkP/2FWIRYECAZ18hH/DpX4\n3jsB1gdAsR5jIRFTCXC7gCCcTHFVA97iRRecs5KF8dAFaFDRZNWNnE5hjvBP\nv5QI0IOpSiVBQV3GPZtftmAv4gBP9GjB58fw85w6j+AT3eqQKgHkG9vaTtFp\nouXxSLgWL8vI0zawMnAGmjdxWvwxVxX/mXlWziMXFGsOnYm7FxqlWMbFuBiN\n4v5NIQtPgrWjiGTyTmkw89kv4vDR7J4JYTChJzcYw1lwVjBH6Ag92d7rwCHi\nLoTDCFFxq7/o1UVv/ejNF/emS/aW1O9usAUaysUzPP8jXnZZtCRKVAgcjLio\n23wH0C2te5MIX1Ac85Nr1xgjwMWDUH5yFxUqXIV+s+QgBKPSG3SZv6J+m6Rv\n+lc+fsLQGbBlNNlmS0dpoahwmeZGfyuJ5yDW03zTk71wq+DNxmZqneywT6W3\nELcbmiYPxj90rq+UbOBOUYYHDSq8Dl8zcxTf3P6XtUMFWJxGqnwqQBZHcVHB\nxEohlgDcHx1rkyIQTKF+hlr0UY2j7EyNftteLLVGtjLeVp9v1gN/8Uj1wcW3\n5M9FqzWut1Hu4A27p57eefeykwuw6134ylY9y3ZpIzO5WhX+keED/MgQ335O\nM2vUDT2iG5oIvZLuZXxLVYmeEkpf/HXCATg5c309nit4prUVR1uxLCAawCpw\nC5CR\r\n=4C2M\r\n-----END PGP SIGNATURE-----\r\n"},"main":"./index.js","types":"./index.d.ts","readme":"# @aws-sdk/client-cognito-identity-node\n\n[![NPM version](https://img.shields.io/npm/v/@aws-sdk/client-cognito-identity-node/preview.svg)](https://www.npmjs.com/package/@aws-sdk/client-cognito-identity-node)\n[![NPM downloads](https://img.shields.io/npm/dm/@aws-sdk/client-cognito-identity-node.svg)](https://www.npmjs.com/package/@aws-sdk/client-cognito-identity-node)\n\n## Description\n\n<fullname>Amazon Cognito Federated Identities</fullname> <p>Amazon Cognito Federated Identities is a web service that delivers scoped temporary credentials to mobile devices and other untrusted environments. It uniquely identifies a device and supplies the user with a consistent identity over the lifetime of an application.</p> <p>Using Amazon Cognito Federated Identities, you can enable authentication with one or more third-party identity providers (Facebook, Google, or Login with Amazon) or an Amazon Cognito user pool, and you can also choose to support unauthenticated access from your app. Cognito delivers a unique identifier for each user and acts as an OpenID token provider trusted by AWS Security Token Service (STS) to access temporary, limited-privilege AWS credentials.</p> <p>For a description of the authentication flow from the Amazon Cognito Developer Guide see <a href=\"https://docs.aws.amazon.com/cognito/latest/developerguide/authentication-flow.html\">Authentication Flow</a>.</p> <p>For more information see <a href=\"https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-identity.html\">Amazon Cognito Federated Identities</a>.</p>\n\n## Installing\n\nTo install the this package using NPM, simply type the following into a terminal window:\n\n```\nnpm install @aws-sdk/client-cognito-identity-node\n```\n\n## Getting Started\n\n### Import\n\nThe AWS SDK is modulized by clients and commands in CommonJS modules. To send a request, you only need to import the client(`CognitoIdentityClient`) and the commands you need, for example `CreateIdentityPoolCommand`:\n\n```javascript\n//JavaScript\nconst {\n  CognitoIdentityClient,\n  CreateIdentityPoolCommand\n} = require(\"@aws-sdk/client-cognito-identity-node\");\n```\n\n```javascript\n//TypeScript\nimport {\n  CognitoIdentityClient,\n  CreateIdentityPoolCommand\n} from \"@aws-sdk/client-cognito-identity-node\";\n```\n\n### Usage\n\nTo send a request, you:\n\n- Initiate client with configuration (e.g. credentials, region). For more information you can refer to the [API reference][].\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```javascript\nconst cognitoIdentity = new CognitoIdentityClient({region: 'region'});\n//clients can be shared by different commands\nconst params = {\n  IdentityPoolName: /**a string value*/,\n  AllowUnauthenticatedIdentities: /**a boolean value*/,\n};\nconst createIdentityPoolCommand = new CreateIdentityPoolCommand(params);\ncognitoIdentity.send(createIdentityPoolCommand).then(data => {\n    // do something\n}).catch(error => {\n    // error handling\n})\n```\n\nIn addition to using promises, there are 2 other ways to send a request:\n\n```javascript\n// async/await\ntry {\n  const data = await cognitoIdentity.send(createIdentityPoolCommand);\n  // do something\n} catch (error) {\n  // error handling\n}\n```\n\n```javascript\n// callback\ncognitoIdentity.send(createIdentityPoolCommand, (err, data) => {\n  //do something\n});\n```\n\nThe SDK can also send requests using the simplified callback style from version 2 of the SDK.\n\n```javascript\nimport * as AWS from \"@aws-sdk/client-cognito-identity-node\";\nconst cognitoIdentity = new AWS.CognitoIdentity({ region: \"region\" });\ncognitoIdentity.createIdentityPool(params, (err, data) => {\n  //do something\n});\n```\n\n### Troubleshooting\n\nWhen the service returns an exception, the error will include the exception information, as well as response metadata (e.g. request id).\n\n```javascript\ntry {\n  const data = await cognitoIdentity.send(createIdentityPoolCommand);\n  // do something\n} catch (error) {\n  const metadata = error.$metadata;\n  console.log(\n    `requestId: ${metadata.requestId}\ncfId: ${metadata.cfId}\nextendedRequestId: ${metadata.extendedRequestId}`\n  );\n  /*\nThe keys within exceptions are also parsed. 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. We use the GitHub issues for tracking bugs and feature requests and have limited bandwidth to address them.\n\n- Ask a question on [StackOverflow](https://stackoverflow.com/questions/tagged/aws-sdk-js) and tag it with `aws-sdk-js`\n- Come 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)\n\n## Contributing\n\nThis client code is generated automatically. Any modifications will be overwritten the next time the `@aws-sdk/@aws-sdk/client-cognito-identity-node' package is updated. To contribute to SDK you can checkout our [code generator package][].\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[code generator package]: https://github.com/aws/aws-sdk-js-v3/tree/master/packages/service-types-generator\n[api reference]: https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/\n","scripts":{"test":"exit 0","clean":"npm run remove-definitions && npm run remove-maps && npm run remove-js","pretest":"tsc","remove-js":"rimraf *.js && rimraf ./commands/*.js && rimraf ./model/*.js && rimraf ./types/*.js","smoke-test":"npm run pretest && node ./test/smoke/index.spec.js","remove-maps":"rimraf *.js.map && rimraf ./commands/*.js.map && rimraf ./model/*.js.map && rimraf ./types/*.js.map","prepublishOnly":"tsc","remove-definitions":"rimraf *.d.ts && rimraf ./commands/*.d.ts && rimraf ./model/*.d.ts rimraf ./types/*.d.ts","build-documentation":"npm run clean && typedoc ./","remove-documentation":"rimraf ./docs"},"_npmUser":{"name":"aws-sdk-bot","email":"aws-sdk-js@amazon.com"},"deprecated":"The package @aws-sdk/client-cognito-identity-node has been renamed to @aws-sdk/client-cognito-identity. Please install the renamed package.","_npmVersion":"6.9.0","description":"Node SDK for Amazon Cognito Identity","directories":{},"_nodeVersion":"10.1.0","dependencies":{"tslib":"^1.8.0","@aws-sdk/types":"^0.1.0-preview.7","@aws-sdk/hash-node":"^0.1.0-preview.8","@aws-sdk/json-parser":"^0.1.0-preview.7","@aws-sdk/core-handler":"^0.1.0-preview.7","@aws-sdk/json-builder":"^0.1.0-preview.7","@aws-sdk/signature-v4":"^0.1.0-preview.9","@aws-sdk/util-utf8-node":"^0.1.0-preview.4","@aws-sdk/config-resolver":"^0.1.0-preview.7","@aws-sdk/region-provider":"^0.1.0-preview.7","@aws-sdk/url-parser-node":"^0.1.0-preview.8","@aws-sdk/middleware-stack":"^0.1.0-preview.8","@aws-sdk/retry-middleware":"^0.1.0-preview.7","@aws-sdk/util-base64-node":"^0.1.0-preview.4","@aws-sdk/node-http-handler":"^0.1.0-preview.8","@aws-sdk/protocol-json-rpc":"^0.1.0-preview.8","@aws-sdk/signing-middleware":"^0.1.0-preview.9","@aws-sdk/util-user-agent-node":"^0.1.0-preview.9","@aws-sdk/middleware-serializer":"^0.1.0-preview.7","@aws-sdk/stream-collector-node":"^0.1.0-preview.8","@aws-sdk/util-body-length-node":"^0.1.0-preview.5","@aws-sdk/json-error-unmarshaller":"^0.1.0-preview.8","@aws-sdk/credential-provider-node":"^0.1.0-preview.9","@aws-sdk/middleware-content-length":"^0.1.0-preview.7","@aws-sdk/middleware-header-default":"^0.1.0-preview.7"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"rimraf":"^2.6.2","typedoc":"^0.14.2","typescript":"~3.4.0","@types/node":"^10.0.0","@aws-sdk/client-documentation-generator":"^0.1.0-preview.3"},"_npmOperationalInternal":{"tmp":"tmp/client-cognito-identity-node_0.1.0-preview.5_1572463446323_0.2894939469714841","host":"s3://npm-registry-packages"}},"0.1.0-preview.6":{"name":"@aws-sdk/client-cognito-identity-node","version":"0.1.0-preview.6","author":{"url":"https://aws.amazon.com/javascript/","name":"AWS SDK for JavaScript Team"},"license":"Apache-2.0","_id":"@aws-sdk/client-cognito-identity-node@0.1.0-preview.6","maintainers":[{"name":"amzn-oss","email":"osa-3p@amazon.com"},{"name":"aws-sdk-bot","email":"aws-sdk-js@amazon.com"},{"name":"trivikr-aws","email":"trivikr@amazon.com"},{"name":"zheallan","email":"zheallan@amazon.com"}],"dist":{"shasum":"63c169b6eb8b2b396e214687c18433c9f5b8c34f","tarball":"https://registry.npmjs.org/@aws-sdk/client-cognito-identity-node/-/client-cognito-identity-node-0.1.0-preview.6.tgz","fileCount":629,"integrity":"sha512-2cStR5hUojsgEakU7Cs1LkUB+ODoDVTCf72txO5WyNewpTLgUWlfmrmErbeAz2UDg3NQXwplHq4S2ft+aBSw2Q==","signatures":[{"sig":"MEUCIGlzZ5jHK4atkXec1+wp7kZIg+SPrdG7o0Qw9WM/vNgkAiEA2KBcVbcZHHi7SszOdsrzV6nVBmIEJT/uiWe1XrGKwEY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":399957,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd1FQUCRA9TVsSAnZWagAA2JYP/jCRZqQlUaiN97gw1NJq\np+lCCrJ4PhPjj/WJvdAsKbN0gMncXx/Tjqb/8pjaIpm7LM6/JXYMqYWu3U4/\nnCj7oicmYZFoOeyRB62KFzUTyudfgcfKNI5D4+aQ1W+yrolmHKdV8HOSJcSI\nxC7tIUMPjqJBgKtb6hTDDQz1AE0+s1S730e0L4k17rrPOVOLg9Fu8YR2Ck6d\nQGXom9TC3Tna0uHPKZQ84wAORrMASBprdEX9NkkfWQp7bsk+6/XgoZYti2oN\nq47GZPDgWFL7QXq9Ml6EL6TRRK9uIyyN89j6l4XoKcVnxqSmFXjq6SOH6iPV\nQEoK31uRMAuvCxInHEvj4BCzPwyHB9ZmGeQ/Gv8IbaRDok/0hvWF9txuaDWW\nXUw3SPbGjufAGTT8DjdeyRxLQrAvu9sFJgnBkQtzLVlDRfxu0+oqciVqA3zk\nVwD7XiNl/il8zkB+kQwGv24FchfQmsRrs/Eg4ip/9wLva5HFlNMnDp1Zmx5w\n/wku1rDDawi5VDetL588M7HWreX6v1NOTjmXdpyHkOfUpMIVFoKKZXj89/fu\nolvmLHHWm1sieK7W1jTxnvgKIPpkK/wywFUBCT50fda0EKl0SRU5uOg1dTCK\naDQ03YM7jxqM593tTKVvPeL4p4Vxo+OekM+tmwx6vuFVmApjt1DXK6+9MzBv\n3gTT\r\n=6qCV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"./index.js","types":"./index.d.ts","readme":"# @aws-sdk/client-cognito-identity-node\n\n[![NPM version](https://img.shields.io/npm/v/@aws-sdk/client-cognito-identity-node/preview.svg)](https://www.npmjs.com/package/@aws-sdk/client-cognito-identity-node)\n[![NPM downloads](https://img.shields.io/npm/dm/@aws-sdk/client-cognito-identity-node.svg)](https://www.npmjs.com/package/@aws-sdk/client-cognito-identity-node)\n\n## Description\n\n<fullname>Amazon Cognito Federated Identities</fullname> <p>Amazon Cognito Federated Identities is a web service that delivers scoped temporary credentials to mobile devices and other untrusted environments. It uniquely identifies a device and supplies the user with a consistent identity over the lifetime of an application.</p> <p>Using Amazon Cognito Federated Identities, you can enable authentication with one or more third-party identity providers (Facebook, Google, or Login with Amazon) or an Amazon Cognito user pool, and you can also choose to support unauthenticated access from your app. Cognito delivers a unique identifier for each user and acts as an OpenID token provider trusted by AWS Security Token Service (STS) to access temporary, limited-privilege AWS credentials.</p> <p>For a description of the authentication flow from the Amazon Cognito Developer Guide see <a href=\"https://docs.aws.amazon.com/cognito/latest/developerguide/authentication-flow.html\">Authentication Flow</a>.</p> <p>For more information see <a href=\"https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-identity.html\">Amazon Cognito Federated Identities</a>.</p>\n\n## Installing\n\nTo install the this package using NPM, simply type the following into a terminal window:\n\n```\nnpm install @aws-sdk/client-cognito-identity-node\n```\n\n## Getting Started\n\n### Import\n\nThe AWS SDK is modulized by clients and commands in CommonJS modules. To send a request, you only need to import the client(`CognitoIdentityClient`) and the commands you need, for example `CreateIdentityPoolCommand`:\n\n```javascript\n//JavaScript\nconst {\n  CognitoIdentityClient,\n  CreateIdentityPoolCommand\n} = require(\"@aws-sdk/client-cognito-identity-node\");\n```\n\n```javascript\n//TypeScript\nimport {\n  CognitoIdentityClient,\n  CreateIdentityPoolCommand\n} from \"@aws-sdk/client-cognito-identity-node\";\n```\n\n### Usage\n\nTo send a request, you:\n\n- Initiate client with configuration (e.g. credentials, region). For more information you can refer to the [API reference][].\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```javascript\nconst cognitoIdentity = new CognitoIdentityClient({region: 'region'});\n//clients can be shared by different commands\nconst params = {\n  IdentityPoolName: /**a string value*/,\n  AllowUnauthenticatedIdentities: /**a boolean value*/,\n};\nconst createIdentityPoolCommand = new CreateIdentityPoolCommand(params);\ncognitoIdentity.send(createIdentityPoolCommand).then(data => {\n    // do something\n}).catch(error => {\n    // error handling\n})\n```\n\nIn addition to using promises, there are 2 other ways to send a request:\n\n```javascript\n// async/await\ntry {\n  const data = await cognitoIdentity.send(createIdentityPoolCommand);\n  // do something\n} catch (error) {\n  // error handling\n}\n```\n\n```javascript\n// callback\ncognitoIdentity.send(createIdentityPoolCommand, (err, data) => {\n  //do something\n});\n```\n\nThe SDK can also send requests using the simplified callback style from version 2 of the SDK.\n\n```javascript\nimport * as AWS from \"@aws-sdk/client-cognito-identity-node\";\nconst cognitoIdentity = new AWS.CognitoIdentity({ region: \"region\" });\ncognitoIdentity.createIdentityPool(params, (err, data) => {\n  //do something\n});\n```\n\n### Troubleshooting\n\nWhen the service returns an exception, the error will include the exception information, as well as response metadata (e.g. request id).\n\n```javascript\ntry {\n  const data = await cognitoIdentity.send(createIdentityPoolCommand);\n  // do something\n} catch (error) {\n  const metadata = error.$metadata;\n  console.log(\n    `requestId: ${metadata.requestId}\ncfId: ${metadata.cfId}\nextendedRequestId: ${metadata.extendedRequestId}`\n  );\n  /*\nThe keys within exceptions are also parsed. 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. We use the GitHub issues for tracking bugs and feature requests and have limited bandwidth to address them.\n\n- Ask a question on [StackOverflow](https://stackoverflow.com/questions/tagged/aws-sdk-js) and tag it with `aws-sdk-js`\n- Come 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)\n\n## Contributing\n\nThis client code is generated automatically. Any modifications will be overwritten the next time the `@aws-sdk/@aws-sdk/client-cognito-identity-node' package is updated. To contribute to SDK you can checkout our [code generator package][].\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[code generator package]: https://github.com/aws/aws-sdk-js-v3/tree/master/packages/service-types-generator\n[api reference]: https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/\n","scripts":{"test":"exit 0","clean":"npm run remove-definitions && npm run remove-maps && npm run remove-js","pretest":"tsc","remove-js":"rimraf *.js && rimraf ./commands/*.js && rimraf ./model/*.js && rimraf ./types/*.js","smoke-test":"npm run pretest && node ./test/smoke/index.spec.js","remove-maps":"rimraf *.js.map && rimraf ./commands/*.js.map && rimraf ./model/*.js.map && rimraf ./types/*.js.map","prepublishOnly":"tsc","remove-definitions":"rimraf *.d.ts && rimraf ./commands/*.d.ts && rimraf ./model/*.d.ts rimraf ./types/*.d.ts","build-documentation":"npm run clean && typedoc ./","remove-documentation":"rimraf ./docs"},"_npmUser":{"name":"aws-sdk-bot","email":"aws-sdk-js@amazon.com"},"deprecated":"The package @aws-sdk/client-cognito-identity-node has been renamed to @aws-sdk/client-cognito-identity. Please install the renamed package.","_npmVersion":"6.9.0","description":"Node SDK for Amazon Cognito Identity","directories":{},"_nodeVersion":"10.16.3","dependencies":{"tslib":"^1.8.0","@aws-sdk/types":"^0.1.0-preview.7","@aws-sdk/hash-node":"^0.1.0-preview.8","@aws-sdk/json-parser":"^0.1.0-preview.7","@aws-sdk/core-handler":"^0.1.0-preview.7","@aws-sdk/json-builder":"^0.1.0-preview.7","@aws-sdk/signature-v4":"^0.1.0-preview.10","@aws-sdk/util-utf8-node":"^0.1.0-preview.4","@aws-sdk/config-resolver":"^0.1.0-preview.7","@aws-sdk/region-provider":"^0.1.0-preview.7","@aws-sdk/url-parser-node":"^0.1.0-preview.8","@aws-sdk/middleware-stack":"^0.1.0-preview.9","@aws-sdk/retry-middleware":"^0.1.0-preview.7","@aws-sdk/util-base64-node":"^0.1.0-preview.4","@aws-sdk/node-http-handler":"^0.1.0-preview.8","@aws-sdk/protocol-json-rpc":"^0.1.0-preview.8","@aws-sdk/signing-middleware":"^0.1.0-preview.10","@aws-sdk/util-user-agent-node":"^0.1.0-preview.10","@aws-sdk/middleware-serializer":"^0.1.0-preview.7","@aws-sdk/stream-collector-node":"^0.1.0-preview.9","@aws-sdk/util-body-length-node":"^0.1.0-preview.5","@aws-sdk/json-error-unmarshaller":"^0.1.0-preview.8","@aws-sdk/credential-provider-node":"^0.1.0-preview.10","@aws-sdk/middleware-content-length":"^0.1.0-preview.7","@aws-sdk/middleware-header-default":"^0.1.0-preview.7"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"rimraf":"^2.6.2","typedoc":"^0.14.2","typescript":"~3.4.0","@types/node":"^10.0.0","@aws-sdk/client-documentation-generator":"^0.1.0-preview.3"},"_npmOperationalInternal":{"tmp":"tmp/client-cognito-identity-node_0.1.0-preview.6_1574196243573_0.7417890794637851","host":"s3://npm-registry-packages"}}},"time":{"created":"2019-09-09T17:49:03.268Z","modified":"2025-03-27T18:41:21.055Z","0.1.0-preview.2":"2019-09-09T17:49:03.620Z","0.1.0-preview.3":"2019-09-19T16:02:32.588Z","0.1.0-preview.4":"2019-10-29T23:50:39.856Z","0.1.0-preview.5":"2019-10-30T19:24:06.438Z","0.1.0-preview.6":"2019-11-19T20:44:03.759Z"},"author":{"url":"https://aws.amazon.com/javascript/","name":"AWS SDK for JavaScript Team"},"license":"Apache-2.0","description":"Node SDK for Amazon Cognito Identity","maintainers":[{"email":"osa-3p@amazon.com","name":"amzn-oss"},{"email":"aws-sdk-js-automation@amazon.com","name":"aws-sdk-bot"}],"readme":"","readmeFilename":""}