{"_id":"macaroons.js","_rev":"33-752d64f04d96a6d65afb614833a96365","name":"macaroons.js","description":"Javascript implementation of Macaroons: Cookies with Contextual Caveats for Decentralized Authorization in the Cloud.","dist-tags":{"latest":"0.3.9","0.0.3-alpha":"0.0.3-alpha"},"versions":{"0.0.1-alpha":{"name":"macaroons.js","version":"0.0.1-alpha","description":"Javascript implementation of Macaroons: Cookies with Contextual Caveats for Decentralized Authorization in the Cloud.","main":"index.js","scripts":{"test":"node ./node_modules/grunt-cli/bin/grunt default test"},"repository":{"type":"git","url":"https://github.com/nitram509/macaroons.js"},"keywords":["security","authentication","crypto","cloud","microservices","cookies","caveats","authorization","macaroons"],"author":{"name":"Martin W. Kirst"},"license":"Apache 2.0","bugs":{"url":"https://github.com/nitram509/macaroons.js/issues"},"homepage":"https://github.com/nitram509/macaroons.js","engines":{"node":"0.10.x","npm":"1.4.x"},"dependencies":{},"devDependencies":{"closurecompiler":"^1.5.1","expect.js":"~0.3.1","grunt":"~0.4.2","grunt-cli":"~0.1.13","grunt-closurecompiler":"~0.9.9","grunt-contrib-clean":"^0.6.0","grunt-contrib-copy":"^0.7.0","grunt-contrib-watch":"^0.6.1","grunt-mocha-test":"^0.12.4","grunt-typescript":"^0.4.6","mocha":"~2.0.1","typescript":"^1.3.0"},"gitHead":"eb95be38c1c660f540df8c9ec35c52ca060e0bfe","_id":"macaroons.js@0.0.1-alpha","_shasum":"172479d6f3bb74783783db68f7a42fc31bf4b6da","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"nitram509","email":"nitram509@bitkings.de"},"maintainers":[{"name":"nitram509","email":"nitram509@bitkings.de"}],"dist":{"shasum":"172479d6f3bb74783783db68f7a42fc31bf4b6da","tarball":"https://registry.npmjs.org/macaroons.js/-/macaroons.js-0.0.1-alpha.tgz","integrity":"sha512-3kym/buSbkvuCji8JCaykNphdGLGJu8VpwVgXjMHujsjefH9W/uFsDtxfZJDI2JnPnSUM4zGn440Y07/GPHtxA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICIH8qXAp/LBl6YvMfsvyysgsLkEhjeGyOwxxgQoasXAAiEAmtXUXpjbMoUWhuKCv0mJKRNtL0JJ5Y3T3WaDX3m7n6k="}]},"directories":{}},"0.0.3-alpha":{"name":"macaroons.js","version":"0.0.3-alpha","description":"Javascript implementation of Macaroons: Cookies with Contextual Caveats for Decentralized Authorization in the Cloud.","main":"index.js","scripts":{"test":"node ./node_modules/grunt-cli/bin/grunt test"},"repository":{"type":"git","url":"https://github.com/nitram509/macaroons.js"},"keywords":["security","authentication","crypto","cloud","microservices","cookies","caveats","authorization","macaroons"],"author":{"name":"Martin W. Kirst","url":"https://twitter.com/nitram509"},"license":"Apache 2.0","bugs":{"url":"https://github.com/nitram509/macaroons.js/issues"},"homepage":"https://github.com/nitram509/macaroons.js","engines":{"node":"0.10.x","npm":"1.4.x"},"dependencies":{},"devDependencies":{"closurecompiler":"^1.5.1","expect.js":"~0.3.1","grunt":"~0.4.2","grunt-cli":"~0.1.13","grunt-closurecompiler":"~0.9.9","grunt-contrib-clean":"^0.6.0","grunt-contrib-copy":"^0.7.0","grunt-contrib-watch":"^0.6.1","grunt-mocha-test":"^0.12.4","grunt-typescript":"^0.4.6","mocha":"~2.0.1","typescript":"^1.3.0"},"directories":{"lib":"./lib","example":"./src/examples"},"gitHead":"a2a4bb2644f1688a4785b330926152955d97fcd1","_id":"macaroons.js@0.0.3-alpha","_shasum":"db32769624e75729505a5333b36c45da08479489","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"nitram509","email":"nitram509@bitkings.de"},"maintainers":[{"name":"nitram509","email":"nitram509@bitkings.de"}],"dist":{"shasum":"db32769624e75729505a5333b36c45da08479489","tarball":"https://registry.npmjs.org/macaroons.js/-/macaroons.js-0.0.3-alpha.tgz","integrity":"sha512-tE0uhTDWJOZbsuG4p76rq89TGC7wvwr4GiYHZCmE/4LKI7rOXcuIFWzEOa5ME8CKCrgy3mSLSsgNaStr0XaiaQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD0Aq7sX+hq9ngfqRp4FLJ4Sjr86Uz+GbrlaMHnobpNwgIhAPUFJzTFx7N+hwHr/Jk07xUk1KXFnB5gLHGu1kjF0tFY"}]}},"0.0.5-alpha":{"name":"macaroons.js","version":"0.0.5-alpha","description":"Javascript implementation of Macaroons: Cookies with Contextual Caveats for Decentralized Authorization in the Cloud.","main":"index.js","scripts":{"test":"node ./node_modules/grunt-cli/bin/grunt test"},"repository":{"type":"git","url":"https://github.com/nitram509/macaroons.js"},"keywords":["security","authentication","crypto","cloud","microservices","cookies","caveats","authorization","macaroons"],"author":{"name":"Martin W. Kirst","url":"https://twitter.com/nitram509"},"license":"Apache 2.0","bugs":{"url":"https://github.com/nitram509/macaroons.js/issues"},"homepage":"https://github.com/nitram509/macaroons.js","engines":{"node":"0.10.x","npm":"1.4.x"},"dependencies":{},"devDependencies":{"closurecompiler":"^1.5.1","expect.js":"~0.3.1","grunt":"~0.4.2","grunt-cli":"~0.1.13","grunt-closurecompiler":"~0.9.9","grunt-contrib-clean":"^0.6.0","grunt-contrib-copy":"^0.7.0","grunt-contrib-watch":"^0.6.1","grunt-mocha-test":"^0.12.4","grunt-typescript":"^0.4.6","mocha":"~2.0.1","typescript":"^1.3.0"},"directories":{"lib":"./lib"},"gitHead":"b2be1e165bf3ad257f523e5d98e2b9126f05ca2d","_id":"macaroons.js@0.0.5-alpha","_shasum":"fd2d419cbbd7ec52a856920011f0b1f5474453bd","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"nitram509","email":"nitram509@bitkings.de"},"maintainers":[{"name":"nitram509","email":"nitram509@bitkings.de"}],"dist":{"shasum":"fd2d419cbbd7ec52a856920011f0b1f5474453bd","tarball":"https://registry.npmjs.org/macaroons.js/-/macaroons.js-0.0.5-alpha.tgz","integrity":"sha512-itS8Z+KpVPPmavmglYdkTFN3nR1/H2yAkDHDMRmtItZU+GhUNkAIjC+d4MMzF4QsaVGNt8F7BrDwujdbJ4C1KQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEMCH06PzlpE8lYM3ibGV/etM4ThehPQoQ/Z8KZ/2AKOy8oCICsl22DNFJTm/eP+21HTJBh+Ih9kT1FlHDh6oCQCsRSS"}]}},"0.0.6-alpha":{"name":"macaroons.js","version":"0.0.6-alpha","description":"Javascript implementation of Macaroons: Cookies with Contextual Caveats for Decentralized Authorization in the Cloud.","main":"index.js","scripts":{"test":"node ./node_modules/grunt-cli/bin/grunt test"},"repository":{"type":"git","url":"https://github.com/nitram509/macaroons.js"},"keywords":["security","authentication","crypto","cloud","microservices","cookies","caveats","authorization","macaroons"],"author":{"name":"Martin W. Kirst","url":"https://twitter.com/nitram509"},"license":"Apache 2.0","bugs":{"url":"https://github.com/nitram509/macaroons.js/issues"},"homepage":"https://github.com/nitram509/macaroons.js","engines":{"node":"0.10.x","npm":"1.4.x"},"dependencies":{},"devDependencies":{"closurecompiler":"^1.5.1","expect.js":"~0.3.1","grunt":"~0.4.2","grunt-cli":"~0.1.13","grunt-closurecompiler":"~0.9.9","grunt-contrib-clean":"^0.6.0","grunt-contrib-copy":"^0.7.0","grunt-contrib-watch":"^0.6.1","grunt-mocha-test":"^0.12.4","grunt-typescript":"^0.4.6","mocha":"~2.0.1","typescript":"^1.3.0"},"directories":{"lib":"./lib"},"gitHead":"8f50a3bf9403bbc1b19cc94b1db319b8a62df91a","_id":"macaroons.js@0.0.6-alpha","_shasum":"cd8b4b88e0c5d1940a357c5978d74b4f9cc234ca","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"nitram509","email":"nitram509@bitkings.de"},"maintainers":[{"name":"nitram509","email":"nitram509@bitkings.de"}],"dist":{"shasum":"cd8b4b88e0c5d1940a357c5978d74b4f9cc234ca","tarball":"https://registry.npmjs.org/macaroons.js/-/macaroons.js-0.0.6-alpha.tgz","integrity":"sha512-Bz53y3pCASCMxcs5H1NBbfRLuO5jsNwdkLVlmQT96lh3DjCKzVn2ZXlP1fKGZ3Cb63YLo+n/PXQh23OuaZv0zA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICDsUtblipJVz472N8fRCiCZJlqEVHO0efJlvA+6HSnsAiEA8Bs/tH8NwMFq0zi9C2x0kQNjnIeqEx6/aS6DYh+8VxY="}]}},"0.1.0":{"name":"macaroons.js","version":"0.1.0","description":"Javascript implementation of Macaroons: Cookies with Contextual Caveats for Decentralized Authorization in the Cloud.","main":"index.js","scripts":{"test":"node ./node_modules/grunt-cli/bin/grunt test","before_deploy":"node ./node_modules/grunt-cli/bin/grunt clean default"},"repository":{"type":"git","url":"https://github.com/nitram509/macaroons.js"},"keywords":["security","authentication","crypto","cloud","microservices","cookies","caveats","authorization","macaroons"],"author":{"name":"Martin W. Kirst","url":"https://twitter.com/nitram509"},"license":"Apache 2.0","bugs":{"url":"https://github.com/nitram509/macaroons.js/issues"},"homepage":"https://github.com/nitram509/macaroons.js","engines":{"node":"0.10.x","npm":"1.4.x"},"dependencies":{},"devDependencies":{"expect.js":"~0.3.1","grunt":"~0.4.2","grunt-cli":"~0.1.13","grunt-contrib-clean":"^0.6.0","grunt-contrib-copy":"^0.7.0","grunt-contrib-watch":"^0.6.1","grunt-mocha-test":"^0.12.4","grunt-typescript":"^0.4.6","mocha":"~2.0.1","typescript":"^1.3.0"},"directories":{"lib":"./lib"},"gitHead":"718885392edc4cd7e45de60d7fe5e7408b180d77","_id":"macaroons.js@0.1.0","_shasum":"0640dc31c732173616d497fa7804537196f5574e","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"nitram509","email":"nitram509@bitkings.de"},"maintainers":[{"name":"nitram509","email":"nitram509@bitkings.de"}],"dist":{"shasum":"0640dc31c732173616d497fa7804537196f5574e","tarball":"https://registry.npmjs.org/macaroons.js/-/macaroons.js-0.1.0.tgz","integrity":"sha512-ypWdo508bPKRUBEwRZbxlqgL4Zep+UfmVNXiqoID+Et4ArLr4haNnTsaw+ghsSZbN+yGDQ+XBIWwBoGOzdxlQQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHuN1qo3o4dAfUC6scGNY3CORx//SsQOMsLLL4+7peJkAiBG1rIdYniGYCyKdeLb0uGAVPh0I27SMZrdvpRMEJCamg=="}]}},"0.2.0":{"name":"macaroons.js","version":"0.2.0","description":"Javascript implementation of Macaroons: Cookies with Contextual Caveats for Decentralized Authorization in the Cloud.","main":"index.js","scripts":{"test":"node ./node_modules/grunt-cli/bin/grunt test","before_deploy":"node ./node_modules/grunt-cli/bin/grunt clean default"},"repository":{"type":"git","url":"https://github.com/nitram509/macaroons.js"},"keywords":["security","authentication","crypto","cloud","microservices","cookies","caveats","authorization","macaroons"],"author":{"name":"Martin W. Kirst","url":"https://twitter.com/nitram509"},"license":"Apache 2.0","bugs":{"url":"https://github.com/nitram509/macaroons.js/issues"},"homepage":"https://github.com/nitram509/macaroons.js","engines":{"node":"0.10.x","npm":"1.4.x"},"dependencies":{"ecma-nacl":"^1.4.0","typedarray-to-buffer":"^3.0.1"},"devDependencies":{"expect.js":"~0.3.1","grunt":"~0.4.2","grunt-cli":"~0.1.13","grunt-contrib-clean":"^0.6.0","grunt-contrib-copy":"^0.7.0","grunt-contrib-watch":"^0.6.1","grunt-mocha-test":"^0.12.4","grunt-typescript":"^0.4.6","mocha":"~2.0.1","typescript":"^1.3.0"},"directories":{"lib":"./lib"},"gitHead":"09b2547ac3ee2c0e8a086e19c9222b1a10d2f435","_id":"macaroons.js@0.2.0","_shasum":"544d8ba790a4ae6319d9d8e1b27d7ab16a3908d6","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"nitram509","email":"nitram509@bitkings.de"},"maintainers":[{"name":"nitram509","email":"nitram509@bitkings.de"}],"dist":{"shasum":"544d8ba790a4ae6319d9d8e1b27d7ab16a3908d6","tarball":"https://registry.npmjs.org/macaroons.js/-/macaroons.js-0.2.0.tgz","integrity":"sha512-9a3bS81Ma5kUHQxdtZhrv8TZ0R0JSkOvNbF/812mbaIZUJgts/VOXDDXhE0MU4aSltIfSJ8/PoawDG6eA6TfVw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAoJQSTZzZHf9ATkC/NH3yyxRoprhqdsU5ywr2imzVVZAiEA1AFWJL0CwMdMmyJqEa2ah9QzfkZoEtLE1UYpa4qG2K0="}]}},"0.3.1":{"name":"macaroons.js","version":"0.3.1","description":"Javascript implementation of Macaroons: Cookies with Contextual Caveats for Decentralized Authorization in the Cloud.","main":"index.js","scripts":{"test":"node ./node_modules/grunt-cli/bin/grunt test","before_deploy":"node ./node_modules/grunt-cli/bin/grunt clean default"},"repository":{"type":"git","url":"https://github.com/nitram509/macaroons.js"},"keywords":["security","authentication","crypto","cloud","microservices","cookies","caveats","authorization","macaroons"],"author":{"name":"Martin W. Kirst","url":"https://twitter.com/nitram509"},"license":"Apache 2.0","bugs":{"url":"https://github.com/nitram509/macaroons.js/issues"},"homepage":"https://github.com/nitram509/macaroons.js","engines":{"node":"0.10.x","npm":"1.4.x"},"dependencies":{"ecma-nacl":"^1.4.0","typedarray-to-buffer":"^3.0.1"},"devDependencies":{"expect.js":"~0.3.1","grunt":"~0.4.2","grunt-cli":"~0.1.13","grunt-contrib-clean":"^0.6.0","grunt-contrib-copy":"^0.7.0","grunt-contrib-watch":"^0.6.1","grunt-mocha-test":"^0.12.4","grunt-typescript":"^0.4.6","mocha":"~2.0.1","typescript":"^1.3.0"},"directories":{"lib":"./lib"},"gitHead":"a2430f62a73465405f0be05f9610de40b10f1237","_id":"macaroons.js@0.3.1","_shasum":"84aec4b02034c2b20e2783b9042a317951cd5206","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"nitram509","email":"nitram509@bitkings.de"},"maintainers":[{"name":"nitram509","email":"nitram509@bitkings.de"}],"dist":{"shasum":"84aec4b02034c2b20e2783b9042a317951cd5206","tarball":"https://registry.npmjs.org/macaroons.js/-/macaroons.js-0.3.1.tgz","integrity":"sha512-CrEnqZ6lSlrCocC7VspWCRGCbYXaJkMaKhxoN/+N1F0TRkRSBbB+misDeiN4S4buZYIA+i5JorgF0kk6nNH+hg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHAoYEHgCK34XT1EKRQ0aV/66GLpYIH/1Rxj+hq0j3PLAiA4G+e3zb8pfLI4kb2ICiXwclTFpVopYa0P3y707k5j/w=="}]}},"0.3.2":{"name":"macaroons.js","version":"0.3.2","description":"Javascript implementation of Macaroons: Cookies with Contextual Caveats for Decentralized Authorization in the Cloud.","main":"index.js","scripts":{"test":"node ./node_modules/grunt-cli/bin/grunt test","before_deploy":"node ./node_modules/grunt-cli/bin/grunt clean default"},"repository":{"type":"git","url":"https://github.com/nitram509/macaroons.js"},"keywords":["security","authentication","crypto","cloud","microservices","cookies","caveats","authorization","macaroons"],"author":{"name":"Martin W. Kirst","url":"https://twitter.com/nitram509"},"license":"Apache 2.0","bugs":{"url":"https://github.com/nitram509/macaroons.js/issues"},"homepage":"https://github.com/nitram509/macaroons.js","engines":{"node":"0.10.x","npm":"1.4.x"},"dependencies":{"ecma-nacl":"^1.4.0","typedarray-to-buffer":"^3.0.1"},"devDependencies":{"expect.js":"~0.3.1","grunt":"~0.4.2","grunt-cli":"~0.1.13","grunt-contrib-clean":"^0.6.0","grunt-contrib-copy":"^0.7.0","grunt-contrib-watch":"^0.6.1","grunt-mocha-test":"^0.12.4","grunt-typescript":"^0.4.6","mocha":"~2.0.1","typescript":"^1.3.0"},"directories":{"lib":"./lib"},"gitHead":"3523676812a43cbcaa57714d03642bc3c1b44e6e","_id":"macaroons.js@0.3.2","_shasum":"feeeb0a227ed8facf763921ed2e1953d88030587","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"nitram509","email":"nitram509@bitkings.de"},"maintainers":[{"name":"nitram509","email":"nitram509@bitkings.de"}],"dist":{"shasum":"feeeb0a227ed8facf763921ed2e1953d88030587","tarball":"https://registry.npmjs.org/macaroons.js/-/macaroons.js-0.3.2.tgz","integrity":"sha512-yzXMEZKZEyaeudI4wbHJC54AHfs4NC3I3+k9eKtlKqqxSoC/Yxv6a73Ram+lV1k0TnabPZF8Xp8qMpgZP/uJuA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCw2QWVKkhq6zq39bfGJQ446l5w7bfkEg0z8X7eH6BiZAIgAPZB1iRIu08yfv59eFKLc/XkKA5JYedF4RiroQn1Qww="}]}},"0.3.4":{"name":"macaroons.js","version":"0.3.4","description":"Javascript implementation of Macaroons: Cookies with Contextual Caveats for Decentralized Authorization in the Cloud.","main":"index.js","scripts":{"test":"node ./node_modules/grunt-cli/bin/grunt test","before_deploy":"node ./node_modules/grunt-cli/bin/grunt clean default"},"repository":{"type":"git","url":"https://github.com/nitram509/macaroons.js"},"keywords":["security","authentication","crypto","cloud","microservices","cookies","caveats","authorization","macaroons"],"author":{"name":"Martin W. Kirst","url":"https://twitter.com/nitram509"},"license":"Apache 2.0","bugs":{"url":"https://github.com/nitram509/macaroons.js/issues"},"homepage":"https://github.com/nitram509/macaroons.js","engines":{"node":"0.11.x","npm":"1.4.x"},"dependencies":{"ecma-nacl":"^2.0.1","typedarray-to-buffer":"^3.0.1"},"devDependencies":{"expect.js":"~0.3.1","grunt":"~0.4.2","grunt-cli":"~0.1.13","grunt-contrib-clean":"^0.6.0","grunt-contrib-copy":"^0.8.0","grunt-contrib-watch":"^0.6.1","grunt-mocha-test":"^0.12.7","grunt-typescript":"^0.6.1","mocha":"~2.2.4","typescript":"^1.4.1"},"directories":{"lib":"./lib"},"gitHead":"8470eb5301cee9d85d98aeceabcd11240f35d530","_id":"macaroons.js@0.3.4","_shasum":"192aa2f56c1e20896679c8dfbe86a844f183c5c0","_from":".","_npmVersion":"2.5.1","_nodeVersion":"0.12.0","_npmUser":{"name":"nitram509","email":"nitram509@bitkings.de"},"maintainers":[{"name":"nitram509","email":"nitram509@bitkings.de"}],"dist":{"shasum":"192aa2f56c1e20896679c8dfbe86a844f183c5c0","tarball":"https://registry.npmjs.org/macaroons.js/-/macaroons.js-0.3.4.tgz","integrity":"sha512-pQvb2iuEwe8VpBdRg+n0AviupuAbELwv8WTDbD2XfRM4IWiQEHIuMTj8C2zIcZ6Z8/0JAir/DiVXL/rdvaOdow==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIA7G2YfjqfeKPEP3YRkqfDalFrM9yQXT2EAC6iQQTfANAiEAlPW7nzqSAOL0hronW1jtmrbiyEjBsb0vdxvCegPkPbs="}]}},"0.3.5":{"name":"macaroons.js","version":"0.3.5","description":"Javascript implementation of Macaroons: Cookies with Contextual Caveats for Decentralized Authorization in the Cloud.","main":"index.js","scripts":{"test":"node ./node_modules/grunt-cli/bin/grunt test","before_deploy":"node ./node_modules/grunt-cli/bin/grunt clean default"},"repository":{"type":"git","url":"https://github.com/nitram509/macaroons.js"},"keywords":["security","authentication","crypto","cloud","microservices","cookies","caveats","authorization","macaroons"],"author":{"name":"Martin W. Kirst","url":"https://twitter.com/nitram509"},"license":"Apache 2.0","bugs":{"url":"https://github.com/nitram509/macaroons.js/issues"},"homepage":"https://github.com/nitram509/macaroons.js","engines":{"node":">=0.11","npm":">=1.4"},"dependencies":{"ecma-nacl":"^2.0.1","typedarray-to-buffer":"^3.0.1"},"devDependencies":{"expect.js":"~0.3.1","grunt":"~0.4.2","grunt-cli":"~0.1.13","grunt-contrib-clean":"^0.6.0","grunt-contrib-copy":"^0.8.0","grunt-contrib-watch":"^0.6.1","grunt-mocha-test":"^0.12.7","grunt-typescript":"^0.6.1","mocha":"~2.2.4","typescript":"^1.4.1"},"directories":{"lib":"./lib"},"gitHead":"b23c6e060c5185179434894a50af1aa759523609","_id":"macaroons.js@0.3.5","_shasum":"ac002ae695e7be9acdfd5699db379787b0880892","_from":".","_npmVersion":"2.5.1","_nodeVersion":"0.12.0","_npmUser":{"name":"nitram509","email":"nitram509@bitkings.de"},"maintainers":[{"name":"nitram509","email":"nitram509@bitkings.de"}],"dist":{"shasum":"ac002ae695e7be9acdfd5699db379787b0880892","tarball":"https://registry.npmjs.org/macaroons.js/-/macaroons.js-0.3.5.tgz","integrity":"sha512-/00pO0Kv5m3KsvBTAwkIkn05sX2uIZ9LNkezlwLBA6z09zx9wcNAwFA8vk2y48EBTkb8maPdmyGOupDaMlGn5w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFsP4NDLA0RBSlL0mmDGYgifh032NP1SAQBEbi4AtjLRAiEAusG6tknq+Ngf6IM910Jw17d8oGs/3sWSkURyG4vJjCo="}]}},"0.3.6":{"name":"macaroons.js","version":"0.3.6","description":"Javascript implementation of Macaroons: Cookies with Contextual Caveats for Decentralized Authorization in the Cloud.","main":"index.js","scripts":{"test":"node ./node_modules/grunt-cli/bin/grunt test","before_deploy":"node ./node_modules/grunt-cli/bin/grunt clean default"},"repository":{"type":"git","url":"git+https://github.com/nitram509/macaroons.js.git"},"keywords":["security","authentication","crypto","cloud","microservices","cookies","caveats","authorization","macaroons"],"author":{"name":"Martin W. Kirst","url":"https://twitter.com/nitram509"},"license":"Apache 2.0","bugs":{"url":"https://github.com/nitram509/macaroons.js/issues"},"homepage":"https://github.com/nitram509/macaroons.js","engines":{"node":">=0.11","npm":">=1.4"},"dependencies":{"ecma-nacl":"^2.0.1","typedarray-to-buffer":"^3.0.1"},"devDependencies":{"expect.js":"~0.3.1","grunt":"~0.4.2","grunt-cli":"~0.1.13","grunt-contrib-clean":"^0.6.0","grunt-contrib-copy":"^0.8.0","grunt-contrib-watch":"^0.6.1","grunt-mocha-test":"^0.12.7","grunt-typescript":"^0.6.1","mocha":"~2.2.4","typescript":"^1.4.1"},"directories":{"lib":"./lib"},"gitHead":"249ac4b607ab1da2f1c6ac7dfd76c3a1299b0068","_id":"macaroons.js@0.3.6","_shasum":"958fcb1d51bcdfe282e450d1a8f3aa2f1815a55d","_from":".","_npmVersion":"3.9.3","_nodeVersion":"6.2.1","_npmUser":{"name":"nitram509","email":"nitram509@bitkings.de"},"dist":{"shasum":"958fcb1d51bcdfe282e450d1a8f3aa2f1815a55d","tarball":"https://registry.npmjs.org/macaroons.js/-/macaroons.js-0.3.6.tgz","integrity":"sha512-xYnMoA2UVjWgxQDQmMkv3d1C50cPrtynExzug1CxbpWd9S3365/LFje6UiWjhD3aVnmwIrm2V6z1Xhle4alOvQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDSRqEHmOBh413M2h4V72j7wRP+gyyiHXGqv2GuuDez3AiEA/p76VQjUfK5GhJJlfc6KRTkqyWBysys88IJkMn23u7g="}]},"maintainers":[{"name":"nitram509","email":"nitram509@bitkings.de"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/macaroons.js-0.3.6.tgz_1465154735743_0.42948093451559544"}},"0.3.8":{"name":"macaroons.js","version":"0.3.8","description":"Javascript implementation of Macaroons: Cookies with Contextual Caveats for Decentralized Authorization in the Cloud.","main":"index.js","scripts":{"test":"node ./node_modules/grunt-cli/bin/grunt test","before_deploy":"node ./node_modules/grunt-cli/bin/grunt clean default"},"repository":{"type":"git","url":"git+https://github.com/nitram509/macaroons.js.git"},"keywords":["security","authentication","crypto","cloud","microservices","cookies","caveats","authorization","macaroons"],"author":{"name":"Martin W. Kirst","url":"https://twitter.com/nitram509"},"license":"Apache-2.0","bugs":{"url":"https://github.com/nitram509/macaroons.js/issues"},"homepage":"https://github.com/nitram509/macaroons.js","engines":{"node":">=0.11","npm":">=1.4"},"dependencies":{"ecma-nacl":"^2.0.1","typedarray-to-buffer":"^3.0.1"},"devDependencies":{"expect.js":"~0.3.1","grunt":"~0.4.5","grunt-cli":"~0.1.13","grunt-contrib-clean":"^0.6.0","grunt-contrib-copy":"^0.8.0","grunt-contrib-watch":"^0.6.1","grunt-mocha-test":"^0.13.2","grunt-typescript":"^0.6.1","mocha":"^3.2.0","typescript":"^1.6.2"},"directories":{"lib":"./lib"},"gitHead":"92dd1737e55dceba3fc569a09b83d2410b18ed88","_id":"macaroons.js@0.3.8","_shasum":"7d91fe66ff74c6a6387e53c9d90a64695e81b158","_from":".","_npmVersion":"3.9.3","_nodeVersion":"6.2.1","_npmUser":{"name":"nitram509","email":"nitram509@bitkings.de"},"dist":{"shasum":"7d91fe66ff74c6a6387e53c9d90a64695e81b158","tarball":"https://registry.npmjs.org/macaroons.js/-/macaroons.js-0.3.8.tgz","integrity":"sha512-lY8c4ghMQurlBuNltaac4y6Z4PBIBnmVFJgvzw7wsB5Kt7GS8JGQl2mvQI6TeZc+jaNRT7n9q+cihpr9mFJ2iw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFNomHMOgU8lNEaj8K96xQ2nVKH7VjXGynXzPkP7acdoAiEAh9LfJbRAzwJ1O7NHPSnOnqndSYjrzcvbYlOT77ltYOQ="}]},"maintainers":[{"name":"nitram509","email":"nitram509@bitkings.de"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/macaroons.js-0.3.8.tgz_1487107221876_0.6653830527793616"}},"0.3.9":{"name":"macaroons.js","version":"0.3.9","description":"Javascript implementation of Macaroons: Cookies with Contextual Caveats for Decentralized Authorization in the Cloud.","main":"index.js","scripts":{"build":"npx grunt","test":"npx grunt test","before_deploy":"npx grunt package"},"repository":{"type":"git","url":"git+https://github.com/nitram509/macaroons.js.git"},"keywords":["security","authentication","crypto","cloud","microservices","cookies","caveats","authorization","macaroons"],"author":{"name":"Martin W. Kirst","url":"https://twitter.com/nitram509"},"license":"Apache-2.0","bugs":{"url":"https://github.com/nitram509/macaroons.js/issues"},"homepage":"https://github.com/nitram509/macaroons.js","engines":{"node":">=0.11","npm":">=1.4"},"dependencies":{"ecma-nacl":"^2.0.1","typedarray-to-buffer":"^3.0.1"},"devDependencies":{"@types/node":"^14.14.9","@types/jest":"^26.0.15","jest":"^26.6.3","grunt":"~1.3.0","grunt-cli":"~1.3.2","grunt-contrib-clean":"^2.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-watch":"^1.1.0","grunt-run":"^0.8.1","grunt-ts":"^6.0.0-beta.22","typescript":"^4.1.2","ts-node":"^9.0.0","jest-coverage-badges":"^1.1.2"},"directories":{"lib":"./lib"},"gitHead":"0a0361174a072f8a5d4ad468cc7266b1cc4fb0c9","_id":"macaroons.js@0.3.9","_nodeVersion":"14.15.1","_npmVersion":"6.14.8","dist":{"integrity":"sha512-mSAl7o2xVYaN6ZxI/DfrB5G3cuQwW7D4HIwvvk6S5FrY4Ih6EQamV7/OMBW1XD79eiwBcstZ60DREH8M99N67A==","shasum":"27d8ce03a65a18bcd1ae42b37966a6a6a7bd54b7","tarball":"https://registry.npmjs.org/macaroons.js/-/macaroons.js-0.3.9.tgz","fileCount":43,"unpackedSize":115357,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfuTj2CRA9TVsSAnZWagAABG4P/iPVilV21yG29CS5vD1C\nQrPrCK+9yp1KGLMjpNjXXzsG56wsy5/RwfdIjw6+UkwaUkafjNWke3HotMJk\nyHiVbEPZHepEtIRcnk4XZiygbOsz3+3hpXct8pO3dqRI3mjqEBiZQNj+5tJz\nwmFnQodi4dSPAQPW//dCS0pXu8d+xU68DvlSWNmT0iNbsqPRAzUaUcfnxCHX\nYiPT95TXA8jdYJAv09trcitG3/uY8K+iqBk5AquKs4iBYkjTbjW1myaW0bK1\ngRC4g7FmyLEfhD9xpT79JZqnV2Lwj5bzZvBk56ioSUPxnaqAriFLW/u9v/eI\nqUUjZ3vkMq/LQPO1dACRrUh4F6sPJzemFnpn/VPVWU3X7XZDOcWD32CHB30M\nnbFP1QHaR+4dEX2IQD3l9ca0z2xLq5YmP94YDB131+aJ18VW7+aAeCvM06pI\nTesb9rXJKkh8hndeqXgGOf9MX4JuP/deBIoeiQdhYBUJRpZzHfqkrlu4ABnY\n1J7auy5pHCKyZhQZ6Q+Fo/6ba4I3M0BCduJhK9tJy36km18ddfkBfEvuxwd5\nMkTqq1VGHU8ncJ5cLCgbSoXAYeI35Qpc7kQfNVURLnIgX+HLvOJrv8wUxtZa\nGNIKX7T+RyY7qB97FnrCHlKxgiexsE3iU0Dx+/sWIp41GLaMSpK/tVGAd9dJ\nwxcs\r\n=U8xC\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIH4+CoKKrKxQ5mjwJp1Ld8UeOY2rR+2XIT+PKqim9D8YAiBYj/erT4WUIYniz0FjL+0kB+ymqMiKJ8LoC0fOHgNZ+A=="}]},"_npmUser":{"name":"nitram509","email":"nitram509@bitkings.de"},"maintainers":[{"name":"nitram509","email":"nitram509@bitkings.de"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/macaroons.js_0.3.9_1605974261684_0.4832370122466716"},"_hasShrinkwrap":false}},"readme":"Macaroons are Better Than Cookies!\n==================================\n\nThis Javascript library (actually, it's written in [Typescript](http://www.typescriptlang.org/))\nprovides an implementation of macaroons[[1]](http://research.google.com/pubs/pub41892.html),\nwhich are flexible authorization tokens that work great in distributed systems.\nLike cookies, macaroons are bearer tokens that enable applications to ascertain whether their\nholders' actions are authorized.  But macaroons are better than cookies!\n\nThis project started as a port of libmacaroons[[2]](https://github.com/rescrv/libmacaroons) library.\nThe primary goals are\n   * being compatible to libmacaroons (and others)\n   * optimized for Node.js like environment\n   * focus on binary serialization format (currently, JSON format isn't supported)\n   * being the reference implementation in the Javascript community ;-)\n\nThere is a [playground](http://www.macaroons.io/) (testing environment) available,\nwhere you can build and verify macaroons online. \n\n##### License\n\n[![License: Apache 2.0](https://img.shields.io/:license-Apache%202.0-blue.svg)](http://www.apache.org/licenses/LICENSE-2.0)\n\n\nBuild Status\n--------------------\n\n[![Build Status](https://travis-ci.org/nitram509/jmacaroons.svg?branch=master)](https://travis-ci.org/nitram509/macaroons.js)\n[![Built with Grunt](https://cdn.gruntjs.com/builtwith.png)](http://gruntjs.com/)\n\n[![NPM](https://nodei.co/npm/macaroons.js.png)](https://nodei.co/npm/macaroons.js/)\n\nCode Coverage\n--------------------\n\n| Statements                | Branches                | Functions                | Lines                |\n| ------------------------- | ----------------------- | ------------------------ | -------------------- |\n| ![Statements](./coverage/badge-statements.svg) | ![Branches](./coverage/badge-branches.svg) | ![Functions](./coverage/badge-functions.svg) | ![Lines](./coverage/badge-lines.svg) |\n\n\nCommunity & Badges\n--------------------\n\nIf you like this project, endorse please: [![endorse](https://api.coderwall.com/nitram509/endorsecount.png)](https://coderwall.com/nitram509)\n\n\nCreating Your First Macaroon\n----------------------------------\n\nLets create a simple macaroon\n````Javascript\nvar MacaroonsBuilder = require('macaroons.js').MacaroonsBuilder;\n\nvar location = \"http://www.example.org\";\nvar secretKey = \"this is our super secret key; only we should know it\";\nvar identifier = \"we used our secret key\";\nvar macaroon = MacaroonsBuilder.create(location, secretKey, identifier);\n````\n\nOf course, this macaroon can be displayed in a more human-readable form\nfor easy debugging\n````Javascript\nsys.puts(macaroon.inspect());\n\n// > location http://www.example.org\n// > identifier we used our secret key\n// > signature e3d9e02908526c4c0039ae15114115d97fdd68bf2ba379b342aaf0f617d0552f\n````\n\nYou may use a Buffer object instead of string to create a macaroon. This yields in better performance.\n\n````Javascript\nvar secretKey = Buffer.from(\"39a630867921b61522892779c659934667606426402460f913c9171966e97775\", 'hex');\nvar macaroon = MacaroonsBuilder.create(location, secretKey, identifier);\n````\n\n\nSerializing\n----------------------------------\n\nMacaroons are serialized, using 'base64url' encoding, as defined in [RFC 4648](http://www.ietf.org/rfc/rfc4648.txt).\n(Hint: this is a special variant that uses URL safe symbols, which regular base64 parser will most likely fail to read.)\nThis way you can very easily append it to query string within URIs.\n\n````Javascript\nvar sys=require('sys');\n\nvar serialized = macaroon.serialize();\nsys.puts(\"Serialized: \" + serialized);\n\n// > Serialized: MDAyNGxvY2F0aW9uIGh0dHA6Ly93d3cuZXhhbXBsZS5vcmcKMDAyNmlkZW50aWZpZXIgd2UgdXNlZCBvdXIgc2VjcmV0IGtleQowMDJmc2lnbmF0dXJlIOPZ4CkIUmxMADmuFRFBFdl_3Wi_K6N5s0Kq8PYX0FUvCg\n````\n\n\nDe-Serializing\n----------------------------------\n\n````Javascript\nvar macaroon = MacaroonsBuilder.deserialize(serialized);\nsys.puts(macaroon.inspect());\n\n// > location http://www.example.org\n// > identifier we used our secret key\n// > signature e3d9e02908526c4c0039ae15114115d97fdd68bf2ba379b342aaf0f617d0552f\n````\n\n\nVerifying Your Macaroon\n----------------------------------\n\nA verifier can only ever successfully verify a macaroon\nwhen provided with the macaroon and its corresponding secret - no secret, no authorization.\n\n````Javascript\nvar MacaroonsVerifier = require('macaroons.js').MacaroonsVerifier;\n\nvar verifier = new MacaroonsVerifier(macaroon);\nvar secret = \"this is our super secret key; only we should know it\";\nvar valid = verifier.isValid(secret);\n\n// > true\n````\n\nYou may use a Buffer object instead of string to verify the macaroon. This yields in better performance.\n\n````Javascript\nvar secret = Buffer.from(\"39a630867921b61522892779c659934667606426402460f913c9171966e97775\", 'hex');\nvar valid = verifier.isValid(secret);\n````\n\nAdding Caveats\n-----------------------------------\n\nWhen creating a new macaroon, you can add a caveat to our macaroon that\nrestricts it to just the account number 3735928559.\n````Javascript\nvar location = \"http://www.example.org\";\nvar secretKey = \"this is our super secret key; only we should know it\";\nvar identifier = \"we used our secret key\";\nvar macaroon = new MacaroonsBuilder(location, secretKey, identifier)\n    .add_first_party_caveat(\"account = 3735928559\")\n    .getMacaroon();\n````\n\nBecause macaroon objects are immutable, they have to be modified\nvia MacaroonsBuilder. Thus, a new macaroon object will be created.\n````Javascript\nvar macaroon = MacaroonsBuilder.modify(macaroon)\n    .add_first_party_caveat(\"account = 3735928559\")\n    .getMacaroon();\nsys.puts(macaroon.inspect());\n\n// > location http://www.example.org\n// > identifier we used our secret key\n// > cid account = 3735928559\n// > signature 1efe4763f290dbce0c1d08477367e11f4eee456a64933cf662d79772dbb82128\n````\n\n\nVerifying Macaroons With Caveats\n--------------------------------\n\nThe verifier should say that this macaroon is unauthorized because\nthe verifier cannot prove that the caveat (account = 3735928559) is satisfied.\nWe can see that it fails just as we would expect.\n````Javascript\nvar location = \"http://www.example.org\";\nvar secretKey = \"this is our super secret key; only we should know it\";\nvar identifier = \"we used our secret key\";\nvar macaroon = new MacaroonsBuilder(location, secretKey, identifier)\n    .add_first_party_caveat(\"account = 3735928559\")\n    .getMacaroon();\nvar verifier = new MacaroonsVerifier(macaroon);\nsys.puts(verifier.isValid(secretKey));\n// > false\n````\n\nCaveats like these are called \"exact caveats\" because there is exactly one way\nto satisfy them.  Either the account number is 3735928559, or it isn't.  At\nverification time, the verifier will check each caveat in the macaroon against\nthe list of satisfied caveats provided to \"satisfyExact()\".  When it finds a\nmatch, it knows that the caveat holds and it can move onto the next caveat in\nthe macaroon.\n````Javascript\nverifier.satisfyExact(\"account = 3735928559\");\nsys.puts(verifier.isValid(secretKey));\n// > true\n````\n\nThe verifier can be made more general, and be \"future-proofed\",\nso that it will still function correctly even if somehow the authorization\npolicy changes; for example, by adding the three following facts,\nthe verifier will continue to work even if someone decides to\nself-attenuate itself macaroons to be only usable from IP address and browser:\n````Javascript\nverifier.satisfyExact(\"IP = 127.0.0.1')\");\nverifier.satisfyExact(\"browser = Chrome')\");\nsys.puts(verifier.isValid(secretKey));\n// > true\n````\n\nThere is also a more general way to check caveats, via callbacks.\nWhen providing such a callback to the verifier,\nit is able to check if the caveat satisfies special constrains.\n````Javascript\nvar macaroon = new MacaroonsBuilder(location, secretKey, identifier)\n    .add_first_party_caveat(\"time < 2042-01-01T00:00\")\n    .getMacaroon();\nvar verifier = new MacaroonsVerifier(macaroon);\nsys.puts(verifier.isValid(secretKey));\n// > false\n\nvar TimestampCaveatVerifier = require('macaroons.js').verifier.TimestampCaveatVerifier;\nverifier.satisfyGeneral(TimestampCaveatVerifier);\nsys.puts(verifier.isValid(secretKey));\n// > true\n````\n\n\nThird Party Caveats\n---------------------\n\nLike first-party caveats, third-party caveats restrict the context in which a\nmacaroon is authorized, but with a different form of restriction.  Where a\nfirst-party caveat is checked directly within the verifier, a third-party caveat\nis checked by the third-party, who provides a discharge macaroon to prove that\nthe original third-party caveat is true.  The discharge macaroon is recursively\ninspected by the verifier; if it verifies successfully, the discharge macaroon\nserves as a proof that the original third-party caveat is satisfied.  Of course,\nnothing stops discharge macaroons from containing embedded first- or third-party\ncaveats for the verifier to consider during verification.\n\nLet's rework the above example to provide Alice with access to her account only\nafter she authenticates with a service that is separate from the service\nprocessing her banking transactions.\n\nAs before, we'll start by constructing a new macaroon with the caveat that is\nlimited to Alice's bank account.\n\n````Javascript\n// create a simple macaroon first\nvar location = \"http://mybank/\";\nvar secret = \"this is a different super-secret key; never use the same secret twice\";\nvar publicIdentifier = \"we used our other secret key\";\nvar mb = new MacaroonsBuilder(location, secret, publicIdentifier)\n    .add_first_party_caveat(\"account = 3735928559\");\n\n// add a 3rd party caveat\n// you'll likely want to use a higher entropy source to generate this key\nvar caveat_key = \"4; guaranteed random by a fair toss of the dice\";\nvar predicate = \"user = Alice\";\n// send_to_3rd_party_location_and_do_auth(caveat_key, predicate);\n// identifier = recv_from_auth();\nvar identifier = \"this was how we remind auth of key/pred\";\nvar m = mb.add_third_party_caveat(\"http://auth.mybank/\", caveat_key, identifier)\n    .getMacaroon();\n\nsys.puts(m.inspect());\n// > location http://mybank/\n// > identifier we used our other secret key\n// > cid account = 3735928559\n// > cid this was how we remind auth of key/pred\n// > vid AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA027FAuBYhtHwJ58FX6UlVNFtFsGxQHS7uD_w_dedwv4Jjw7UorCREw5rXbRqIKhr\n// > cl http://auth.mybank/\n// > signature d27db2fd1f22760e4c3dae8137e2d8fc1df6c0741c18aed4b97256bf78d1f55c\n````\n\nIn a real application, we'd look at these third party caveats, and contact each\nlocation to retrieve the requisite discharge macaroons. We would include the\nidentifier for the caveat in the request itself, so that the server can recall\nthe secret used to create the third-party caveat. The server can then generate\nand return a new macaroon that discharges the caveat:\n\n````Javascript\nMacaroon d = new MacaroonsBuilder(\"http://auth.mybank/\", caveat_key, identifier)\n    .add_first_party_caveat(\"time < 2015-01-01T00:00\")\n    .getMacaroon();\n````\n\nThis new macaroon enables the verifier to determine that the third party caveat\nis satisfied. Our target service added a time-limiting caveat to this macaroon\nthat ensures that this discharge macaroon does not last forever.  This ensures\nthat Alice (or, at least someone authenticated as Alice) cannot use the\ndischarge macaroon indefinitely and will eventually have to re-authenticate.\n\nOnce Alice has both the root macaroon and the discharge macaroon in her\npossession, she can make the request to the target service. Making a request\nwith discharge macaroons is only slightly more complicated than making requests\nwith a single macaroon. In addition to serializing and transmitting all\ninvolved macaroons, there is preparation step that binds the discharge macaroons\nto the root macaroon. This binding step ensures that the discharge macaroon is\nuseful only when presented alongside the root macaroon. The root macaroon is\nused to bind the discharge macaroons like this:\n\n````Javascript\nMacaroon dp = MacaroonsBuilder.modify(m)\n    .prepare_for_request(d)\n    .getMacaroon();\n````\n\nIf we were to look at the signatures on these prepared discharge macaroons, we\nwould see that the binding process has irreversibly altered their signature(s).\n\n````Javascript\n// > d.signature = 82a80681f9f32d419af12f6a71787a1bac3ab199df934ed950ddf20c25ac8c65\n// > dp.signature = 2eb01d0dd2b4475330739140188648cf25dda0425ea9f661f1574ca0a9eac54e\n````\n\nThe root macaroon 'm' and its discharge macaroons 'dp' are ready for the\nrequest.  Alice can serialize them all and send them to the bank to prove she is\nauthorized to access her account. The bank can verify them using the same\nverifier we built before.  We provide the discharge macaroons as a third\nargument to the verify call:\n\n````Javascript\nnew MacaroonsVerifier(m)\n    .satisfyExact(\"account = 3735928559\")\n    .satisfyGeneral(new TimestampCaveatVerifier())\n    .satisfy3rdParty(dp)\n    .assertIsValid(secret);\n// > ok.\n````\n\nWithout the 'prepare_for_request()' call, the verification would fail.\n\n\nCommonly used verifier, shipped with jmacaroons\n--------------------------------------------------\n\n##### Time to live verification\n\nApplying a timestamp in the future to a macaroon will provide time to live semantics.\nGiven that all machines have synchronized clocks, a general macaroon verifier is able to check\nfor expiration.\n\n````Javascript\nvar macaroon = new MacaroonsBuilder(location, secretKey, identifier)\n    .add_first_party_caveat(\"time < 2015-01-01T00:00\")\n    .getMacaroon();\n\nvar TimestampCaveatVerifier = require('macaroons.js').verifier.TimestampCaveatVerifier;\nnew MacaroonsVerifier(macaroon)\n    .satisfyGeneral(TimestampCaveatVerifier)\n    .isValid(secretKey);\n// > true\n````\n\n\nChoosing Secrets\n-------------------\n\nFor clarity, we've generated human-readable secrets that we use as the root keys\nof all of our macaroons.  In practice, this is terribly insecure and can lead to\nmacaroons that can easily be forged because the secret is too predictable.  To\navoid this, we recommend generating secrets using a sufficient number of\nsuitably random bytes.  Because the bytes are a secret key, they should be drawn\nfrom a source with enough entropy to ensure that the key cannot be guessed\nbefore the macaroon falls out of use.\n\nThe macaroons.js library exposes a constant that is the ideal number of bytes these\nsecret keys should contain.  Any shorter is wasting an opportunity for security.\n\n````Javascript\nvar MACAROON_SUGGESTED_SECRET_LENGTH = require('macaroons.js').MacaroonsConstants.MACAROON_SUGGESTED_SECRET_LENGTH; // == 32\n````\n\n\nPerformance\n--------------\n\nThere's a little micro benchmark, which demonstrates the performance of macaroons.js\n\nSource: https://gist.github.com/nitram509/35b3570edfd9144f37e5\n\nEnvironment: Windows 8.1 64bit, Node.js v0.10.34 64bit, Intel i7-4790 @3.60GHz\n\n````text\nResults\n----------\nmacaroons.js benchmark:\nserialize with secret string x 47,210 ops/sec ±1.48% (93 runs sampled)\nserialize with secret Buffer x 61,923 ops/sec ±1.29% (94 runs sampled)\nde-serialize and verify with secret string x 64,655 ops/sec ±1.29% (93 runs sampled)\nde-serialize and verify with secret Buffer x 93,117 ops/sec ±1.34% (94 runs sampled)\n````\n\n\nKnown issues\n----------------\n\n### incompatibility to Node.js v0.12\n\nMacaroons.js was developed using Node.js v01.12.\nAll tests run fine, what you can see at Travis-CI build log\n[macaroons.js job#53.1](https://travis-ci.org/nitram509/macaroons.js/jobs/61749295).\n\nAfter one year of no commits, suddenly the same tests fail, see build log\n[macaroons.js job#55.1](https://travis-ci.org/nitram509/macaroons.js/jobs/135430053).\n\nInterestingly, on my local machine, using Node.js v0.12.4 (same as failing on Travis)\nall tests still run fine.\nThis leads me to the conclusion that something inside my ```node_modules``` folder\nis responsible for successful test results. To verify this thesis, I deleted the projects\n```node_modules``` folder and did ```npm install``` again.\nAfter that, my my local Node.js v0.12.4 also fails to run the tests (same as on Travis-CI).\nBut if I use Node.js 4.4+, the test run fine again :-/\n\n*Conclusion*: Some of the downstream dependencies infer with the installed Node.js version.\nRight now I'm too lazy to find the root cause and keep v.0.12.4 compatibility for Macaroons.js.\nThe simplest \"solution\" is to use an up-to-date Node.js runtime version ;-)\n\n\n## Stargazers over time\n\n[![Stargazers over time](https://starchart.cc/nitram509/macaroons.js.svg)](https://starchart.cc/nitram509/macaroons.js)\n\n","maintainers":[{"name":"nitram509","email":"nitram509@bitkings.de"}],"time":{"modified":"2022-06-19T15:03:14.264Z","created":"2014-12-20T22:07:42.048Z","0.0.1-alpha":"2014-12-20T22:07:42.048Z","0.0.2-alpha":"2014-12-21T15:46:45.562Z","0.0.3-alpha":"2014-12-21T16:01:25.105Z","0.0.5-alpha":"2014-12-21T18:47:24.886Z","0.0.6-alpha":"2014-12-22T12:05:43.332Z","0.1.0":"2014-12-23T13:59:39.761Z","0.2.0":"2014-12-25T21:19:49.918Z","0.3.0":"2015-01-06T12:47:08.258Z","0.3.1":"2015-01-06T13:00:14.638Z","0.3.2":"2015-01-09T22:44:47.261Z","0.3.4":"2015-04-22T19:38:24.976Z","0.3.5":"2015-05-08T11:12:48.634Z","0.3.6":"2016-06-05T19:25:38.251Z","0.3.8":"2017-02-14T21:20:23.939Z","0.3.9":"2020-11-21T15:57:41.831Z"},"homepage":"https://github.com/nitram509/macaroons.js","keywords":["security","authentication","crypto","cloud","microservices","cookies","caveats","authorization","macaroons"],"repository":{"type":"git","url":"git+https://github.com/nitram509/macaroons.js.git"},"author":{"name":"Martin W. Kirst","url":"https://twitter.com/nitram509"},"bugs":{"url":"https://github.com/nitram509/macaroons.js/issues"},"license":"Apache-2.0","readmeFilename":"README.md","users":{"nitram509":true}}