{"_id":"fastify-casbin","_rev":"61-d1d5b9c13adbbb9f1530633a6afe3e14","name":"fastify-casbin","dist-tags":{"latest":"4.0.0"},"versions":{"1.0.0":{"name":"fastify-casbin","version":"1.0.0","keywords":["fastify","casbin"],"author":{"name":"Simone Busoli","email":"simone.busoli@nearform.com"},"license":"MIT","_id":"fastify-casbin@1.0.0","maintainers":[{"name":"simoneb","email":"simone.busoli@gmail.com"}],"homepage":"https://github.com/nearform/fastify-casbin#readme","bugs":{"url":"https://github.com/nearform/fastify-casbin/issues"},"tsd":{"directory":"test"},"dist":{"shasum":"73e177af7e127ab0d44e5634037f1cdeb070a878","tarball":"https://registry.npmjs.org/fastify-casbin/-/fastify-casbin-1.0.0.tgz","fileCount":11,"integrity":"sha512-6qKRaIu7UAbPZOzlNZO2Zm0k0TQV3j3bePxJIkmLHE6fi4Q6ap1u+2Je0gALaWNiqq3h+FcqCi8+RxkSo2gE/A==","signatures":[{"sig":"MEYCIQDbTCuBNTb2jfBBCpPZXGfNmDUCb/8ed97TFdClUtS1iQIhAKdn8bdfH71OMvzjTZVZL7BWA1twQBAdVZJclBJwp+9T","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":10962,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfo+dHCRA9TVsSAnZWagAA2CIP/Ri5qaRrkQrRVLKWOof8\n+E2Aa2ruJf9ncmz0ndx0nhaw1bCjJlmGwLpX7ZTsjFP8nUlHkk4gJws1LbvV\nXNQqvlsiU23dgSNKw2kho/dMLSzqrZiDWD8qEC2a5V3p7p4GWlshuZ1IoPgr\nhx3DFvHyoSWBU8Kn1kEubBD0HHG1i1SugLzA3C+SqpKJRFQdcjPgtvIymwxt\nHiBP2P860o2245U5jT9ieQVW6gLTzGifw/uzNywv5c0ynytIwtOD11o5gfTO\nVsY9+HNRP7Eodx0i3rB192XUefMN54Q3UmyC9CHGOwrNn+OqHcwwAvFd5SS0\nLE8OMrK4UAr4qkZRU8J8BWyUMpv5rKyLmMdT3dGvY1l71osIkdM061UzwIpc\nx0B1/n9rBoWrT9pJH91T96FbuYjxfQDNulgSIyaqzhF9OjxerKExfT7CyTfX\nxex2EWxROslJ2lMr3n9wJXwLpI4e0eviI4GGI5jNNdv1LfzRa+y0etm3nH0M\n4eWS9ShtH1bM42S9O5vZbfL/DZWKX+p5Y+Ixj5a243hXdnVVJlWN1p/81VrP\nV0CG8fIQRv/bQGHYrzX8bTXr/4HcccCLCRlZmaTBTzPmrneYd1Gk+H5PWRyh\nRVyDIYbFe0oUgrOYZ2Vb6E02eOOalCca8ve6w0IldgkdaIuUPITlebtfl38c\nqtTE\r\n=gZdr\r\n-----END PGP SIGNATURE-----\r\n"},"main":"plugin.js","types":"plugin.d.ts","gitHead":"f62a41ad14795b16c9ae448c2f8f1da21d0929b2","scripts":{"lint":"standard | snazzy","test":"tap test/*.test.js && npm run typescript","lint:fix":"standard --fix | snazzy","typescript":"tsd"},"_npmUser":{"name":"simoneb","email":"simone.busoli@gmail.com"},"precommit":["lint","test"],"repository":{"url":"git+ssh://git@github.com/nearform/fastify-casbin.git","type":"git"},"_npmVersion":"6.13.3","description":"Plugin for fastify to add generic support for Casbin","directories":{},"_nodeVersion":"12.13.1","dependencies":{"fastify-plugin":"^3.0.0"},"_hasShrinkwrap":false,"devDependencies":{"tap":"^14.10.8","tsd":"^0.13.1","sinon":"^9.2.1","casbin":"^5.1.6","snazzy":"^9.0.0","fastify":"^3.7.0","standard":"^16.0.1","pre-commit":"^1.2.2","proxyquire":"^2.1.3","typescript":"^4.0.5","@types/node":"^14.14.6"},"peerDependencies":{"casbin":">=5.1.6"},"_npmOperationalInternal":{"tmp":"tmp/fastify-casbin_1.0.0_1604577095331_0.3138025704499452","host":"s3://npm-registry-packages"}},"2.0.0":{"name":"fastify-casbin","version":"2.0.0","keywords":["fastify","casbin"],"author":{"name":"Simone Busoli","email":"simone.busoli@nearform.com"},"license":"MIT","_id":"fastify-casbin@2.0.0","maintainers":[{"name":"simoneb","email":"simone.busoli@gmail.com"}],"homepage":"https://github.com/nearform/fastify-casbin#readme","bugs":{"url":"https://github.com/nearform/fastify-casbin/issues"},"tsd":{"directory":"test"},"dist":{"shasum":"df4f4a7048c3d5237f2629da71dbe0992f33f77f","tarball":"https://registry.npmjs.org/fastify-casbin/-/fastify-casbin-2.0.0.tgz","fileCount":11,"integrity":"sha512-YFXwkUAVYijEW2/TVjBDc/gvlz8iUTvVLkkMcnfWsy9qouyVKJHXsmQQMY30n+Mj/bnhw9kKlWjkxkb7pzMMGA==","signatures":[{"sig":"MEUCIQCiHs+9whFqv5ptVdCf6HInjgN0FCrQlfDXXAKaKRrOFwIgVAcL+CGK+E4WANho7FgIX8abd/Tq3Em6QFGedbziIho=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":12867,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf+jA0CRA9TVsSAnZWagAAmrgP/joLK1vpFHXB0fDf8ZLx\njcDo5t+BALGw2dE43QNmKxPnGJ6a4IcpQr8ULEg7viCcYZfmjiYMFoLJVvKk\nTy+g5Eh2/Rk7UlnepvDTZIII4FREc8PFQdMwBvxFb9UMNV6aEdx83ST48H74\nqHVfvM0TcV+BGPTVdSjc0kK6ITifSQZqMLSMHsL4zQu3z28yHO8Nfpe+jEde\nWqmKRWPMtX6AnuA1DVCMfH7XDSh9jYfFS1pF+4bb+uuD3i3fEnAeF91vZLAQ\nNE1sZxUXIPWczMTQim0qDIHktUmIDIiextJgI4j7NTbjSh8m1i9yncPWwt6Y\nw3L4TqQumGuFlM4/DOREI6T/FXfA2ROHkl20QCb/tslUKnPylNWoWdAzGrWy\n3wG3NnpVYCud1WLmb2VreG+aIlupO3kmmtUGL6Q36pHkKamY500AO27k6uQF\nP2X4I0N2ZAsmi7LSjm9gzeLZjqVlPsZVH+W9EXvIFOCR2iMbhYhJ8HUJx/3X\n2KudgrKGqtQJeTkK1qnMZbLqv8v8+fh4KeVBi801QrP416KW1xB/d9k4t6Vt\nybG8OKXtPtKCqD6Dq/hTdV6NorgRQOjblEpOQpyY80jNsbELC+Ca7AErcfYa\nG4KSj6cuzhW4nDJDnDH7YS0dLwPLq/9vCjnb0NGzC6JMn7+HpumKK+zrOTgZ\nVyZ9\r\n=1B/H\r\n-----END PGP SIGNATURE-----\r\n"},"main":"plugin.js","types":"plugin.d.ts","gitHead":"9eedf14aa55e279defd55f07d4ef58f78e80a0da","scripts":{"lint":"standard | snazzy","test":"tap test/*.test.js && npm run typescript","test:ci":"tap --coverage-report=lcov test/*.test.js && npm run typescript","lint:fix":"standard --fix | snazzy","typescript":"tsd"},"_npmUser":{"name":"simoneb","email":"simone.busoli@gmail.com"},"precommit":["lint","test"],"repository":{"url":"git+ssh://git@github.com/nearform/fastify-casbin.git","type":"git"},"_npmVersion":"6.14.10","description":"Plugin for fastify to add generic support for Casbin","directories":{},"_nodeVersion":"14.15.4","dependencies":{"fastify-plugin":"^3.0.0"},"_hasShrinkwrap":false,"devDependencies":{"tap":"^14.10.8","tsd":"^0.13.1","sinon":"^9.2.1","casbin":"^5.1.6","snazzy":"^9.0.0","fastify":"^3.7.0","standard":"^16.0.1","pre-commit":"^1.2.2","proxyquire":"^2.1.3","typescript":"^4.0.5","@types/node":"^14.14.6"},"peerDependencies":{"casbin":">=5.1.6"},"_npmOperationalInternal":{"tmp":"tmp/fastify-casbin_2.0.0_1610231859409_0.5107979345364269","host":"s3://npm-registry-packages"}},"3.0.0":{"name":"fastify-casbin","version":"3.0.0","keywords":["fastify","casbin"],"author":{"name":"Simone Busoli","email":"simone.busoli@nearform.com"},"license":"MIT","_id":"fastify-casbin@3.0.0","maintainers":[{"name":"micheleriva","email":"master@micheleriva.it"},{"name":"donal.moynihan","email":"donal.moynihan@nearform.com"},{"name":"rafaelgss","email":"rafael.nunu@hotmail.com"},{"name":"jimmymintzer","email":"jimmymintzer@gmail.com"},{"name":"shogun_panda","email":"paolo@cowtech.it"},{"name":"simoneb","email":"simone.busoli@gmail.com"},{"name":"irelandm","email":"mark.ireland@nearform.com"},{"name":"eamonn.frisby","email":"eamonn.frisby@nearform.com"}],"homepage":"https://github.com/nearform/fastify-casbin#readme","bugs":{"url":"https://github.com/nearform/fastify-casbin/issues"},"tsd":{"directory":"test"},"dist":{"shasum":"5eb487d5e2efa34e698efb4a49c6da7645a11068","tarball":"https://registry.npmjs.org/fastify-casbin/-/fastify-casbin-3.0.0.tgz","fileCount":11,"integrity":"sha512-Ua58KwoFrSfnAoTyiBvxGZUXGyMcaL5IG89zCl1xp1JFtEvTszB238O7EYCcexQarlYioLaN6mkM8aI03+JJ5A==","signatures":[{"sig":"MEUCIGAhFzCylrgjCBVZSCMuQx6LsiWaFMTkAmdjeoiRxkETAiEA0BdDW8J4hTy9Pu0zToipKZ2ULR8+uwbeV4nMs7p+/as=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":12951,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJisFSVACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr0vg/+NsejZ/nAlyUKc4QsUFG3So08Cp3v4gAYaAOxQYDKUwMrr1t1\r\n6mfoXr0n/8QEQ3l8RBGTz+x0J2I/d5V4u0glwnK5C8bUQWE+N7QyGdjAagSd\r\nkRczLcCQmykA9424PaerHf9RUrpuXWiwrH0WAjqivHYIP/oHeWVTthQ83aeb\r\ngJk1YkWDlbhDyuvXNjQb3K4/yvUgxhbWoognGjbTntJ5IWdsCykwfgKSig7S\r\nNKneD91UPIx47b0IoGFZy0NgI3o9v/amY4c4DAgWpEhFEEXvVbV2EkSw7Wmt\r\nKe3sA9dIT2YZwmREvYu3GU5b8qMZWLQHg5MDQd5LOfG7n0eoDnox0qMqS2CT\r\nUoe9QSzYAXavAUYU2vdTvhL9DPDYUwru3fVKkhQ0MAXVRG3fOBLvwvfxy25U\r\nH/mCWTqYC+PZAOS2ZAbW5943XHcJgtZJbRKCwSQSqD1LRrNQBQ9NwgKb1tdD\r\nDvCz5iNu+94N60v9mJ6HCieBJM8uenv2nR+flgtv6+aQxTTQl23fTasGwqSL\r\nTe0bxj4jJYC80s7sXNSdAUW1DCNB1SdN6qPcP3zZPnySOgv/E+2LAhG9MqtB\r\nm+EvhILcAHijEIP4rjWky6sWNDjOwwFQkRcH1HFoec8466FS+n3acE+VVmY6\r\nrAj4QYUesrQ9I6IM2AVctls6+4m+tucyJco=\r\n=I/1y\r\n-----END PGP SIGNATURE-----\r\n"},"main":"plugin.js","types":"plugin.d.ts","gitHead":"658810978d96f8496b0a0dad28b373798fa06783","scripts":{"lint":"standard | snazzy","test":"tap test/*.test.js && npm run typescript","test:ci":"tap --coverage-report=lcov test/*.test.js && npm run typescript","lint:fix":"standard --fix | snazzy","typescript":"tsd"},"_npmUser":{"name":"simoneb","email":"simone.busoli@gmail.com"},"precommit":["lint","test"],"repository":{"url":"git+ssh://git@github.com/nearform/fastify-casbin.git","type":"git"},"_npmVersion":"8.11.0","description":"Plugin for fastify to add generic support for Casbin","directories":{},"_nodeVersion":"16.15.1","dependencies":{"fastify-plugin":"^3.0.0"},"_hasShrinkwrap":false,"devDependencies":{"tap":"^16.0.0","tsd":"^0.21.0","sinon":"^14.0.0","casbin":"^5.1.6","snazzy":"^9.0.0","fastify":"^4.0.2","standard":"^17.0.0","pre-commit":"^1.2.2","proxyquire":"^2.1.3","typescript":"^4.0.5","@types/node":"^17.0.0"},"peerDependencies":{"casbin":">=5.1.6"},"_npmOperationalInternal":{"tmp":"tmp/fastify-casbin_3.0.0_1655723157567_0.26185473472366216","host":"s3://npm-registry-packages"}},"3.1.0":{"name":"fastify-casbin","version":"3.1.0","keywords":["fastify","casbin"],"author":{"name":"Simone Busoli","email":"simone.busoli@nearform.com"},"license":"MIT","_id":"fastify-casbin@3.1.0","maintainers":[{"name":"codyzu","email":"cody.zuschlag@gmail.com"},{"name":"davidefiorello","email":"davide@codeflyer.com"},{"name":"donal.moynihan","email":"donal.moynihan@nearform.com"},{"name":"shogun_panda","email":"paolo@cowtech.it"},{"name":"simoneb","email":"simone.busoli@gmail.com"},{"name":"irelandm","email":"mark.ireland@nearform.com"},{"name":"eamonn.frisby","email":"eamonn.frisby@nearform.com"}],"homepage":"https://github.com/nearform/fastify-casbin#readme","bugs":{"url":"https://github.com/nearform/fastify-casbin/issues"},"tsd":{"directory":"test"},"dist":{"shasum":"593e96e86aaac91e2be3355eaaf9130ffe871d98","tarball":"https://registry.npmjs.org/fastify-casbin/-/fastify-casbin-3.1.0.tgz","fileCount":12,"integrity":"sha512-/tJdNXDNMoSC3LYkBJdpzM1IiU0EAN+uV00Vio9NiHyAFawOrwsFH1QY9ED9METKPOdadKjyHztK7SsUsDFn9Q==","signatures":[{"sig":"MEYCIQCQWRMsTLbmCjDGn1IYHWGGNmmLCPpB/csOswuolaw1YgIhAK1AEcZDYRv3K1OTH7B6NjzSUiEj4zzHhgMVsCVXOIAG","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":12956,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkSQ8xACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr9iA/8DDey6wCtDZcjMawTXSQXqOoiHKtzuxPj3Ojg/AgLXIYTjDb+\r\nlG+ENyYfVsxRKSCtFBFK4pM2nNDWfeMk/QdUfWiW1QHVPQ4u44O56jnW6fvD\r\nVG+4oL4OQgqlDc7/lrKTNZhA69/iIIhbts2nGwVVIOHVAIqTWY2/Kgy6ezQ2\r\nNBmtCJ778ghb3VejM/EUfzvMT9knMG2Wz/ns0y90vVw16X70E3QvEWMSDW8D\r\nIwtcNZh1F75FoFVB28EP3JAZWpSBoTqF49biK4XF23T66UegcEWwgaBE7rwO\r\nUoXruHZlNaEvJ30MItrSEnotXZD+JGPT3qmaai2wKLsQMqvYyIMba5TqpZuu\r\nx3d6FSpKBH4WArHlAG/YCNHZQsc5WoR4S3qOhOAMhCav9TKJTo7knzphONHA\r\nmC6rU1d1Ho/EvbwtQw9kQONWCQZm1kQ3sUNxF1+9tByFL9LX3/WXPJSFPD2X\r\nceWgJhyAIt8YuEcesYXAUDms84RMBYcaPNkdJGW3p1PDJd9atph7Js8bxIVD\r\nw5lsDqZmfioPpfR82N16Q8GmREj+JNC0gaOPAO3EpRtl6O3SgPWHugfs3D2K\r\ntSQ8kw/5lA+dGlc8V0SKGrJ034BiGpLSzDdQ2pRekVsqi77v03/QxWfNpG5O\r\n37YtgLKuxDkMbUfFdlwJBY1DEpwRqGfG6Bk=\r\n=41/o\r\n-----END PGP SIGNATURE-----\r\n"},"main":"plugin.js","types":"plugin.d.ts","gitHead":"034841ab6f2fe49b13195b84d68965d784d7339f","scripts":{"lint":"standard | snazzy","test":"tap test/*.test.js && npm run typescript","test:ci":"tap --coverage-report=lcov test/*.test.js && npm run typescript","lint:fix":"standard --fix | snazzy","typescript":"tsd"},"_npmUser":{"name":"simoneb","email":"simone.busoli@gmail.com"},"precommit":["lint","test"],"repository":{"url":"git+ssh://git@github.com/nearform/fastify-casbin.git","type":"git"},"_npmVersion":"9.5.1","description":"Plugin for fastify to add generic support for Casbin","directories":{},"_nodeVersion":"18.16.0","dependencies":{"fastify-plugin":"^4.0.0"},"_hasShrinkwrap":false,"devDependencies":{"tap":"^16.0.0","tsd":"^0.28.0","sinon":"^15.0.0","casbin":"^5.1.6","snazzy":"^9.0.0","fastify":"^4.0.2","standard":"^17.0.0","pre-commit":"^1.2.2","proxyquire":"^2.1.3","typescript":"^5.0.2","@types/node":"^18.0.1"},"peerDependencies":{"casbin":">=5.1.6"},"_npmOperationalInternal":{"tmp":"tmp/fastify-casbin_3.1.0_1682509616959_0.3097338967245391","host":"s3://npm-registry-packages"}},"3.1.1":{"name":"fastify-casbin","version":"3.1.1","keywords":["fastify","casbin"],"author":{"name":"Simone Busoli","email":"simone.busoli@nearform.com"},"license":"MIT","_id":"fastify-casbin@3.1.1","maintainers":[{"name":"codyzu","email":"cody.zuschlag@gmail.com"},{"name":"davidefiorello","email":"davide@codeflyer.com"},{"name":"donal.moynihan","email":"donal.moynihan@nearform.com"},{"name":"shogun_panda","email":"paolo@cowtech.it"},{"name":"simoneb","email":"simone.busoli@gmail.com"},{"name":"irelandm","email":"mark.ireland@nearform.com"},{"name":"eamonn.frisby","email":"eamonn.frisby@nearform.com"}],"homepage":"https://github.com/nearform/fastify-casbin#readme","bugs":{"url":"https://github.com/nearform/fastify-casbin/issues"},"tsd":{"directory":"test"},"dist":{"shasum":"dc104d58da43713ba2c0125f9292ed7dba64b569","tarball":"https://registry.npmjs.org/fastify-casbin/-/fastify-casbin-3.1.1.tgz","fileCount":12,"integrity":"sha512-SDoI47Il0mzOO840AAGSz0Zn/NbiykNOD3cyEkgx7EGu3ok6zwiisd1H32pazOKeM75T2YE5fTpgGrM2hSLvog==","signatures":[{"sig":"MEUCIG45dw1rfvDYy4vBNLd7xmnhsRP7Ol579ilwcRDpEUDZAiEAwEt5SgJKUaCivu5qk6ZxF6RYCDjuaRiHE0DyMIGFdYw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/fastify-casbin@3.1.1","provenance":{"predicateType":"https://slsa.dev/provenance/v0.2"}},"unpackedSize":12956},"main":"plugin.js","types":"plugin.d.ts","gitHead":"9915dd6840c370b1c88709212a01b13a7adae8d9","scripts":{"lint":"standard | snazzy","test":"tap test/*.test.js && npm run typescript","test:ci":"tap --coverage-report=lcov test/*.test.js && npm run typescript","lint:fix":"standard --fix | snazzy","typescript":"tsd"},"_npmUser":{"name":"simoneb","email":"simone.busoli@gmail.com"},"precommit":["lint","test"],"repository":{"url":"git+ssh://git@github.com/nearform/fastify-casbin.git","type":"git"},"_npmVersion":"9.5.1","description":"Plugin for fastify to add generic support for Casbin","directories":{},"_nodeVersion":"18.16.0","dependencies":{"fastify-plugin":"^4.0.0"},"_hasShrinkwrap":false,"devDependencies":{"tap":"^16.0.0","tsd":"^0.28.0","sinon":"^15.0.0","casbin":"^5.1.6","snazzy":"^9.0.0","fastify":"^4.0.2","standard":"^17.0.0","pre-commit":"^1.2.2","proxyquire":"^2.1.3","typescript":"^5.0.2","@types/node":"^20.0.0"},"peerDependencies":{"casbin":">=5.1.6"},"_npmOperationalInternal":{"tmp":"tmp/fastify-casbin_3.1.1_1683808917019_0.20106413200560502","host":"s3://npm-registry-packages"}},"4.0.0":{"name":"fastify-casbin","version":"4.0.0","keywords":["fastify","casbin"],"author":{"name":"Simone Busoli","email":"simone.busoli@nearform.com"},"license":"MIT","_id":"fastify-casbin@4.0.0","maintainers":[{"name":"simoneb","email":"simone.busoli@gmail.com"},{"name":"lucalanziani","email":"luca@lanziani.com"},{"name":"eamonn.frisby","email":"eamonn.frisby@nearform.com"},{"name":"donal.moynihan","email":"donal.moynihan@nearform.com"}],"homepage":"https://github.com/nearform/fastify-casbin#readme","bugs":{"url":"https://github.com/nearform/fastify-casbin/issues"},"tsd":{"directory":"test"},"dist":{"shasum":"5804625284458d6933750c8c08ac71948105cad7","tarball":"https://registry.npmjs.org/fastify-casbin/-/fastify-casbin-4.0.0.tgz","fileCount":12,"integrity":"sha512-VlwEnCFKrXpCLLhWAHX012pnbOhUp4gJ4poTbK51aNiG7K1R2UTCK0QPjrOWLG/3Qliu1mkTLCDbgz6umqWNGA==","signatures":[{"sig":"MEYCIQCxkjxx/JrHJ9oFQFffBlIjnsNL9GqRYZLF9trX7ZRTVAIhAKOz5Xy19Sy+orgzVfekzVDBjftKyiNMnRWeoPnM0syP","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/fastify-casbin@4.0.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":13121},"main":"plugin.js","types":"plugin.d.ts","gitHead":"e6e92d3c5fc99df62f53284e4e8ef0da90b470af","scripts":{"lint":"standard | snazzy","test":"node --test && npm run typescript","lint:fix":"standard --fix | snazzy","typescript":"tsd"},"_npmUser":{"name":"simoneb","email":"simone.busoli@gmail.com"},"precommit":["lint","test"],"repository":{"url":"git+ssh://git@github.com/nearform/fastify-casbin.git","type":"git"},"_npmVersion":"10.8.2","description":"Plugin for fastify to add generic support for Casbin","directories":{},"_nodeVersion":"18.20.5","dependencies":{"fastify-plugin":"^5.0.1"},"_hasShrinkwrap":false,"devDependencies":{"tsd":"^0.31.2","sinon":"^19.0.2","casbin":"^5.36.0","snazzy":"^9.0.0","fastify":"^5.1.0","standard":"^17.1.2","pre-commit":"^1.2.2","proxyquire":"^2.1.3","typescript":"^5.7.2","@types/node":"^22.10.1"},"peerDependencies":{"casbin":">=5.1.6"},"_npmOperationalInternal":{"tmp":"tmp/fastify-casbin_4.0.0_1733855724177_0.3759933079585278","host":"s3://npm-registry-packages-npm-production"}}},"time":{"created":"2020-11-05T11:51:35.331Z","modified":"2026-06-25T17:01:35.150Z","1.0.0":"2020-11-05T11:51:35.506Z","2.0.0":"2021-01-09T22:37:39.549Z","3.0.0":"2022-06-20T11:05:57.717Z","3.1.0":"2023-04-26T11:46:57.122Z","3.1.1":"2023-05-11T12:41:57.233Z","4.0.0":"2024-12-10T18:35:24.368Z"},"bugs":{"url":"https://github.com/nearform/fastify-casbin/issues"},"author":{"name":"Simone Busoli","email":"simone.busoli@nearform.com"},"license":"MIT","homepage":"https://github.com/nearform/fastify-casbin#readme","keywords":["fastify","casbin"],"repository":{"url":"git+ssh://git@github.com/nearform/fastify-casbin.git","type":"git"},"description":"Plugin for fastify to add generic support for Casbin","maintainers":[{"email":"simone.busoli@gmail.com","name":"simoneb"},{"email":"eamonn.frisby@nearform.com","name":"eamonn.frisby"},{"email":"donal.moynihan@nearform.com","name":"donal.moynihan"},{"email":"contato@gbdev.me","name":"gbdev13"},{"email":"steve.goode@nearform.com","name":"sociablesteve"},{"email":"ryan@loose-bits.com","name":"ryan.roemer"},{"email":"elizibin@gmail.com","name":"elizibin"}],"readme":"# fastify-casbin\n\n![Continuous Integration](https://github.com/nearform/fastify-casbin/workflows/ci/badge.svg)\n[![codecov](https://codecov.io/gh/nearform/fastify-casbin/branch/master/graph/badge.svg?token=gfJ55XYZAV)](https://codecov.io/gh/nearform/fastify-casbin)\n[![npm version](https://badge.fury.io/js/fastify-casbin.svg)](https://badge.fury.io/js/fastify-casbin)\n\nA plugin for [Fastify](http://fastify.io/) that adds support for [Casbin](https://casbin.org/).\n\nIt provides an unopinionated approach to use [Casbin's Node.js APIs](https://github.com/casbin/node-casbin) within a Fastify application.\n\n## Install\n\n```\nnpm i casbin fastify-casbin\n```\n\n> `casbin` is a peer dependency and must be installed explicitly\n\n## API\n\nOnce registered, the plugin will decorate the Fastify instance with a `casbin` namespace which will be an instance of the `Enforcer` type.\n\nIt will expose the full Casbin API, primarily the [`enforce`](https://github.com/casbin/node-casbin#get-started) method, to check if a rule is satistifed.\n\n## Examples\n\n### Basic\n\nUsing basic [model](https://github.com/casbin/casbin/blob/master/examples/basic_model.conf) and [policy](https://github.com/casbin/casbin/blob/master/examples/basic_policy.csv) files.\n\n```js\nconst fastify = require('fastify')()\n\nfastify.register(require('fastify-casbin'), {\n  model: 'basic_model.conf', // the model configuration\n  adapter: 'basic_policy.csv' // the adapter\n})\n\nfastify.get('/protected', async () => {\n  if (!(await fastify.casbin.enforce('alice', 'data1', 'read'))) {\n    throw new Error('Forbidden')\n  }\n\n  return `You're in!`\n})\n```\n\n### Postgres adapter and watcher\n\nUsing [casbin-pg-adapter](https://github.com/touchifyapp/casbin-pg-adapter) and [casbin-pg-watcher](https://github.com/mcollina/casbin-pg-watcher)\n\n```js\nconst fastify = require('fastify')()\nconst { newAdapter } = require('casbin-pg-adapter').default\nconst { newWatcher } = require('casbin-pg-watcher')\n\nconst pgOptions = {\n  connectionString: 'postgres://localhost',\n  migrate: true\n}\n\nasync () => {\n  fastify.register(require('fastify-casbin'), {\n    model: 'basic_model.conf', // the model configuration\n    adapter: await newAdapter(pgOptions), // the adapter\n    watcher: await newWatcher(pgOptions) // the watcher\n  })\n\n  // add some policies at application startup\n  fastify.addHook('onReady', async function () {\n    await fastify.casbin.addPolicy('alice', 'data1', 'read')\n  })\n\n  fastify.get('/protected', async () => {\n    if (!(await fastify.casbin.enforce('alice', 'data1', 'read'))) {\n      throw new Error('Forbidden')\n    }\n\n    return `You're in!`\n  })\n}\n```\n\n### Using programmatically assembled model\n\n```typescript\nimport fastify from 'fastify'\nimport { join } from 'path'\nimport { Model, FileAdapter } from 'casbin'\nimport fastifyCasbin from 'fastify-casbin'\n\nconst modelPath = join(__dirname, 'auth', 'basic_model.conf')\nconst policyPath = join(__dirname, 'auth', 'basic_policy.csv')\n\nconst app = fastify()\n\nconst preloadedModel = new Model()\npreloadedModel.loadModel(modelPath)\nconst preloadedAdapter = new FileAdapter(policyPath)\n\napp.register(fastifyCasbin, {\n  model: preloadedModel,\n  adapter: preloadedAdapter\n})\n\napp.get('/protected', async () => {\n  if (!(await app.casbin.enforce('alice', 'data1', 'read'))) {\n    throw new Error('Forbidden')\n  }\n\n  return `You're in!`\n})\n```\n\n## License\n\nLicensed under [MIT License](./LICENSE)\n","readmeFilename":"README.md"}