{"name":"@continuous-auth/client","version":"2.2.2","author":{"name":"Samuel Attard"},"license":"MIT","_id":"@continuous-auth/client@2.2.2","maintainers":[{"name":"marshallofsound","email":"samuel.r.attard@gmail.com"}],"dist":{"shasum":"8f81b17db385ad0d4f4ebaaf3f29550fba35cf76","tarball":"http://registry-npm.ywwl.com/@continuous-auth/client/download/@continuous-auth/client-2.2.2.tgz","fileCount":20,"integrity":"sha512-DC1+Uor/Unt5UAnW8zAc/V/dwDU/zFksDC+/syA4PGvWg5oVqJGNdCw8lYU2Us3LUHk9ac+dkjCPk/MoHmY+Kw==","signatures":[{"sig":"MEUCIDtieswVhJPwjpI27kMKHAhP/V1wn36Lj1no18HaEgF5AiEA1wIGsz4Y0KbnCX+EUHuB7mQX+w0cab61w9RFhSsnYPg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":25356,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjLApBACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpTtQ/+I+JG1RyFIXW4wqHaXaw4xwLq88YPEU3hoPxae6PkCfr/O0Zk\r\n21w/YNDnrkZvOmu9DeqpD+rKtHbK1E8qQD/kWmmYZcdcMTj8uo4llIbHQTmn\r\nGrsaCD61y4bKCPHxuVatHvqrJ5NoPmidk8OxkNsqS66W9cnMZ6E8ruIxe+Ln\r\nIolQq0NXY0AZJ8B5XxdOuugEQKTaocEdrVLjTs1A13+LYmvwxxXxy0xOLE/7\r\nMWsIO1+P68vB579eUenJldgOOHS5q+wtIQCrQG2+vJQwFu9hSO+QXTi2WF2B\r\nm3U9oZl+kfgBviib1IqJ0G/RY85K/b7oj8jacyO7IJCQ/rZcykfY3ZTDfjHg\r\nHZQAkvAJ89TSLeCqKLXqJPAHDiCTCYqIY3bkZTBUZm6Hsb3J8FYcrPvk/jKf\r\nI72h0Y9YokrEETPW0R/cZTOLVDyoqpL1VB5cgoo44KG/E00GYthot7cYkAO3\r\nFoJBJYYHEc0RxmVhYrIXyF/7qpIgjBWSlKoBWrRjK6fNjCpLsCxNOxOejA94\r\ndgsBxFZJ2nKY2wU+n9dALypvy9OH2x1Ak/8rHj0BJIVu/zVX6IaGlqs0VL89\r\nuZeoJ+6gUlte5CAemdT4jWAy0dqcL8t119H0rAtH3T8Od7DKDKh7iOL4jQuk\r\n1D4gI9TnsAlDf91dulbiBBxHrK9Au/URLRk=\r\n=lR3H\r\n-----END PGP SIGNATURE-----\r\n","size":5622,"noattachment":false,"key":"/@continuous-auth/client/-/@continuous-auth/client-2.2.2.tgz"},"main":"lib/index.js","gitHead":"53d65721b10bfb515814eb1106903d6a0e930e77","scripts":{"test":"jest --coverage","build":"tsc","prepublishOnly":"tsc","prettier:check":"prettier --check \"src/**/*.{ts,tsx}\"","prettier:write":"prettier --write \"src/**/*.{ts,tsx}\""},"_npmUser":{"name":"marshallofsound","email":"samuel.r.attard@gmail.com"},"_npmVersion":"6.14.16","description":"Node.JS Client for the CFA service","directories":{},"_nodeVersion":"14.19.1","dependencies":{"axios":"^0.27.2"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.0.3","ts-jest":"^29.0.1","prettier":"^2.7.1","jest-junit":"^14.0.1","typescript":"^4.8.3","@types/jest":"^29.0.3","@types/node":"^18.7.18"},"_npmOperationalInternal":{"tmp":"tmp/client_2.2.2_1663830593717_0.8683730770060012","host":"s3://npm-registry-packages"},"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":1663830593861,"_cnpm_publish_time":1663830593861,"dist-tags":{"latest":"2.3.2"}}