{"_id":"@boris-turner/amphora-auth","_rev":"2-4060a6b4cee6a771f0732c717e8b2ff4","name":"@boris-turner/amphora-auth","dist-tags":{"latest":"1.2.0-cnn.0"},"versions":{"1.2.0":{"name":"@boris-turner/amphora-auth","version":"1.2.0","description":"An auth adapter for Amphora","main":"index.js","scripts":{"lint":"eslint --max-warnings 0 *.js","test":"npm run lint && jest","coveralls":"cat ./coverage/lcov.info | coveralls"},"author":"","license":"MIT","dependencies":{"basic-auth":"^2.0.1","bcryptjs":"^2.4.3","bluebird":"^3.5.3","clay-log":"^1.3.1","clayhandlebars":"^3.2.6","connect-redis":"^3.4.0","express-flash":"0.0.2","express-session":"^1.15.6","passport":"^0.3.2","passport-cognito-oauth2":"^0.1.1","passport-google-oauth":"^1.0.0","passport-http-header-token":"^1.1.0","passport-ldapauth":"^2.1.1","passport-local":"^1.0.0","passport-slack":"0.0.7","passport-twitter":"^1.0.4","through2-map":"^3.0.0"},"devDependencies":{"coveralls":"^3.0.3","eslint":"^5.12.0","jest":"^24.1.0","levelup":"^1.3.9","memdown":"^1.4.0"},"gitHead":"5318ddde1afeebd51bf0d604c34e40cdc54b7d77","publishConfig":{"access":"public"},"_id":"@boris-turner/amphora-auth@1.2.0","_nodeVersion":"12.8.0","_npmVersion":"lerna/3.16.4/node@v12.8.0+x64 (darwin)","dist":{"integrity":"sha512-qu0iZuLgggLY3Sa0ImLbG3zVhi3RC60+BqeYknRg+4x7Gv2ismWPjXc68bn13EV+5LuvYZxpOPBl6NJmZPXtvg==","shasum":"ed7c0d5721c28c14521b1f8ed396a9cfb4b93e6f","tarball":"https://registry.npmjs.org/@boris-turner/amphora-auth/-/amphora-auth-1.2.0.tgz","fileCount":63,"unpackedSize":130757,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdaIDdCRA9TVsSAnZWagAAtPEP/2c+rK+QWBIE0APTmwxJ\nHw/EVimA/15ZzGwoaU2HYiukqek28IB7i/Uq4YMWEUL0bjjQLvjDb9dEgFIJ\ntiNi6EyU22UQuIiWjBCAc9KYeKvF6lhw/KsTxGITvgDA5tFjCM9qFPdA9PvG\nbMkULU1oaWv0qDokCaGncabplEtG/NK/H7tl1KX1XV7Dlp6Oy0X0qEBrN9Ry\nmr2O3OpVFB3mVUTG5/nrrjKBaH2kBRG2PA0TqNcamaX6o9pSqDOu5HyTkTL4\nYUQLIS7Bs42Trg25l7jNi7SSPPFiPxa3K92ROWTH59gl1Ov347rnDmhI/ipQ\nsAtjLFSkzOV5FDlm2n27V9kBmwXu/XUcWBICm2EIxTyL/0Ckiolhnkb5Y8xK\n4xEFKY3ZmxZbj11/ZwEBZ8M5CRZrVoB1EAfuaPwsNBDr9nzp3C6Zsti/thfQ\nGGtVS1+la8JNZX9WFbqW4nRl4aFP1L7rUsQGP2Cyo6sLgh9riqudb/NbSoQk\nNoifNd4mKNzVfPPsp62py9P+P4c2SUfdkDZHymvNtrJ5dDm4amMWsVVgZ6eu\nQvWAkpPlxXk9SBjHDYmFfhbbtKdqMc2z1O7oxIq27gqdR43SvxbjXjOvJIoy\ndGEnii37TTa4fvHMaU0hOUzlQGx3dWqJKxWkkRFGF7w7l1eV33rmfHctTE7D\n+eIp\r\n=bsOg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIB0ux9I0EvRYJs9LnS/0QKIeJ08BCqJLxY/cUxh18oAGAiEAshYBuq0GEjk4uvcBkORv5fMh3+jClCPF+fwLG0J+A/0="}]},"maintainers":[{"name":"boris-turner","email":"boris.musa@turner.com"}],"_npmUser":{"name":"boris-turner","email":"boris.musa@turner.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/amphora-auth_1.2.0_1567129820515_0.9933215532151691"},"_hasShrinkwrap":false},"1.2.0-cnn.0":{"name":"@boris-turner/amphora-auth","version":"1.2.0-cnn.0","description":"An auth adapter for Amphora","main":"index.js","scripts":{"lint":"eslint --max-warnings 0 *.js","test":"npm run lint && jest","coveralls":"cat ./coverage/lcov.info | coveralls"},"author":"","license":"MIT","dependencies":{"basic-auth":"^2.0.1","bcryptjs":"^2.4.3","bluebird":"^3.5.3","clay-log":"^1.3.1","clayhandlebars":"^3.2.6","connect-redis":"^3.4.0","express-flash":"0.0.2","express-session":"^1.15.6","passport":"^0.3.2","passport-cognito-oauth2":"^0.1.1","passport-google-oauth":"^1.0.0","passport-http-header-token":"^1.1.0","passport-ldapauth":"^2.1.1","passport-local":"^1.0.0","passport-slack":"0.0.7","passport-twitter":"^1.0.4","through2-map":"^3.0.0"},"devDependencies":{"coveralls":"^3.0.3","eslint":"^5.12.0","jest":"^24.1.0","levelup":"^1.3.9","memdown":"^1.4.0"},"gitHead":"4ea81cdbe6876df9fb02f13513baba9ac6806a62","publishConfig":{"access":"public"},"_id":"@boris-turner/amphora-auth@1.2.0-cnn.0","_nodeVersion":"12.8.0","_npmVersion":"lerna/3.16.4/node@v12.8.0+x64 (darwin)","dist":{"integrity":"sha512-9Erpj+hbHV2xfVecbebytujM/N4iKFBYyzXrZcHLVKYK5f2lsohdH6vCelkM/dP2fjNwH5xFN3ThiYQ//htSUg==","shasum":"5aa8fd3a3764775212299bb557723b3de0601d74","tarball":"https://registry.npmjs.org/@boris-turner/amphora-auth/-/amphora-auth-1.2.0-cnn.0.tgz","fileCount":63,"unpackedSize":130763,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdmjFGCRA9TVsSAnZWagAA6sYP/1A/1Kp6MO+e8ftAsq0r\npW6ThGDwSS6+JE7ueqUIkYq2c6Hf+5LldRbHHnRilzb67kqMqvS0DafuS1co\nxIIBXiO/wfWKUNMXuE/yCwbS8qrQa3yC9lQQsEvbJRDGf0W47F7lSBLOLdW4\nqpqjOwhXtr5/HZpTfGTsIabkHYUDgKppagG/jeCC/eNeMMlkd3o7uSOss9ac\n2LksHbGq9p7Lhiu61dPMKoV03PQk88BQuFoJteyiN6ol6Rq1Xw1PDH0uapY6\ndrly4oqsYz+bXk2q5oebkk7LA4+OuVPMoqUaq5peQWfH8nNc+avuCuUg1GSa\noX9dlDMDvd7zssqxUtg6BR1YLY1DzyUf+5Z53qC4i2gMZR/vep2V8cTWRTsu\nSLpVYRS5iVa+qVeJ7zoeHw6VAtbMmM+ARoKz0Yz8iYdU6afJyN4mjzcG0O9d\nc9XKei2IQrqSkQCXoX71IH9Zmyk/rvQsGk/GdK/1y87zfKmzBhKW6L/oZeSm\nrs3pfqg+dUDxaS5a4GXZLvbkW2QwO0rHf8dhUCfF3FpG60O2ihGunIByIDf8\nYW+NrphJkKqB4GGk35RI4k250lVdYLLwAQQCi+trXDtehBYTy8QzGwybbETo\nAKQzoZazHri+rEcyS6R6XT9ldUAxXPrB2awz4TFNLjbweUXbO5xzk0+qIm6R\ngAfF\r\n=a8mR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCcguXT0t6JPNLTW0Owa6vHv22DbFE+q1OM5PJJnRmiBwIgZR1QXqeoIq+DDpI8PDPrxN4e38xhn49/Kx1LjdI+E8I="}]},"maintainers":[{"name":"boris-turner","email":"boris.musa@turner.com"}],"_npmUser":{"name":"boris-turner","email":"boris.musa@turner.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/amphora-auth_1.2.0-cnn.0_1570386246195_0.5457849789041078"},"_hasShrinkwrap":false}},"time":{"created":"2019-08-30T01:50:20.183Z","1.2.0":"2019-08-30T01:50:20.687Z","modified":"2022-04-04T20:12:49.488Z","1.2.0-cnn.0":"2019-10-06T18:24:06.358Z"},"maintainers":[{"name":"boris-turner","email":"boris.musa@turner.com"}],"description":"An auth adapter for Amphora","license":"MIT","readme":"# Amphora Auth [![Coverage Status](https://coveralls.io/repos/github/clay/amphora-auth/badge.svg?branch=master)](https://coveralls.io/github/clay/amphora-auth?branch=master)\n\nA module for Amphora to offer authentication in [Clay](https://clay.nymag.com/).\n\n## Installation & Usage\n\nFirst, install the module:\n\n```bash\nnpm install -s amphora-auth\n```\n\nThen, call the module when setting up the routes for Amphora by passing the required parameters:\n\n```js\n// Initialize auth module\namphoraAuth({\n  router // Site router\n  providers, // Authentication providers\n  store, // Redis Session Store\n  site, // Site metadata\n  storage, // DB instance\n  bus // Redis bus instance\n});\n```\n\n## Authentication\n\nThis module provides local authentication in Clay with a username and password and allows for easy configuration of Oauth for authentication with third-party providers. Here's a list of the supported providers:\n\n- Google\n- Twitter\n- Slack\n- Cognito\n- LDAP\n\nTo get started editing in Clay, create a user account. The easiest way to do this is to create a `user.yml` file that looks like this:\n\n```yml\n_users:\n  - # Google User\n    username: <your full email address>\n    provider: google\n    auth: admin\n  - # Local User\n    username: myuser\n    password: mypassword\n    provider: local\n    auth: admin\n```\n\nAnd import the configuration using [claycli](https://github.com/clay/claycli):\n\n```bash\ncat user.yml | clay import -k <local_api_key> -y localhost\n```\n\n## Environmental Variables\n\nThe following env variables are required in order to be able to authenticate a user through the providers:\n\n```bash\nexport CLAY_PROVIDER=google\n\nexport TWITTER_CONSUMER_KEY=<TWITTER_CONSUMER_KEY>\nexport TWITTER_CONSUMER_SECRET=<TWITTER_CONSUMER_SECRET>\n\nexport GOOGLE_CONSUMER_KEY=<GOOGLE_CONSUMER_KEY>\nexport GOOGLE_CONSUMER_SECRET=<GOOGLE_CONSUMER_SECRET>\n\nexport SLACK_CONSUMER_KEY=<SLACK_CONSUMER_KEY>\nexport SLACK_CONSUMER_SECRET=<SLACK_CONSUMER_SECRET>\n\nexport COGNITO_CONSUMER_KEY=<COGNITO_CLIENT_ID>\nexport COGNITO_CONSUMER_SECRET=<COGNITO_SECRET>\nexport COGNITO_CONSUMER_DOMAIN=<COGNITO_AUTHENICATION_DOMAIN>\nexport COGNITO_CONSUMER_REGION=<COGNITO_INSTANCE_REGION>\n\nexport LDAP_URL=<LDAP_URL>\nexport LDAP_BIND_DN=<LDAP_BIND_DN>\nexport LDAP_BIND_CREDENTIALS=<LDAP_BIND_CREDENTIALS>\nexport LDAP_SEARCH_BASE=<LDAP_SEARCH_BASE>\nexport LDAP_SEARCH_FILTER=<LDAP_SEARCH_FILTER>\n```\n\n## License\n\nMIT\n","readmeFilename":"README.md"}