{"_id":"@digilent/digilent-auth-js","_rev":"6-7a9833bc8877fafbbc7ffbbb4123ff1d","name":"@digilent/digilent-auth-js","description":"Digilent wrapper module for user authentication using AWS Cognito","dist-tags":{"latest":"1.0.2"},"versions":{"1.0.0":{"name":"@digilent/digilent-auth-js","version":"1.0.0","description":"Digilent wrapper module for user authentication using AWS Cognito","main":"index.js","scripts":{"test":"jasmine spec/core.js","prepublish":"npm run build","clean":"rm -rf dist && rm -rf bundle","docs":"typedoc --out ./docs ./src","build":"npm run clean && tsc && webpack bundleHelper.js ./bundle/digilent-auth-js.js && npm run docs"},"author":{"name":"Digilent"},"license":"MIT","devDependencies":{"@types/node":"^7.0.12","jasmine":"^2.8.0","jasmine-node":"^1.14.5","syncprompt":"^2.0.0","typescript":"2.0.10","uglify-js":"^3.0.28","webpack":"^3.5.3","typedoc":"^0.9.0"},"dependencies":{"amazon-cognito-identity-js":"^1.19.0","aws-sdk":"^2.104.0"},"gitHead":"08b32b232aedb753fc3a46ccb34bc625e44bcc50","_id":"@digilent/digilent-auth-js@1.0.0","_shasum":"c0ef1edcc65c6b26ebdb09fe8d36a4c4e89d97ad","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.11.4","_npmUser":{"name":"digilent","email":"software@digilent.com"},"dist":{"shasum":"c0ef1edcc65c6b26ebdb09fe8d36a4c4e89d97ad","tarball":"https://registry.npmjs.org/@digilent/digilent-auth-js/-/digilent-auth-js-1.0.0.tgz","integrity":"sha512-OOGOvsC/OpEn5fcgtZJnxQv1F54ORpXA+kPoYfMJZJyn6XkHRORfBk4/iDLClklZFaiHplzo+amBQ1vkLhUJqw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDwG1co5Pf4avLscfEdjhzd3OJ77fCJ/UyjO+e/hsoM8gIgOiGgbSTQP0ixWEzcbz+9WX4pvR4n6QM8HISwu/gCa3g="}]},"maintainers":[{"name":"digilent","email":"software@digilent.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/digilent-auth-js-1.0.0.tgz_1513810848104_0.45141941122710705"},"directories":{}},"1.0.1":{"name":"@digilent/digilent-auth-js","version":"1.0.1","description":"Digilent wrapper module for user authentication using AWS Cognito","main":"index.js","scripts":{"test":"jasmine spec/core.js","prepublish":"npm run build","clean":"rm -rf dist && rm -rf bundle","docs":"typedoc --out ./docs ./src","build":"npm run clean && tsc && webpack bundleHelper.js ./bundle/digilent-auth-js.js && npm run docs"},"author":{"name":"Digilent"},"license":"MIT","devDependencies":{"@types/node":"^7.0.12","jasmine":"^2.8.0","jasmine-node":"^1.14.5","syncprompt":"^2.0.0","typescript":"2.0.10","uglify-js":"^3.0.28","webpack":"^3.5.3","typedoc":"^0.9.0"},"dependencies":{"amazon-cognito-identity-js":"^1.19.0"},"gitHead":"52698915260a715015fd3fce0606d7b6c83106ba","_id":"@digilent/digilent-auth-js@1.0.1","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"digilent","email":"software@digilent.com"},"dist":{"integrity":"sha512-8ngNUiHXZfxKy2phtFKRMhjLmpd4r8AI0C3r/ExsEMLYV2k/IontcxaRFbzVw13ZUtTWS8eH/l08uK1TAmkWtw==","shasum":"d409cc0d6f9ab68e2d03e2a5c678d34f3e00c5c1","tarball":"https://registry.npmjs.org/@digilent/digilent-auth-js/-/digilent-auth-js-1.0.1.tgz","fileCount":12,"unpackedSize":45791,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCCUYo7Zdn4VXp9csd9fAREicDrang4Maa7e+x1d/NnIAIhAKH0mkhwBdsog/JbvKrZDpeDcf66L1z6APgxby/AQ2oo"}]},"maintainers":[{"name":"digilent","email":"software@digilent.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/digilent-auth-js_1.0.1_1522268429759_0.6029305947998924"},"_hasShrinkwrap":false},"1.0.2":{"name":"@digilent/digilent-auth-js","version":"1.0.2","description":"Digilent wrapper module for user authentication using AWS Cognito","main":"index.js","scripts":{"test":"jasmine spec/core.js","prepare":"npm run build","clean":"rm -rf dist && rm -rf bundle","docs":"typedoc --out ./docs ./src","build":"npm run clean && tsc && webpack bundleHelper.js ./bundle/digilent-auth-js.js && npm run docs"},"author":{"name":"Digilent"},"license":"MIT","devDependencies":{"@types/node":"^7.0.12","jasmine":"^2.8.0","jasmine-node":"^1.14.5","syncprompt":"^2.0.0","typescript":"2.0.10","uglify-js":"^3.0.28","webpack":"^3.5.3","typedoc":"^0.9.0"},"dependencies":{"amazon-cognito-identity-js":"^1.19.0"},"gitHead":"aad372c3e4b42c06835bc4b2762c6d7b2f23a519","_id":"@digilent/digilent-auth-js@1.0.2","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"digilent","email":"software@digilent.com"},"dist":{"integrity":"sha512-GDerdK/NvwKPO8ntdrgjc/pVdzleklGCXOT8T+Hq/k8ILRzxw1LhsaKZAvAhh/lxjH35yrMKNeHQOcdyjjy31Q==","shasum":"16127b484aceb822abbde80388c4fc9be74b4f07","tarball":"https://registry.npmjs.org/@digilent/digilent-auth-js/-/digilent-auth-js-1.0.2.tgz","fileCount":12,"unpackedSize":49675,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCaWUp9N9h8HDyHM2Y8gh2K4WRkRyKCiz4fKRnYGUvkawIgZ3zeOQ4YUC+ZKpaEj72W4jJWZx1WDsUxSFeSsxwtSSk="}]},"maintainers":[{"name":"digilent","email":"software@digilent.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/digilent-auth-js_1.0.2_1522337704258_0.6140494486264692"},"_hasShrinkwrap":false}},"readme":"# Digilent Auth JS\r\n\r\nDigilent wrapper module for user authentication using AWS Cognito\r\n\r\n## Getting Started\r\n\r\nThese instructions will get you a copy of the project up and running on your local machine.\r\n\r\n### Prerequisites\r\n\r\n1. Node.js\r\n2. npm\r\n\r\n### Subdirectories\r\n* **bundle**\r\n  * Contains a bundled js file.\r\n* **dist**\r\n  * Contains the built files ready for release.\r\n* **docs**\r\n  * Contains built documentation from source.\r\n* **examples**\r\n  * Contains simple examples demonstrating how to use this library.\r\n* **spec**\r\n  * Contains test files.\r\n* **src**\r\n  * Contains the source files.\r\n\r\n### Installing\r\n\r\nClone this repository\r\n\r\n```\r\ngit clone https://github.com/Digilent/digilent-auth-js.git\r\n```\r\n\r\nMove to project directory\r\n\r\n```\r\ncd digilent-auth-js\r\n```\r\n\r\nInstall dependencies\r\n\r\n```\r\nnpm install\r\n```\r\n\r\n#### Use with Ionic\r\nInstall AWS SDK \r\n```\r\nnpm install --save aws-sdk\r\n````\r\n\r\nImport AWS SDK into app.component.ts \r\n```\r\nimport 'aws-sdk';\r\n```\r\n\r\nInstall DigilentAuthJs: \r\n```\r\nnpm install --save @digilent/digilent-auth-js\r\n```\r\n\r\nAdd DigilentAuthJs as a provide in app.module.ts\r\n```\r\nimport { DigilentAuthJs } from '@digilent/digilent-auth-js';\r\n\r\n...\r\n\r\nproviders: [    \r\n    DigilentAuthJs,\r\n    ...\r\n]\r\n```\r\n\r\nImport DigilentAuthJs where needed and use dependency injection\r\n```\r\nimport {DigilentLambdaJs} from '@digilent/digilent-lambda-js';\r\n\r\n...\r\n\r\nconstructor(\r\n){\r\n  public digilentAuth: DigilentAuthJs,\r\n  ...\r\n}\r\n```\r\n\r\nInitialize with AWS credentials (it's recommended to do this early in app.component.ts)\r\n```\r\nthis.digilentAuth.initialize(USER_POOL_ID, CLIENT_ID, REGION, IDENTITY_POOL_ID);\r\n```\r\n\r\n**Note**: If node-gyp rebuild fails, try the following command:\r\n\r\n```\r\nnpm install --global --production windows-build-tools\r\n```\r\n\r\nRun the example by opening an index.html in the examples folder.\r\n\r\n## License\r\n\r\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details","maintainers":[{"name":"digilent","email":"software@digilent.com"}],"time":{"modified":"2022-06-12T17:03:59.659Z","created":"2017-12-20T23:00:48.213Z","1.0.0":"2017-12-20T23:00:48.213Z","1.0.1":"2018-03-28T20:20:29.824Z","1.0.2":"2018-03-29T15:35:04.302Z"},"author":{"name":"Digilent"},"license":"MIT","readmeFilename":"README.md"}