{"_id":"@ixor/aws.cognito.token.retrieval","_rev":"59-a4b349db71a3bdf8263eb5a462c831a2","name":"@ixor/aws.cognito.token.retrieval","dist-tags":{"latest":"0.0.3"},"versions":{"0.0.1":{"name":"@ixor/aws.cognito.token.retrieval","version":"0.0.1","author":{"url":"https://github.com/ddewaele/","name":"Davy De Waele","email":"ddewaele@gmail.com"},"license":"MIT","_id":"@ixor/aws.cognito.token.retrieval@0.0.1","maintainers":[{"name":"ddewaele","email":"ddewaele@gmail.com"}],"homepage":"https://github.com/ddewaele/web-gpio-react#readme","bugs":{"url":"https://github.com/ddewaele/web-gpio-react/issues"},"bin":{"cognito-login":"index.js"},"dist":{"shasum":"8dc472f3e98c259ed0f5484cc233886a44f01e5d","tarball":"https://registry.npmjs.org/@ixor/aws.cognito.token.retrieval/-/aws.cognito.token.retrieval-0.0.1.tgz","integrity":"sha512-dyG0d5ZV+tDTHLQSS1YKYOjzQvJF7t7xltL8JHn/mJcs8HIHDBc1WaUv6q3s036UroreLenzcPDrr+8eDfI8/g==","signatures":[{"sig":"MEQCIBo5RBujNwKu9cd3OfadRJGfZzvFhXCqT50WgygoqobjAiAoit7lkQW4r1hPMqZqgp2Yb1wSwkbr2b8m9CssyHBtwg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","_from":".","_shasum":"8dc472f3e98c259ed0f5484cc233886a44f01e5d","gitHead":"45ca87992127e0e8043943e51f5fba7d26c68606","scripts":{"test":"echo \"Error: no test specified\" && exit 1","start":"node index.js"},"_npmUser":{"name":"ddewaele","email":"ddewaele@gmail.com"},"repository":{"url":"git+https://github.com/ddewaele/web-gpio-react.git","type":"git"},"_npmVersion":"3.8.3","description":"Simple Cognito client for retrieving JWT tokens from a cognito login","directories":{},"_nodeVersion":"5.10.1","dependencies":{"util":"^0.10.3","request":"^2.81.0","commander":"^2.11.0","request-promise":"^4.2.0","cognito-authenticator-cli":"^1.0.0"},"devDependencies":{"aws-sdk":"^2.8.0"},"_npmOperationalInternal":{"tmp":"tmp/aws.cognito.token.retrieval-0.0.1.tgz_1504451869468_0.6903101273346692","host":"s3://npm-registry-packages"}},"0.0.2":{"name":"@ixor/aws.cognito.token.retrieval","version":"0.0.2","author":{"url":"https://github.com/ddewaele/","name":"Davy De Waele","email":"ddewaele@gmail.com"},"license":"MIT","_id":"@ixor/aws.cognito.token.retrieval@0.0.2","maintainers":[{"name":"ixorjerre","email":"jeroen.nouws@ixor.be"},{"name":"jraeymae","email":"joris.raeymaekers@gmail.com"},{"name":"jvanhent","email":"johnny.vanhentenryk@ixor.be"},{"name":"ddewaele","email":"ddewaele@gmail.com"},{"name":"wdeclerc","email":"wim.declercq@ixor.be"}],"homepage":"https://github.com/ddewaele/web-gpio-react#readme","bugs":{"url":"https://github.com/ddewaele/web-gpio-react/issues"},"bin":{"cognito-login":"index.js"},"dist":{"shasum":"db385d0deb0f6bda3f9d5a08e139c39823208f49","tarball":"https://registry.npmjs.org/@ixor/aws.cognito.token.retrieval/-/aws.cognito.token.retrieval-0.0.2.tgz","integrity":"sha512-F2/8FbAdtp7PWan3zXEOUJbRFejuTX3SQuh/PMdUVA8VKE7ZTjlwjIiK734IkxYnnO8Edj7LL2JS/powXbkZWA==","signatures":[{"sig":"MEUCIGNuiAP6pzPPdJY9ZWWCdpPGJ+xx1CEMEwswbC9WpDeLAiEAmUQX0Zdgsoxc+au2+lQU0tEZSdK2Qa1Cy1GIotMxl8U=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","_from":".","_shasum":"db385d0deb0f6bda3f9d5a08e139c39823208f49","gitHead":"2098d8c711307bb8b7bb5fdbb23307f9b29bac4e","scripts":{"test":"echo \"Error: no test specified\" && exit 1","start":"node index.js"},"_npmUser":{"name":"ddewaele","email":"ddewaele@gmail.com"},"repository":{"url":"git+https://github.com/ddewaele/web-gpio-react.git","type":"git"},"_npmVersion":"3.8.3","description":"Simple Cognito client for retrieving JWT tokens from a cognito login","directories":{},"_nodeVersion":"5.10.1","dependencies":{"util":"^0.10.3","request":"^2.81.0","commander":"^2.11.0","request-promise":"^4.2.0","cognito-authenticator-cli":"^1.0.0"},"devDependencies":{"aws-sdk":"^2.8.0"},"_npmOperationalInternal":{"tmp":"tmp/aws.cognito.token.retrieval-0.0.2.tgz_1504459336363_0.926860531559214","host":"s3://npm-registry-packages"}},"0.0.3":{"name":"@ixor/aws.cognito.token.retrieval","version":"0.0.3","author":{"url":"https://github.com/ddewaele/","name":"Davy De Waele","email":"ddewaele@gmail.com"},"license":"MIT","_id":"@ixor/aws.cognito.token.retrieval@0.0.3","maintainers":[{"name":"ixorjerre","email":"jeroen.nouws@ixor.be"},{"name":"jraeymae","email":"joris.raeymaekers@gmail.com"},{"name":"jvanhent","email":"johnny.vanhentenryk@ixor.be"},{"name":"ddewaele","email":"ddewaele@gmail.com"},{"name":"wdeclerc","email":"wim.declercq@ixor.be"}],"homepage":"https://github.com/IxorTalk/ixortalk.aws.cognito.token.retrieval#readme","bugs":{"url":"https://github.com/IxorTalk/ixortalk.aws.cognito.token.retrieval/issues"},"bin":{"cognito-login":"index.js"},"dist":{"shasum":"33858a251aa0d6bedabb4e22195d52d0b8882ecc","tarball":"https://registry.npmjs.org/@ixor/aws.cognito.token.retrieval/-/aws.cognito.token.retrieval-0.0.3.tgz","integrity":"sha512-3i7s/oivKMNzuQsUL4g4VbIAdCmH2IRwKL7ZjpCufpoDpLQBd5oQufheAjj5CmER4nk+eRwoTtH3RtEB7YYiPQ==","signatures":[{"sig":"MEUCIQC1Ufd9giB0Sgnx+/kIQZJMkPDeGVVvx6CXZ+HoVAapmQIgCUP71NcW5svpz737CInXLWSVkLfQV4I0NAYcMYslxK4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","_from":".","_shasum":"33858a251aa0d6bedabb4e22195d52d0b8882ecc","gitHead":"e1b7fb09226202be13fb43a7d7e5f026b3cfb33a","scripts":{"test":"echo \"Error: no test specified\" && exit 1","start":"node index.js"},"_npmUser":{"name":"ddewaele","email":"ddewaele@gmail.com"},"repository":{"url":"git+https://github.com/IxorTalk/ixortalk.aws.cognito.token.retrieval.git","type":"git"},"_npmVersion":"3.8.3","description":"Simple Cognito client for retrieving JWT tokens from a cognito login","directories":{},"_nodeVersion":"5.10.1","dependencies":{"util":"^0.10.3","request":"^2.81.0","commander":"^2.11.0","request-promise":"^4.2.0","cognito-authenticator-cli":"^1.0.0"},"devDependencies":{"aws-sdk":"^2.8.0"},"_npmOperationalInternal":{"tmp":"tmp/aws.cognito.token.retrieval-0.0.3.tgz_1504459532600_0.4750309088267386","host":"s3://npm-registry-packages"}}},"time":{"created":"2017-09-03T15:17:50.554Z","modified":"2025-10-29T05:34:58.988Z","0.0.1":"2017-09-03T15:17:50.554Z","0.0.2":"2017-09-03T17:22:17.344Z","0.0.3":"2017-09-03T17:25:33.504Z"},"bugs":{"url":"https://github.com/IxorTalk/ixortalk.aws.cognito.token.retrieval/issues"},"author":{"url":"https://github.com/ddewaele/","name":"Davy De Waele","email":"ddewaele@gmail.com"},"license":"MIT","homepage":"https://github.com/IxorTalk/ixortalk.aws.cognito.token.retrieval#readme","repository":{"url":"git+https://github.com/IxorTalk/ixortalk.aws.cognito.token.retrieval.git","type":"git"},"description":"Simple Cognito client for retrieving JWT tokens from a cognito login","maintainers":[{"email":"sysadmin@ixor.be","name":"sysadmin_at_ixor_dot_be"},{"email":"ci@ixor.be","name":"ixorci"}],"readme":"```\n  _____             _______    _ _             __          _______       _____                  _ _                 ___          _________\n |_   _|           |__   __|  | | |           /\\ \\        / / ____|     / ____|                (_) |               | \\ \\        / /__   __|\n   | | __  _____  _ __| | __ _| | | __       /  \\ \\  /\\  / / (___      | |     ___   __ _ _ __  _| |_ ___          | |\\ \\  /\\  / /   | |\n   | | \\ \\/ / _ \\| '__| |/ _` | | |/ /      / /\\ \\ \\/  \\/ / \\___ \\     | |    / _ \\ / _` | '_ \\| | __/ _ \\     _   | | \\ \\/  \\/ /    | |\n  _| |_ >  < (_) | |  | | (_| | |   <      / ____ \\  /\\  /  ____) |    | |___| (_) | (_| | | | | | || (_) |   | |__| |  \\  /\\  /     | |\n |_____/_/\\_\\___/|_|  |_|\\__,_|_|_|\\_\\    /_/    \\_\\/  \\/  |_____/      \\_____\\___/ \\__, |_| |_|_|\\__\\___/     \\____/    \\/  \\/      |_|\n\n```\n\n# Introduction\n\nSimple CLI tool to interact with Cognito user pools.\n\nWill print out the JWT token based on a Cognito username / password\n\n# Installation\n\nModule can be installed globally via\n\n```\nnpm install -g @ixor/aws.cognito.token.retrieval\n```\n\n# Preperation\n\nBefore you can start using the CLI, you'll need to provide 2 JSON config files\n\n- ${USER_HOME}/.ixortalk.aws.cognito/cognito-env.json\n- ${USER_HOME}/.ixortalk.aws.cognito/users.json\n\nThese will define your cognito environments and your users.\n\n# Config files\n\n## Cognito environments\n\nYou can define 1 or more cognito environments using the following syntax.\n\n```\n{\n  \"dev\": {\n    \"UserPoolId\": \"eu-central-1_xxxxxx\",\n    \"ClientId\": \"xxxxxxxxxxxxxx\",\n    \"IdentityPoolId\": \"eu-central-1:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx\",\n    \"AWSRegion\": \"eu-central-1\"\n  },\n  \"test\": {\n    \"UserPoolId\": \"eu-central-1_xxxxxx\",\n    \"ClientId\": \"xxxxxxxxxxxxxx\",\n    \"IdentityPoolId\": \"eu-central-1:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx\",\n    \"AWSRegion\": \"eu-central-1\"\n  },\n  \"prod\": {\n    \"UserPoolId\": \"eu-central-1_xxxxxx\",\n    \"ClientId\": \"xxxxxxxxxxxxxx\",\n    \"IdentityPoolId\": \"eu-central-1:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx\",\n    \"AWSRegion\": \"eu-central-1\"\n  }\n}\n```\n\nDefine these environments in `${USER_HOME}/.ixortalk.aws.cognito/cognito-env.json`\n\n## User environments\n\nYou can define 1 or more users using the following syntax.\n\n\n```\n{\n  \"admin\": {\n    \"Password\": \"SecretPwd_123\",\n    \"email\": \"admin@acme.corp\"\n  },\n  \"user\": {\n    \"Password\": \"SecretPwd_123\",\n    \"email\": \"user@acme.corp\"\n  }\n}\n```\n\nDefine these users in `${USER_HOME}/.ixortalk.aws.cognito/users.json`\n\n# Usage\n\n```\ncognito-login -h\n\n  Usage: cognito-login [options]\n\n\n  Options:\n\n    -V, --version                    output the version number\n    -e, --environment <environment>  The aws cognito environment\n    -u, --username <username>        The username\n    -p, --password <password>        The password (when not provided, the one from the config will be used) \n    -h, --help                       output usage information\n```\n\n\n\n# Example\n\nTo retrieve the JWT token for the admin user for your AWS cognito dev environment.\nIf your users file already contains the admin user, you can ommit the password.)\n\nSimply copy / paste the export line at the end of the output and use the `$TOKEN` variable in your scripting \n```\ncognito-login -e dev -u admin -p SecretPwd_123\n\n  _____             _______    _ _             __          _______       _____                  _ _                 ___          _________\n |_   _|           |__   __|  | | |           /\\ \\        / / ____|     / ____|                (_) |               | \\ \\        / /__   __|\n   | | __  _____  _ __| | __ _| | | __       /  \\ \\  /\\  / / (___      | |     ___   __ _ _ __  _| |_ ___          | |\\ \\  /\\  / /   | |\n   | | \\ \\/ / _ \\| '__| |/ _` | | |/ /      / /\\ \\ \\/  \\/ / \\___ \\     | |    / _ \\ / _` | '_ \\| | __/ _ \\     _   | | \\ \\/  \\/ /    | |\n  _| |_ >  < (_) | |  | | (_| | |   <      / ____ \\  /\\  /  ____) |    | |___| (_) | (_| | | | | | || (_) |   | |__| |  \\  /\\  /     | |\n |_____/_/\\_\\___/|_|  |_|\\__,_|_|_|\\_\\    /_/    \\_\\/  \\/  |_____/      \\_____\\___/ \\__, |_| |_|_|\\__\\___/     \\____/    \\/  \\/      |_|\n                                                                                     __/ |\n                                                                                    |___/\n\nawsEnvironment : \n { UserPoolId: 'eu-central-1_0VEinu0cg',\n  ClientId: 'm6uu1npo6fpt4oeitb6a7475m',\n  IdentityPoolId: 'eu-central-1:68f40db0-62e8-44f2-9a29-7b4658aa747b',\n  AWSRegion: 'eu-central-1' }\n\nuser : \n admin\n\ncredential : \n { Password: 'SecretPwd_123' }\n\n\nexport TOKEN=eyJraWQiOiIxRWpWRXlNR3BYXC9jV0J5eTVtYlFEWW0wR0lhTjF2eVlYT1pLNkZtSTJ3Yz0iLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiJiNDgwZTQxNi1kYmNhLTQ4NjktYTU4OC1mZjdjODJmY2ZiYWEiLCJhdWQiOiJtNnV1MW5wbzZmcHQ0b2VpdGI2YTc0NzVtIiwiY29nbml0bzpncm91cHMiOlsiQWRtaW4iXSwiZW1haWxfdmVyaWZpZWQiOnRydWUsInRva2VuX3VzZSI6ImlkIiwiYXV0aF90aW1lIjoxNTA0NDQ5NjkyLCJpc3MiOiJodHRwczpcL1wvY29nbml0by1pZHAuZXUtY2VudHJhbC0xLmFtYXpvbmF3cy5jb21cL2V1LWNlbnRyYWwtMV8wVkVpbnUwY2ciLCJjb2duaXRvOnVzZXJuYW1lIjoiYWRtaW4iLCJleHAiOjE1MDQ0NTMyOTIsImlhdCI6MTUwNDQ0OTY5MiwiZW1haWwiOiJkZGV3YWVsZUBnbWFpbC5jb20ifQ.EFVf4oVyAdJ7Zs_763OG69YsX8ss13Fy1MjzcvWfAFOlbP4F0RvqTolOif8szaPhG5FFf-TlGkfaEX3gulJfXU8cS-7WIf8BmQ9NnkUNmXxjmPo5wmCFzaj__rNqWM9D22vaaTCBfffmNI-EQ6PL0nTIzcSGNB7rr59VRYQ1B-5zoKDNNSwdtiBjxCppjLGs1-C_7tnW6EAenq2DUSlRYIt-kzQR7OjhkHsOI20pyHlv_SY5hCMHSHI6jdEuqqtqUbKG8JlPmx9WC9SEencEIlB0KMjVZl3qGi8wlqvGn8GrSwunkGSUNnpoyL97ohdIH2W1Di8quURwdqO0qwa2Ow\n```\n\nYou can then use these tokens like this\n\n```\ncurl -v -H \"Authorization: $TOKEN\" <some rest endpoint>\n```\n\n# License\n\n```\nThe MIT License (MIT)\n\nCopyright (c) 2016-present IxorTalk CVBA\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n```","readmeFilename":"README.md"}