{"_id":"pusher-js-auth","_rev":"11-52e9f9b6b11f97e6e5b10b89a41d1dfb","name":"pusher-js-auth","description":"Pusher plugin for batching auth requests in one HTTP call","dist-tags":{"latest":"4.0.1"},"versions":{"1.2.0":{"name":"pusher-js-auth","version":"1.2.0","license":"MIT","description":"Pusher plugin for batching auth requests in one HTTP call","main":"lib/pusher-auth.js","keywords":["pusher","client","auth"],"author":{"name":"Dirk Bonhomme","email":"dirk@bytelogic.be"},"repository":{"type":"git","url":"git://github.com/dirkbonhomme/pusher-js-auth"},"gitHead":"df474d90643dd6791023fb701006e2e05fc8bd83","bugs":{"url":"https://github.com/dirkbonhomme/pusher-js-auth/issues"},"homepage":"https://github.com/dirkbonhomme/pusher-js-auth","_id":"pusher-js-auth@1.2.0","scripts":{},"_shasum":"72a6b07495cddff62a0c00197851648f74e791a7","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"dirkbonhomme","email":"dirk@bytelogic.be"},"maintainers":[{"name":"dirkbonhomme","email":"dirk@bytelogic.be"}],"dist":{"shasum":"72a6b07495cddff62a0c00197851648f74e791a7","tarball":"https://registry.npmjs.org/pusher-js-auth/-/pusher-js-auth-1.2.0.tgz","integrity":"sha512-okVpVLtPcS2gtlmGM5d2Nz0jLwSXjhnRrN3lXenLg47pE5bKOlswu3nLkHwscMLXlwxdHQf15k2HHAKuNI9b5g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIB3oiug6pGfHYWWbVPOAXU+PVX2UjTYgQTQKCp7gua1yAiEAuOtGfMmCAfjPXrmJsrNZLeUW+ejzIOiyJcngqBMxAHE="}]},"_npmOperationalInternal":{"host":"packages-5-east.internal.npmjs.com","tmp":"tmp/pusher-js-auth-1.2.0.tgz_1455653713379_0.8121893056668341"},"directories":{}},"2.0.0":{"name":"pusher-js-auth","version":"2.0.0","license":"MIT","description":"Pusher plugin for batching auth requests in one HTTP call","main":"lib/pusher-auth.js","keywords":["pusher","client","auth"],"author":{"name":"Dirk Bonhomme","email":"dirk@bytelogic.be"},"repository":{"type":"git","url":"git://github.com/dirkbonhomme/pusher-js-auth.git"},"gitHead":"65ad89b608eadb2adb9e831d663e1f98ca3189b7","bugs":{"url":"https://github.com/dirkbonhomme/pusher-js-auth/issues"},"homepage":"https://github.com/dirkbonhomme/pusher-js-auth#readme","_id":"pusher-js-auth@2.0.0","scripts":{},"_shasum":"f1806422e44223a39780bd33894a2fd8f77c9ffc","_from":".","_npmVersion":"3.6.0","_nodeVersion":"5.6.0","_npmUser":{"name":"dirkbonhomme","email":"dirk@bytelogic.be"},"dist":{"shasum":"f1806422e44223a39780bd33894a2fd8f77c9ffc","tarball":"https://registry.npmjs.org/pusher-js-auth/-/pusher-js-auth-2.0.0.tgz","integrity":"sha512-JOpFPiurjKxfzPGxwksVw4RkPNc+NFNlYd7dYQavKL2WNnub0ELZ3/HHuAFAQ1fca0E8tjvDy7VHlkljUY6qHA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC1AXy1dNuRFObVQjWkkqqQVuu+XN6XmBfx1xateRToKwIgMj8YUVFjLBrKC6cC24LmFzKdUpD8N5TLABrSX0Q7mGs="}]},"maintainers":[{"name":"dirkbonhomme","email":"dirk@bytelogic.be"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/pusher-js-auth-2.0.0.tgz_1463479555947_0.37154086004011333"},"directories":{}},"3.0.0":{"name":"pusher-js-auth","version":"3.0.0","license":"MIT","description":"Pusher plugin for batching auth requests in one HTTP call","main":"lib/pusher-auth.js","keywords":["pusher","client","auth"],"author":{"name":"Dirk Bonhomme","email":"dirk@bytelogic.be"},"repository":{"type":"git","url":"git://github.com/dirkbonhomme/pusher-js-auth.git"},"gitHead":"170bfbe79e08407c0bcfdd87ce1fa3d8e9e694d2","bugs":{"url":"https://github.com/dirkbonhomme/pusher-js-auth/issues"},"homepage":"https://github.com/dirkbonhomme/pusher-js-auth#readme","_id":"pusher-js-auth@3.0.0","_npmVersion":"5.3.0","_nodeVersion":"8.6.0","_npmUser":{"name":"dirkbonhomme","email":"dirk@bytelogic.be"},"dist":{"integrity":"sha512-rG2/PICZ9F/niQK9h2Hg64N+XjkH6fKK0y6nWJX0Kwyua/ULr3Fz9gjmnAZWUchjAc27P1bw2NcMS5fWkebj0Q==","shasum":"ae684c54ee2f5e88c9ca5d15e1b992f10612c9df","tarball":"https://registry.npmjs.org/pusher-js-auth/-/pusher-js-auth-3.0.0.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDtUg4KZLI/fo35DKMFXHOoGS8LyWLRoBUKU6YUWFc5cQIgVaIHGKkeTp2wTNI/bTbZUHmjNha6tKTWnvfhe6yZpm0="}]},"maintainers":[{"name":"dirkbonhomme","email":"dirk@bytelogic.be"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pusher-js-auth-3.0.0.tgz_1516177111611_0.49040539446286857"},"directories":{}},"3.0.1":{"name":"pusher-js-auth","version":"3.0.1","license":"MIT","description":"Pusher plugin for batching auth requests in one HTTP call","main":"lib/pusher-auth.js","keywords":["pusher","client","auth"],"author":{"name":"Dirk Bonhomme","email":"dirk@bytelogic.be"},"repository":{"type":"git","url":"git://github.com/dirkbonhomme/pusher-js-auth.git"},"gitHead":"da73d8f6ddbec62670e3ef1639a46776a6197fd2","bugs":{"url":"https://github.com/dirkbonhomme/pusher-js-auth/issues"},"homepage":"https://github.com/dirkbonhomme/pusher-js-auth#readme","_id":"pusher-js-auth@3.0.1","_npmVersion":"5.3.0","_nodeVersion":"8.6.0","_npmUser":{"name":"dirkbonhomme","email":"dirk@bytelogic.be"},"dist":{"integrity":"sha512-TcOJ+zeq3gK4YWjon4TpC251UOomGTfNBdFS5DdMkOMf6LVr3B+Bhy7W0ch/FRmpBYLWAbCULIwc+6cIlE0YOA==","shasum":"99b3901eec2ece7532158da7edaa88b657c5c9c7","tarball":"https://registry.npmjs.org/pusher-js-auth/-/pusher-js-auth-3.0.1.tgz","fileCount":11,"unpackedSize":14844,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbS6sqCRA9TVsSAnZWagAACcMP/A16hFouEe+yJEItS3Dd\n6F7KUC7qctWrI6HZrhHjm3xL8gkhZaR8TNmhxxKGVKImD+pVPB+UnOtNoKfC\nBvB97YTUuPZZ4uPdW6TKiUCX0AADlSuEcTPnz6WWSdA7BIbDsWxRw3qK+aNj\nGncmOHR2YpNNdERcsHrTraoGhvxT03wq3qoRMGLjXLa/8FCFPEFwnq+PcszP\nCpeWm5/2PAMjIpByhXzwi3Ig+W1Pjj9D58KADPrZAwNEqNs4TRdDkQr3SBiU\nHPZh1JkPWxEgPOxhtzWz7DBnRKe77pwgnrST2LGgw6NN3QMG2QJw+fFnfdi1\nMbOczLkjlGVl2Phb2/FUfXabEoF+IRRcFbcXRdpKTBY9OqZiqf+6aOzYScSh\nLvMXneaOWSl9pwEyI8Jl5hhcIyzYDzXk/rpduhdYo3KtaEtl2JUpCaW1y1gr\nq+E0+i0yR5+dPOXhHhG956ehDgc1f9LRxwf4S/sykYfAS8hcOfxMX1A1CGXx\ngPmvrxRCzmy2wzFGI9aR1D6HKU9e696nFzDyZT7CtJ9voTqAnVKPFu+z2an8\niILPdkpgoSwgMH0l82GkgR5sM5xfNfSWt9s1SI6OnZJTuHu9b8vhy5/DMsTq\nPLWh9C3AZpFoWlSlFObjWLG1+Rq9IgV7cbC5Nh7ywMfBGlnoP2+kPmOwJQOU\nYjdw\r\n=L4sO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDApqIcDwAG9w9apk+0wlD4kgz+ie5mxmSOZaOHOWiyogIhAL7wRqi/gEiUjyk9b1Q77SeiDkFK8IR1bmkJzWPuslpV"}]},"maintainers":[{"name":"dirkbonhomme","email":"dirk@bytelogic.be"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pusher-js-auth_3.0.1_1531685674677_0.105788083026914"},"_hasShrinkwrap":false},"4.0.0":{"name":"pusher-js-auth","version":"4.0.0","license":"MIT","description":"Pusher plugin for batching auth requests in one HTTP call","main":"lib/pusher-auth.js","keywords":["pusher","client","auth"],"peerDependencies":{"pusher-js":"^7"},"peerDependenciesMeta":{"pusher-js":{"optional":true}},"author":{"name":"Dirk Bonhomme","email":"dirk@bytelogic.be"},"contributors":[{"name":"Christophe Coevoet","url":"https://github.com/stof"}],"repository":{"type":"git","url":"git://github.com/dirkbonhomme/pusher-js-auth.git"},"gitHead":"62835350d8bc4027b22784bd5b6e9315884e179d","bugs":{"url":"https://github.com/dirkbonhomme/pusher-js-auth/issues"},"homepage":"https://github.com/dirkbonhomme/pusher-js-auth#readme","_id":"pusher-js-auth@4.0.0","_npmVersion":"5.3.0","_nodeVersion":"8.6.0","_npmUser":{"name":"dirkbonhomme","email":"dirk@bytelogic.be"},"dist":{"integrity":"sha512-G8cPt7XsftT4/Rm0JGTAecwDQBkKhTlxvOpWJjTwMr+OaUjyFAleCHKOaZxOmal1UAcBtIWtIKpqQiuDBe9tGg==","shasum":"941c5702b871231d2b08dcddc06540f5b6201876","tarball":"https://registry.npmjs.org/pusher-js-auth/-/pusher-js-auth-4.0.0.tgz","fileCount":5,"unpackedSize":11862,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfW+Q2CRA9TVsSAnZWagAAOtQQAJFhVkFjIXJfYvPGL1VC\nusV9azSnCSqHCsk8DfDSdsSMGA7kgyeMmHAer809kYFVOn5iniAkiHs/q/it\nWmVb7IISD63gD/uvHKuHFjcWbwBp0FFqTmdwOueb2NxVZ2YBmUldx4+K1HhR\nvRwwgNfxl/xfjdLCjRL6VgmwmzTQ236FH15KwVqjs1+SG1Jsj8KyxXaorxqu\n4Ca0rCGWNk3DeKFMwTRB6xpVE5N3XDRYIumDthl3K48sDC+jUTzHM3BzWaTc\nqFLE0VQsSIUuE6IpE7PlYIuu+l/RwKCmCh9eYE8nOXp4w39JA3RgyOfedvVz\nNAxbVKhQ0uL5mrk/hAH5E30yeJr8jF+mtmuRpoCqqmP/eklnlzC3USQmuE3B\ng8H9Wl+ANcXjiDnPSXWBIvw6dlxjBRyWytVLjJFmF1nH3lVCEbIjNR0M/Y0J\n9BfKM+IiBHCDHmSyfztXw0QKrs1BYssz9frIRHes1YjoHptG9K3oVJ/OTMls\nmYZnpWkuVdHAprjNPmRTsEpp7AYjeVfC8glb8EFY1Cr8pFjXqEXTa6qTX+Zl\nbzE6vlZCfa6VTa4KGfRVHJjsrCAmc560Dtrqzp77J5KFj9vPQvA9b2HR8Z6P\nzbBZ1FBY5LmsZbs4+zYknyLWYRnbXMNziHNd+RenPsZkLENeC5UKZQAJwutj\njjyU\r\n=5+zf\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGwONYD9QB4fCirLnodvqY5xBQfB6f2tuKT8QP9J3oInAiAjEcI71gSDDKDP24k8qwQeCLlAwRRIzqyh3VPmYrJxoQ=="}]},"maintainers":[{"name":"dirkbonhomme","email":"dirk@bytelogic.be"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pusher-js-auth_4.0.0_1599857718051_0.30102092664953517"},"_hasShrinkwrap":false},"4.0.1":{"name":"pusher-js-auth","version":"4.0.1","license":"MIT","description":"Pusher plugin for batching auth requests in one HTTP call","main":"lib/pusher-auth.js","types":"lib/pusher-auth.d.ts","keywords":["pusher","client","auth"],"peerDependencies":{"pusher-js":"^7"},"peerDependenciesMeta":{"pusher-js":{"optional":true}},"devDependencies":{"pusher-js":"^7"},"author":{"name":"Dirk Bonhomme","email":"dirk@bytelogic.be"},"contributors":[{"name":"Christophe Coevoet","url":"https://github.com/stof"}],"repository":{"type":"git","url":"git://github.com/dirkbonhomme/pusher-js-auth.git"},"gitHead":"0844f4cd17f0ac7c4521c903bee71acf5a86624b","bugs":{"url":"https://github.com/dirkbonhomme/pusher-js-auth/issues"},"homepage":"https://github.com/dirkbonhomme/pusher-js-auth#readme","_id":"pusher-js-auth@4.0.1","_npmVersion":"5.10.0","_nodeVersion":"8.6.0","_npmUser":{"name":"dirkbonhomme","email":"dirk@bytelogic.be"},"dist":{"integrity":"sha512-iVwSxlma5YPwbU6oN+IPbt7f1H290EagRPl1LS1PCWsMCDT3TrO6VT4gtaWgFELEddqZgTO+RXXyzpGToSTKeA==","shasum":"cecf675894e67fcc933b23a92e3fd7e38c3fa18f","tarball":"https://registry.npmjs.org/pusher-js-auth/-/pusher-js-auth-4.0.1.tgz","fileCount":6,"unpackedSize":12331,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh23f8CRA9TVsSAnZWagAAY8UP/imMYEmBZkm1lYiMMusv\ntBC9q7r1UPsGYyj2amUOX8d8QoS7mmlHq4VAKwXVaH8CVao3DME2MPiVGIo7\nOZdLu9tV4Kz0G0WzoEgxdc8tcaMEZLzRW/dSW1c64ffQ8OU1QUMtJZEGbGcg\nfG+iYLQenfltid7jHkUFnHQX1uJGcShf1qx4q0onW8OeorXJ2oIQ3dws2oHP\nfaqYJYxR8WPnDIYcEX2iOm/lxvvoMC5PIT3lH2lLZ5BXlVg1J81ELLk/9/kT\nNOK30bcHITdbwLInI8/Bt2tqUTiFdOVfoMwqzvg7JF/ef/bvZcc94hZk1XKy\nlsXwoKb9H6+0Ib6ql00QPp0tYWBaLFeEs8TB81FZlWD9y5lENG0f+dsz0qdh\npVw/gOT4fFyIblRTfFc9otbdh/N+DU0miP63Z0QSg++3Dh/IpkoPqNSZoGeR\nQt7vH0iAESlzKjK7DvbuMtxZaPxDQezX/8L7ANlz0x8cPf4IuAQiOO6uNHJW\nRovTkvc8vO4KlyXha+V/DID4hOVVI4RCkvuxn0PQZJ7klWovpAtdnRCfCOH1\n4vsrbw8Vz0RSISNBp3KmWOlvTqDTHCS4qxknbQXzHIaSx17evaPcEpzfyb5l\nGoQmBzV7W2uBAOYW0UUW2lK6yugJDW3AhiMhzIHvkp1+lj7AzUaLl6YjeYBp\nH+jr\r\n=jntz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDbtMmH4tkHNO89oCQHQ8KHOLRRssHpX6iMyR/PsY5bRgIgex464IomtlvwSpdqHDKzrt5igwiaM0Fp/IDLz/rTlFs="}]},"directories":{},"maintainers":[{"name":"dirkbonhomme","email":"dirk@bytelogic.be"},{"name":"stof","email":"stof@notk.org"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pusher-js-auth_4.0.1_1634327658201_0.42517778235529025"},"_hasShrinkwrap":false}},"readme":"# Pusher plugin for authentication\n\nPusher plugin for batching auth requests in one HTTP call.  \nWhen subscribing to multiple private- and presence channels at once, your browser has to make an HTTP request for each channel. This plugin enables you to process multiple channel authentications within one request.\n\n## Prerequisites\n\nThis is a plugin for the official [Pusher](http://pusher.com) JavaScript library and compatible with the latest 7.0.x release. Make sure you have a working implementation up and running.\n\n**Notice:** This version is not compatible with Pusher 6.0 and older. Please use version [3.0](https://github.com/dirkbonhomme/pusher-js-auth/releases) of this plugin with older Pusher versions.\n\nDocumentation and configuration options are explained at the [Pusher-js Github page](https://github.com/pusher/pusher-js)\n\n## Usage\n\nLoad the plugin after including the Pusher library\n\n    <script src=\"//js.pusher.com/4.2/pusher.min.js\"></script>\n    <script src=\"lib/pusher-auth.js\"></script>\n\nThis plugin is also available on npm and bower:\n\n    npm install pusher-js-auth\n    bower install pusher-js-auth\n\n## Configuration\n\nThis plugin comes with a few extra configuration parameters. The whole list is available at the [Pusher-js Github page](https://github.com/pusher/pusher-js#configuration)\n\n    var pusher = new Pusher(API_KEY, {\n        authorizer: PusherBatchAuthorizer,\n        authDelay: 200\n    });\n\n### `authorizer` (Function)\n\nPass the function exposed by this plugin here. It is exposed as a module export when using AMD or CommonJS, and as the `PusherBatchAuthorizer` global otherwise.\n\n### `authDelay` (Number)\n\nOptional, defaults to 0. Delay in milliseconds before executing an authentication request. The value can be as low as 0 when subscribing to multiple channels within the same event loop. Please note that the first authentication request is postponed anyway until the connection to Pusher succeeds.\n\n## Server side authentication\n\nYour authentication endpoint should be able to handle batched requests.\n\n### Incoming post data\n\n    socket_id   \t  00000.0000000\n    channel_name[0]\t  private-a\n    channel_name[1]\t  private-b\n\n### Expected output\n\n    {\n        \"private-a\": {\n            \"status\": 200, // HTTP status codes, optional on success\n            \"data\": {\n                \"auth\": \"xxxxxx:xxxxxxxxxxxxx\"\n            }\n        },\n        \"private-b\": {\n            \"status\": 200,\n            \"data\": {\n                \"auth\": \"xxxxxx:xxxxxxxxxxxxx\"\n            }\n        },\n        \"private-c\": {\n            \"status\": 403\n        }\n    }\n    \nUse one of the [server libraries](http://pusher.com/docs/libraries) to do most of the hard work.\n\n## Example implementation\n\nCopy `app_key.example.js` and `app_key.example.php` to `app_key.example.xx` and fill in your own Pusher data. Create a small PHP server and run index.html with your browser's debug console active.\n","maintainers":[{"name":"dirkbonhomme","email":"dirk@bytelogic.be"},{"name":"stof","email":"stof@notk.org"}],"time":{"modified":"2022-06-25T02:01:14.031Z","created":"2016-02-16T20:15:15.688Z","1.2.0":"2016-02-16T20:15:15.688Z","2.0.0":"2016-05-17T10:05:58.315Z","3.0.0":"2018-01-17T08:18:32.599Z","3.0.1":"2018-07-15T20:14:34.754Z","4.0.0":"2020-09-11T20:55:18.161Z","4.0.1":"2021-10-15T19:54:18.403Z"},"homepage":"https://github.com/dirkbonhomme/pusher-js-auth#readme","keywords":["pusher","client","auth"],"repository":{"type":"git","url":"git://github.com/dirkbonhomme/pusher-js-auth.git"},"author":{"name":"Dirk Bonhomme","email":"dirk@bytelogic.be"},"bugs":{"url":"https://github.com/dirkbonhomme/pusher-js-auth/issues"},"license":"MIT","readmeFilename":"README.md","contributors":[{"name":"Christophe Coevoet","url":"https://github.com/stof"}]}