{"name":"@continuous-auth/client","version":"1.2.2","author":{"name":"Samuel Attard"},"license":"MIT","_id":"@continuous-auth/client@1.2.2","maintainers":[{"name":"marshallofsound","email":"samuel.r.attard@gmail.com"}],"dist":{"shasum":"4e3a8ece890ab3d278e7a4c3296ce84dae96a728","tarball":"http://registry-npm.ywwl.com/@continuous-auth/client/download/@continuous-auth/client-1.2.2.tgz","fileCount":15,"integrity":"sha512-4DPi+V8XGvHyX3LpDLVE04HATEden3KhYh9Z1d0kyqbwEDXi1fiQTxJWrhejIDqncWbWyIFJn5j247nN5oLZkw==","signatures":[{"sig":"MEQCIDNaLUAG9spSW237219tYFaCfd1QcPvbqTsMjDKLR/LvAiAdbWkzOMMWyCBTHMjT7Tq/YTqNm0hj/twOd0ddPCLVsA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":168899,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJda4LqCRA9TVsSAnZWagAAPv0P/0VAsq4GSta7gq4yIfQe\nylye0VKDfmd+eS/OqQHhzw1UOceNoJ2jv2uCvW4vAf0LYIY4zER3xzsVhzCL\nZoYiedsLoMJjrokuF8sBHqouaznmsc6ku6B7fIIL/anVhOXB6jJ67hLPLT4R\nCW/SZi4oTyP7wdAvoXZxA+2jgCoFPs804fk2IbrKNiDJpt5RICjfglc3uPrU\nX1j8epz2lg29E/Na30/iFHwPN3ME/wqAeZ6ebFpVsx3gc/kItbrVtLM/zprJ\nQ6z5MN3Qk5kJ5al5I1kqrqV1mbKb1KYfGy5mpBLU0EsMZggF4VWhI+Y1o7hs\nFeddWmjac6054+e8EGAEl+YzYJabvwDC2Lr0lGl6qSqhFPrbYNljcVgm+uit\nKwnHVtyF2oGv6Tgu2i4/Me+P1DteMttte12/xC/+o2UEF1KeJ2K1ktOE73cf\nd3kidsONifWmZMFaEx75/J1gy+EwBM0P+PN7Q9bCrfU3MhEp2ve2CbOeII1H\nimpikrIAJYdXU8tusQ7AxkLiMwYbY7M+wt57D8b1DETFRSGXl3JI766hV8qc\nlT7uXfl75ER7OaqFAad3lLQkYXYLsD0vig6prFwj05UzQkwro/in2SeVP5/T\nuD3WW5dR6MDACaUmxiHWLw1WPW3cUpVsWrL1Vic18gNlxPdWFwPuM02HKGLi\nGh8w\r\n=Dfvy\r\n-----END PGP SIGNATURE-----\r\n","size":65256,"noattachment":false,"key":"/@continuous-auth/client/-/@continuous-auth/client-1.2.2.tgz"},"main":"lib/module/index.js","gitHead":"626b62cd293f866f63fbda307c04d76996fc9c88","scripts":{"dev":"cross-env DATABASE_URL=postgresql://cfa-user:cfa-pass@localhost:5433/cfa node lib/server","test":"jest --coverage","build":"yarn server-install && yarn build-server","start":"node lib/server","test:local":"cross-env STORE_PREFIX=local.test TESTING_DATABASE_URL=postgresql://cfa-user:cfa-pass@localhost:5433/cfa yarn test","build-server":"tsc && cp -r src/server/node_modules/ lib/server/node_modules/","prettier:write":"prettier --write \"src/**/*.{ts,tsx}\"","server-install":"cd src/server && cross-env NODE_ENV=production yarn --production"},"_npmUser":{"name":"marshallofsound","email":"samuel.r.attard@gmail.com"},"_npmVersion":"6.4.1","description":"Safely enable 2FA on your CI published packages","directories":{},"_nodeVersion":"8.11.4","dependencies":{"axios":"^0.18.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^24.1.0","ts-jest":"^24.0.0","prettier":"^1.16.4","cross-env":"^5.2.0","typescript":"^3.3.3333","@types/jest":"^24.0.9","@types/node":"^11.9.6","@types/uuid":"^3.4.4","@types/morgan":"^1.7.35","@types/express":"^4.16.1","@types/pg-promise":"^5.4.3","@types/body-parser":"^1.17.0","@types/dotenv-safe":"^5.0.3"},"_npmOperationalInternal":{"tmp":"tmp/client_1.2.2_1567326953673_0.36916773759754795","host":"s3://npm-registry-packages"},"heroku-run-build-script":true,"readme":"# @continuous-auth/client\n\n[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/continuousauth/node-client/ci.yaml?branch=main&label=CI&logo=github)](https://github.com/continuousauth/node-client/actions/workflows/ci.yaml)\n[![GitHub Workflow Status](https://img.shields.io/badge/CFA-Enabled-success)](https://github.com/continuousauth)\n[![npm version](http://img.shields.io/npm/v/@continuous-auth/client.svg)](https://npmjs.org/package/@continuous-auth/client)\n\nThis module expects to be run in a [Supported CI Environment](https://docs.continuousauth.dev/usage/circleci).  It infers a lot of variables from environment variables, these config variables are outlined below.\n\n## Config\n\n* `CFA_PROJECT_ID` - The ID of your project on CFA\n* `CFA_SECRET` - The secret assoicated with your project on CFA, you get this from the [CFA Dashboard](https://continuousauth.dev)\n\n## API\n\n### `getOtp()`\n\nReturns `Promise<string>`.\n\nThis promise eventually resolves with a valid OTP code, please be aware that this code is user provided and therefore may have been entered incorrectly.  You also need to use OTP codes quite quickly as they typically expire within 30 seconds.\n\n### `validateConfiguration()`\n\nReturns `Promise<void>`.\n\nThis promise will resolve if your project ID and secret are a valid combination for the current CI provider.  It will be rejected if they are deemed invalid by the CFA service.\n\n## Example\n\n```js\n// Publish the package in the CWD with an OTP code from CFA\nimport { getOtp } from '@continuous-auth/client';\nimport { spawnSync } from 'child_process';\n\nspawnSync('npm', ['publish', '--otp', await getOtp()])\n```\n","publish_time":1567326953798,"_cnpm_publish_time":1567326953798,"dist-tags":{"latest":"2.3.2"}}