{"_id":"@blackcube/aurelia2-webauthn","_rev":"4-26c27b8b1f73f02b8f6b330c5178ff0e","name":"@blackcube/aurelia2-webauthn","dist-tags":{"latest":"2.3.1"},"versions":{"2.1.0":{"name":"@blackcube/aurelia2-webauthn","version":"2.1.0","author":{"name":"Gaultier Philippe","email":"pgaultier@gmail.com"},"license":"BSD-3-Clause","_id":"@blackcube/aurelia2-webauthn@2.1.0","maintainers":[{"name":"pgaultier","email":"pgaultier@gmail.com"}],"homepage":"https://github.com/blackcubeio/blackcube-aurelia2#readme","bugs":{"url":"https://github.com/blackcubeio/blackcube-aurelia2/issues"},"dist":{"shasum":"d7e05ee61a706cd10769b116738eb4d033c73422","tarball":"https://registry.npmjs.org/@blackcube/aurelia2-webauthn/-/aurelia2-webauthn-2.1.0.tgz","fileCount":35,"integrity":"sha512-06+VQx8EI/PaJ3JLA4UP7YxSfWDXbNNtvl8uWAAMItkAqDLDR9M+L651IpLoyfhNAuATKGU6b0bou2Pej3WXsg==","signatures":[{"sig":"MEUCIGDlh+YOQGGDy8e9BBAXuElpk7vu4gpAHuuujT1cOUuzAiEAiPeEcVUsCso6HYLMPhIxHISqCe9RXTygI3/kM01WzJM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":184630},"main":"./dist/index.js","type":"module","types":"./dist/types/index.d.ts","module":"./dist/index.es.js","gitHead":"27652893bfc70141b262954de6ec1783068062dd","scripts":{"build":"rimraf dist && rollup -c && rimraf .rollup.cache","clean":"rimraf dist && rimraf .rollup.cache","deploy":"npm publish --access public"},"_npmUser":{"name":"pgaultier","email":"pgaultier@gmail.com"},"repository":{"url":"git+https://github.com/blackcubeio/blackcube-aurelia2.git","type":"git"},"_npmVersion":"10.8.2","description":"Blackcube Aurelia 2 Webauthn","directories":{},"_nodeVersion":"20.17.0","dependencies":{"aurelia":"^2.0.0-beta.21","@aurelia/router":"^2.0.0-beta.21","@aurelia/fetch-client":"^2.0.0-beta.21"},"_hasShrinkwrap":false,"devDependencies":{"tslib":"^2.6.3","rimraf":"^5.0.7","rollup":"^4.18.0","@rollup/plugin-typescript":"^11.1.6"},"_npmOperationalInternal":{"tmp":"tmp/aurelia2-webauthn_2.1.0_1727076682429_0.6497606986465572","host":"s3://npm-registry-packages"}},"2.1.1":{"name":"@blackcube/aurelia2-webauthn","version":"2.1.1","author":{"name":"Gaultier Philippe","email":"pgaultier@gmail.com"},"license":"BSD-3-Clause","_id":"@blackcube/aurelia2-webauthn@2.1.1","maintainers":[{"name":"pgaultier","email":"pgaultier@gmail.com"}],"homepage":"https://github.com/blackcubeio/blackcube-aurelia2#readme","bugs":{"url":"https://github.com/blackcubeio/blackcube-aurelia2/issues"},"dist":{"shasum":"4cf62eecce306d42be925921ed3f72b50364c99a","tarball":"https://registry.npmjs.org/@blackcube/aurelia2-webauthn/-/aurelia2-webauthn-2.1.1.tgz","fileCount":39,"integrity":"sha512-MzbAOZ+e8HE2g73sSZfERrxShwn092qtncgVHAhkcfb+Iq66sE9AMhrMKLeZJmUicX89mIMmv1kXW/i6fw48Qg==","signatures":[{"sig":"MEUCIQC+CRt3JPvoYcSG646hDQ3CsRWau2Iq1k8VXaP10pDl1AIgND7EarzXwre8POPOwa8x3PQ8+Gqs8EaLMR02wevwo2A=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":194302},"main":"./dist/index.js","type":"module","types":"./dist/types/index.d.ts","module":"./dist/index.es.js","gitHead":"8ee733081bdcebc45f736b2442e077e4fb662d22","scripts":{"build":"rimraf dist && rollup -c && rimraf .rollup.cache","clean":"rimraf dist && rimraf .rollup.cache","deploy":"npm publish --access public"},"_npmUser":{"name":"pgaultier","email":"pgaultier@gmail.com"},"repository":{"url":"git+https://github.com/blackcubeio/blackcube-aurelia2.git","type":"git"},"_npmVersion":"10.8.3","description":"Blackcube Aurelia 2 Webauthn","directories":{},"_nodeVersion":"22.9.0","dependencies":{"aurelia":"latest","@aurelia/router":"latest","@aurelia/fetch-client":"latest"},"_hasShrinkwrap":false,"devDependencies":{"tslib":"^2.6.3","rimraf":"^5.0.7","rollup":"^4.18.0","@rollup/plugin-typescript":"^11.1.6"},"_npmOperationalInternal":{"tmp":"tmp/aurelia2-webauthn_2.1.1_1727888896508_0.3651869891105852","host":"s3://npm-registry-packages"}},"2.2.2":{"name":"@blackcube/aurelia2-webauthn","version":"2.2.2","author":{"name":"Gaultier Philippe","email":"pgaultier@gmail.com"},"license":"BSD-3-Clause","_id":"@blackcube/aurelia2-webauthn@2.2.2","maintainers":[{"name":"pgaultier","email":"pgaultier@gmail.com"}],"homepage":"https://github.com/blackcubeio/blackcube-aurelia2#readme","bugs":{"url":"https://github.com/blackcubeio/blackcube-aurelia2/issues"},"dist":{"shasum":"bf856001d82faa5a1dc003fabf0d375b7715f02f","tarball":"https://registry.npmjs.org/@blackcube/aurelia2-webauthn/-/aurelia2-webauthn-2.2.2.tgz","fileCount":39,"integrity":"sha512-cGcVITcycO6v7NDT3Ug4/s4EcxjHq5cHqrMlfRIsmJQVHh5SJ/XBHYYM7ZQenH53lE5UjLVDLOiyZzoAtoZx4A==","signatures":[{"sig":"MEUCIQDlKqV7+bzC18dgBZEtHCcjPeRMpDzTmXGCrG7kkURwnQIgZFC2X5NiezuMbPvfetDhredFFObp2JZ0+KU4hj+/QdY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":196782},"main":"./dist/index.js","type":"module","types":"./dist/types/index.d.ts","module":"./dist/index.es.js","gitHead":"69d922919770c813532ef80e41a2555c50c26743","scripts":{"build":"rimraf dist && rollup -c && rimraf .rollup.cache","clean":"rimraf dist && rimraf .rollup.cache","deploy":"npm publish --access public"},"_npmUser":{"name":"pgaultier","email":"pgaultier@gmail.com"},"repository":{"url":"git+https://github.com/blackcubeio/blackcube-aurelia2.git","type":"git"},"_npmVersion":"10.8.3","description":"Blackcube Aurelia 2 Webauthn","directories":{},"_nodeVersion":"22.9.0","dependencies":{"aurelia":"latest","@aurelia/router":"latest","@aurelia/fetch-client":"latest"},"_hasShrinkwrap":false,"devDependencies":{"tslib":"^2.6.3","rimraf":"^5.0.7","rollup":"^4.24.0","@rollup/plugin-typescript":"^11.1.6"},"_npmOperationalInternal":{"tmp":"tmp/aurelia2-webauthn_2.2.2_1729789148228_0.2758242376140785","host":"s3://npm-registry-packages"}},"2.3.0":{"name":"@blackcube/aurelia2-webauthn","version":"2.3.0","author":{"name":"Gaultier Philippe","email":"pgaultier@gmail.com"},"license":"BSD-3-Clause","_id":"@blackcube/aurelia2-webauthn@2.3.0","maintainers":[{"name":"pgaultier","email":"pgaultier@gmail.com"}],"homepage":"https://github.com/blackcubeio/blackcube-aurelia2#readme","bugs":{"url":"https://github.com/blackcubeio/blackcube-aurelia2/issues"},"dist":{"shasum":"109f31c88c841973497e2c79998872474df6202e","tarball":"https://registry.npmjs.org/@blackcube/aurelia2-webauthn/-/aurelia2-webauthn-2.3.0.tgz","fileCount":39,"integrity":"sha512-Q5uB+QqUbNhI5k3FAi1YEtHg0RD8gH7b0WGdEggjNsYjpiZnCpurQcWCUlnEKCXtuhDfXMdE5O6HLTpKPecxuw==","signatures":[{"sig":"MEQCIAqnZKlRAC9+e2eNoDqVTWqmfJzr+G7SqJitpARIi6G/AiAk3X6EZ+5cGwQw77o3pAPCrwKMYnAQhP4nEunF6DdxVQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":196782},"main":"./dist/index.js","type":"module","types":"./dist/types/index.d.ts","module":"./dist/index.es.js","gitHead":"14577e38fb4d179a269f97d4f02d39bba4fa89c8","scripts":{"build":"rimraf dist && rollup -c && rimraf .rollup.cache","clean":"rimraf dist && rimraf .rollup.cache","deploy":"npm publish --access public"},"_npmUser":{"name":"pgaultier","email":"pgaultier@gmail.com"},"repository":{"url":"git+https://github.com/blackcubeio/blackcube-aurelia2.git","type":"git"},"_npmVersion":"10.8.3","description":"Blackcube Aurelia 2 Webauthn","directories":{},"_nodeVersion":"22.9.0","dependencies":{"aurelia":"latest","@aurelia/router":"latest","@aurelia/fetch-client":"latest"},"_hasShrinkwrap":false,"devDependencies":{"tslib":"^2.6.3","rimraf":"^5.0.7","rollup":"^4.24.0","@rollup/plugin-typescript":"^11.1.6"},"_npmOperationalInternal":{"tmp":"tmp/aurelia2-webauthn_2.3.0_1729896156569_0.1902220850305798","host":"s3://npm-registry-packages"}},"2.3.1":{"name":"@blackcube/aurelia2-webauthn","version":"2.3.1","description":"Blackcube Aurelia 2 Webauthn","repository":{"type":"git","url":"git+https://github.com/blackcubeio/blackcube-aurelia2.git"},"author":{"name":"Gaultier Philippe","email":"pgaultier@gmail.com"},"license":"BSD-3-Clause","type":"module","module":"./dist/index.es.js","main":"./dist/index.js","types":"./dist/types/index.d.ts","scripts":{"build":"rimraf dist && rollup -c && rimraf .rollup.cache","deploy":"npm publish --access public","clean":"rimraf dist && rimraf .rollup.cache"},"dependencies":{"@aurelia/fetch-client":"latest","@aurelia/router":"latest","aurelia":"latest"},"devDependencies":{"@rollup/plugin-typescript":"^11.1.6","rimraf":"^5.0.7","rollup":"^4.24.0","tslib":"^2.6.3"},"_id":"@blackcube/aurelia2-webauthn@2.3.1","gitHead":"83fa718d0ee10acc1ba21729689c218287ebd48c","bugs":{"url":"https://github.com/blackcubeio/blackcube-aurelia2/issues"},"homepage":"https://github.com/blackcubeio/blackcube-aurelia2#readme","_nodeVersion":"22.9.0","_npmVersion":"10.8.3","dist":{"integrity":"sha512-R6R6BDgtq6KCrh5LePJk+Tr6HHg9i4Ly0wcYNFnQwR1SIcPCnCeeMxXJY4ag1N4zVOcYamJuR5tSkCGrMyx9MQ==","shasum":"66d7b9efaffcc46351d704bfb411d580802d0180","tarball":"https://registry.npmjs.org/@blackcube/aurelia2-webauthn/-/aurelia2-webauthn-2.3.1.tgz","fileCount":39,"unpackedSize":193620,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFQwd3f76WIbk8bvzhSA8vfGu6wECns9P7LTTNpdaTPKAiBwLsN5flABxrUY1qYoRQcZn3HUHpfX7ODFU8ti0VyJNw=="}]},"_npmUser":{"name":"pgaultier","email":"pgaultier@gmail.com"},"directories":{},"maintainers":[{"name":"pgaultier","email":"pgaultier@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/aurelia2-webauthn_2.3.1_1730026992511_0.23571969202674437"},"_hasShrinkwrap":false}},"time":{"created":"2024-09-23T07:31:22.348Z","modified":"2024-10-27T11:03:12.940Z","2.1.0":"2024-09-23T07:31:22.616Z","2.1.1":"2024-10-02T17:08:16.708Z","2.2.2":"2024-10-24T16:59:08.472Z","2.3.0":"2024-10-25T22:42:36.768Z","2.3.1":"2024-10-27T11:03:12.709Z"},"bugs":{"url":"https://github.com/blackcubeio/blackcube-aurelia2/issues"},"author":{"name":"Gaultier Philippe","email":"pgaultier@gmail.com"},"license":"BSD-3-Clause","homepage":"https://github.com/blackcubeio/blackcube-aurelia2#readme","repository":{"type":"git","url":"git+https://github.com/blackcubeio/blackcube-aurelia2.git"},"description":"Blackcube Aurelia 2 Webauthn","maintainers":[{"name":"pgaultier","email":"pgaultier@gmail.com"}],"readme":"# Blackcube Aurelia 2 webauthn toolkit\n\nThis toolkit allows easy setup of Webauthn.\n\n## Install\n\nPackage is available on npm\n\nThen you can install the package:\n\n```shell\nnpm install @blackcube/aurelia2-webauthn\n```\n\n### Howto\n\nThere are 2 main processes:\n\n1. Register a device\n2. login with a device\n\nThose processes are based on the Webauthn standard and need webservices server side.\n\nYoun can find a Yii2 module tohandle the server side part here: [Yii2 Webauthn module](https://github.com/blackcubeio/webauthn)\n\n## Services\n\n5 services methods are available:\n\n- `isAvailable(): Promise<boolean>` to check if the browser supports Webauthn\n- `registerDevice(email: string, name: string|null = null): Promise<boolean>` to register a device ,and create associated user\n- `attachDevice(): Promise<any>` to attach a device to logged user\n- `login(email: string): Promise<boolean>` to login a specific user with a device\n- `loginDevice(): Promise<boolean>` to login with a device and let the user select the passkey\n\n## Registering it in app\n\n```typescript\nimport Aurelia, { ConsoleSink, LoggerConfiguration, LogLevel} from 'aurelia';\nimport { WebauthnConfiguration } from \"@blackcube/aurelia2-webauthn\";\nimport { MyApp } from './my-app';\nAurelia\n    .register(WebauthnConfiguration)\n    .register(LoggerConfiguration.create({\n        level: LogLevel.trace,\n        colorOptions: 'colors',\n        sinks: [ConsoleSink]\n    }))\n    .app(MyApp)\n    .start();\n```\n\n## Additional configuration if needed\n\nYou can configure the toolkit by passing a configuration object to the configure method:\n\n```typescript\nimport Aurelia, { ConsoleSink, LoggerConfiguration, LogLevel} from 'aurelia';\nimport { WebauthnConfiguration } from \"@blackcube/aurelia2-webauthn\";\nimport { MyApp } from './my-app';\nAurelia\n    .register(WebauthnConfiguration.configure({\n        prepareAttachDeviceUrl: '/webauthn/prepare-attach-device',\n        prepareRegisterDeviceUrl: '/webauthn/prepare-register-device',\n        validateRegisterUrl: '/webauthn/validate-register',\n        prepareLoginUrl: '/webauthn/prepare-login',\n        prepareLoginDeviceUrl: '/webauthn/prepare-login-device',\n        validateLoginUrl: '/webauthn/validate-login'\n    }))\n    .register(LoggerConfiguration.create({\n        level: LogLevel.trace,\n        colorOptions: 'colors',\n        sinks: [ConsoleSink]\n    }))\n    .app(MyApp)\n    .start();\n```\n\nDefault values are:\n\n- prepareAttachDeviceUrl: '/webauthn/prepare-register-user-device', \n- prepareRegisterDeviceUrl: '/webauthn/prepare-register-device', \n- validateRegisterUrl: '/webauthn/register-validate', \n- prepareLoginUrl: '/webauthn/prepare-login-user-device', \n- prepareLoginDeviceUrl: '/webauthn/prepare-login-device', \n- validateLoginUrl: '/webauthn/login-validate'\n\n- **prepareAttachDeviceUrl** URL used to prepare the attach device process\n- **prepareRegisterDeviceUrl** URL used to prepare the register device process\n- **validateRegisterUrl** URL used to validate the register/attach process\n- **prepareLoginUrl** URL used to prepare the login process for a specific user\n- **prepareLoginDeviceUrl** URL used to prepare the login device process\n- **validateLoginUrl** URL used to validate the login process\n\n\n## Usage in HTML\n\nSimple components are available to use the toolkit in HTML.\n\n### Webauthn login\n\n```html\n<template>\n    <div class=\"mx-auto max-w-7xl sm:px-6 lg:px-8\">\n        <h2 class=\"py-5 text-xl font-semibold leading-7 text-gray-900\">Webauthn login</h2>\n\n        <bc-webauthn-login user.bind=\"false\" route=\"home\"></bc-webauthn-login>\n    </div>\n</template>\n```\n\nBindable properties are:\n\n- **user** : boolean, if true, the component will show a text input to enter the email of the user to login\n- **route** : string, the route to redirect to after a successful login (needs routing to be configured)\n- **url** : string, the url to redirect to after a successful login (if routing is not set)\n\n### Webauthn register\n\n```html\n<template>\n    <div class=\"mx-auto max-w-7xl sm:px-6 lg:px-8\">\n        <h2 class=\"py-5 text-xl font-semibold leading-7 text-gray-900\">Webauthn register</h2>\n\n        <bc-webauthn-register></bc-webauthn-register>\n    </div>\n</template>\n```\nBindable properties are:\n\n- **user** : boolean, if true, the component will show a text input to enter the email and create a new user. If false, the component will use the logged user and attach the device to it\n- **route** : string, the route to redirect to after a successful register (needs routing to be configured)\n- **url** : string, the url to redirect to after a successful register (if routing is not set)\n","readmeFilename":"README.md"}