{"_id":"@butlerlogic/iam","_rev":"9-8c47af56e31a75129bf74fa953758b20","name":"@butlerlogic/iam","dist-tags":{"latest":"1.0.0-beta9"},"versions":{"1.0.0-beta1":{"name":"@butlerlogic/iam","version":"1.0.0-beta1","description":"A simple identifaction and authorization management utility.","main":"src/main.js","directories":{"lib":"lib","test":"test"},"scripts":{"test":"rollup -c && tap -R spec ./test/**/*.js && standard --verbose | snazzy"},"keywords":["iam","acl","authentication","authorization","auth","management"],"author":{"name":"Corey Butler"},"license":"MIT","devDependencies":{"fs-extra":"^8.1.0","rollup":"^1.17.0","rollup-plugin-buble":"^0.19.2","rollup-plugin-replace":"^2.0.0","rollup-plugin-strip-code":"^0.2.6","rollup-plugin-terser":"^5.1.1","rollup-plugin-uglify":"^4.0.0","rollupify":"^0.5.1","snazzy":"^7.1.1","source-map-support":"^0.5.10","standard":"^12.0.1","tap":"^14.2.0","tap-diff":"^0.1.1","tape":"^4.9.1"},"gitHead":"858dd7ee08d6f89cb44367fcd8c1b9918613bbc4","_id":"@butlerlogic/iam@1.0.0-beta1","_nodeVersion":"12.3.1","_npmVersion":"6.9.0","dist":{"integrity":"sha512-Fld/LlbE7PHNOqpg6ntcLRlODzkEnEz57cmNF+5ZHsH4hs3bDHu2IzY3IdocvpuAV6QNLJyR3P90gI6oGaUmrw==","shasum":"109a5426075c584155e073fa491df87900a0a43e","tarball":"https://registry.npmjs.org/@butlerlogic/iam/-/iam-1.0.0-beta1.tgz","fileCount":6,"unpackedSize":22725,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdN4sXCRA9TVsSAnZWagAA+fUP/RCRoimlHgWI5nlUA636\ngTPqmSU9D+ucTgt0aETr5sCOp00LKXypWBI51+Qxp7gVgauxLI7BWlRJ7PxZ\nzU0KMH5cuJ5155TsUHrmMvl4P8/Rd174fKVG2GmUeJN1Tk+01t433NmqadCf\n9ZOM9SLE5TFWD9fp5pDtfp6ZIfBwuhgQS/k6Y1STU+SqQDBQZzO4dH3J8DA3\n1vMFkjC8F6sCXkilsGP/GJDIWeLm1+chgDtceD3s/FeadNEaK2zk3QQTGePs\nJJg5Bf/Fq8mIn7mCTPbNroeGCOw54mUCEq+nIlxSIs7dqPZcetj6tR3neDRp\nWtLVp3xuh9QWa3KeIGFymmtxUx7yTdeIz+BB00cPbvC3EWcdw3X+DrK3Xy+M\n7m1A9WmZIat9dE4LMzzKeyUxu01vbroLAHSYBo4KnXarXLyTekyDPl1luanK\nTSj04E2xdm90kPIW8dIeSDY3uXk7dgk5lJTg03s7kjqLkR1WGXcGGBDkejpg\nreqOmZwrMScO63tiy67Kksk6UhzVOz6YQprMAC3993/aGsSujzhV1XHNRYKA\n4Dawzztn2BnOIEpJZIMGIC0oJGN5d3o3rLE3fxXWSIfTgdEbLEiN5rYUoTKW\n/Q9GNUyTVaNCyUd0c74XFgRarmQXpE3Rr5+qB3qu1R2KlB1BBp2ASZFmi6DS\nqad7\r\n=FyJI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAxbwNt/AojdchLl0xJ1zjGwDpqytuoESIGmrJMbzTG9AiBoy4+wjdl5gMKkl3sFsEk4kajyJJ1/Xmd22pGpPh8lDg=="}]},"maintainers":[{"name":"cbutler","email":"corey@coreybutler.com"}],"_npmUser":{"name":"cbutler","email":"corey@coreybutler.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/iam_1.0.0-beta1_1563921174268_0.9082239995530685"},"_hasShrinkwrap":false},"1.0.0-beta2":{"name":"@butlerlogic/iam","version":"1.0.0-beta2","description":"A simple identifaction and authorization management utility.","main":"src/main.js","directories":{"lib":"lib","test":"test"},"scripts":{"test":"rollup -c && tap -R spec ./test/**/*.js && standard --verbose | snazzy"},"keywords":["iam","acl","authentication","authorization","auth","management"],"author":{"name":"Corey Butler"},"license":"MIT","devDependencies":{"fs-extra":"^8.1.0","rollup":"^1.17.0","rollup-plugin-buble":"^0.19.2","rollup-plugin-replace":"^2.0.0","rollup-plugin-strip-code":"^0.2.6","rollup-plugin-terser":"^5.1.1","rollup-plugin-uglify":"^4.0.0","rollupify":"^0.5.1","snazzy":"^7.1.1","source-map-support":"^0.5.10","standard":"^12.0.1","tap":"^14.2.0","tap-diff":"^0.1.1","tape":"^4.9.1"},"gitHead":"9fe1bf01ef8742ee21315ee645794b4189da2931","_id":"@butlerlogic/iam@1.0.0-beta2","_nodeVersion":"12.3.1","_npmVersion":"6.9.0","dist":{"integrity":"sha512-ESrVo9l1+J1scwFmv4NuYfmN8UTc8gP39W9ye7k8XtejCKL3zNEB+htKMFGQ2uuVEO2hMhDgD9Dh2kGFw2Wn6g==","shasum":"e1db772b56896135c37ea28b4cd970797ca843c4","tarball":"https://registry.npmjs.org/@butlerlogic/iam/-/iam-1.0.0-beta2.tgz","fileCount":6,"unpackedSize":32485,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdOPhmCRA9TVsSAnZWagAA39oP/jTfl9ZVtTKQNeC8USmn\nvOR3UAuNI7yJ8lVZhm347uDiUsOT2GKEZnwAR9wdn5Zi3ehTfO76bzLEIcSc\ntCu3rOv2mra0CKFIArzH7HUmJo3fVl74tGT3iMY7YB8Z55VKCvI7QlbgzLVz\nNTfRKdEo6UD3hXv5yU2MCETywpVhdwemnyPoe/zLg5/p9VQ8M0Ox5L4D3WmI\nrRGOKEa3TVaL9sz3hK+A+IrRblq1r2u2fDbcjJiwlxKM+j8wHHMtFuXqgKG5\nVTeExLkMMEZEmN0e+QLJD10Etb/XBKJ8ACHwhCSKG0UaI8mq4H4uXxbId/r/\nOfrPiO7YOiOmhKiYcRZGEmB2sNqeLVWqbqDFNroyXxNTQu4j1TPhhkdYKGKM\nAs1FtihOLvuAEPoXo5N639SyORK36w5Iidgs51RxZhBqKDN1W4BmP36bDsVJ\noVoqRqLaIKRuJnxwEJHPEiMpvwFPJsghpUubnJhlQh2T5y7ENEGU0b29Kl4c\nOQy+BR1coPS5uqEtxl3usDKFHxE1ZqE+jdsdu7hzG8A/NHLBFv2dEZRxhyUk\ne/ej+iPv8GIc5/hhnUcWEM78ZkeZQ9b8UqVUd1TE8G8skMaaMLFANa7Ve20s\nQ/h8FauJ+m0o+hR6jOkY7v3Zrps8UnjFQ+Vpm/OPe2UjQGAoeH7xL1AOZx11\n3h09\r\n=V0V4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDy7wYCvR7Xs40tQJeDf++2rundHaSkWamvBNVT6f8LPAIhAP5jp0yBh3/cMRb5CFqtAYWM37Fpx00lRdvRZqTHQMHO"}]},"maintainers":[{"name":"cbutler","email":"corey@coreybutler.com"}],"_npmUser":{"name":"cbutler","email":"corey@coreybutler.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/iam_1.0.0-beta2_1564014692889_0.5849121574868683"},"_hasShrinkwrap":false},"1.0.0-beta3":{"name":"@butlerlogic/iam","version":"1.0.0-beta3","description":"A simple identifaction and authorization management utility.","main":"src/main.js","directories":{"lib":"lib","test":"test"},"scripts":{"test":"rollup -c && tap -R spec ./test/**/*.js && standard --verbose | snazzy"},"keywords":["iam","acl","authentication","authorization","auth","management"],"author":{"name":"Corey Butler"},"license":"MIT","devDependencies":{"fs-extra":"^8.1.0","rollup":"^1.17.0","rollup-plugin-buble":"^0.19.2","rollup-plugin-replace":"^2.0.0","rollup-plugin-strip-code":"^0.2.6","rollup-plugin-terser":"^5.1.1","rollup-plugin-uglify":"^4.0.0","rollupify":"^0.5.1","snazzy":"^7.1.1","source-map-support":"^0.5.10","standard":"^12.0.1","tap":"^14.2.0","tap-diff":"^0.1.1","tape":"^4.9.1"},"gitHead":"52b174755ceb199eeab5b6882a2480966d64e9d6","_id":"@butlerlogic/iam@1.0.0-beta3","_nodeVersion":"12.3.1","_npmVersion":"6.9.0","dist":{"integrity":"sha512-2VLssQlq/nRqq7Nm3/17Sjgx8/qVVVMdjZMghWNWKk7G4K52g1fTwbg31eTEYPG7ge5l5PPhmIX2ziQH5UIXHQ==","shasum":"f6fde24343a3f62f24c6852051e7e0be35072951","tarball":"https://registry.npmjs.org/@butlerlogic/iam/-/iam-1.0.0-beta3.tgz","fileCount":6,"unpackedSize":32483,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdOP+sCRA9TVsSAnZWagAAwRgQAIaEExLNeGDeA7FTP+I2\nqObAtyzaNp5linMWow73997KXaRpnJtHFT7TGrktKLk7QaDTYDdwHi5m1tZ3\nd61fYoH7kSzAwEYHoyprTB4fgd3xjwngoFxWlyMQWMN5k3tHMyiDQBdEbP7Q\nvrwkmbzAaeHHnIEiyhNPYS+/taAFKQ4sLzBE793R+28FxVfdT/+IzWJqnG68\nyL2ONpduX1AgQJZQFPqvyru4Ep525VB7O7Pl1g5xNrm4UaT1eDQCe+XWemgA\n4ohVx8ypEj+0YWuMzJa5DdgnCtLSOBY9Z7JSLCUn1TtAiEMeo7rDuVgm8pUB\nao+01daQ2UsfBNqbXpNHv/4BzbYH7opawXnReWH1NrLvXyxKr4g3ElUnsWGE\nTRU7QrJK1jZfIBtHOH1hmaZ489FrzbQp5k7wWeAUp5E3fYL7Srfg9ZzneYtK\nKbTp13VWZP35gNxD+Zc+Euu+YdD+jMxZMBK5JOuzv8QMmR6XO6IYGnBQLnNe\nU3y2FiYoalDA/68ofA2Db+wjAAdE+GlZZhxtARWh5hSL7N1iVRRRrgd2WlgM\nlTvuJRLKzUo/hbXN9L1ZFhEOD7ZpaV/aVaq1gdREHUDjuYVOR3jhVhdzFraU\nDs0QiTZ75qYiNZWckwSsejwhakVufTWklfm2QC+BEtxqw/a19Xx8c5Ijpf/E\nejcd\r\n=NR0c\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFnBP6/Puh1O6p0qRAvQMJKvlZlTzseYfF8GRA6oJZ8RAiEAy0hdb2FjEX8efYuwbvp0ip1NKvu2dIkYaSAgZXDszlM="}]},"maintainers":[{"name":"cbutler","email":"corey@coreybutler.com"}],"_npmUser":{"name":"cbutler","email":"corey@coreybutler.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/iam_1.0.0-beta3_1564016556074_0.6282586035187963"},"_hasShrinkwrap":false},"1.0.0-beta4":{"name":"@butlerlogic/iam","version":"1.0.0-beta4","description":"A simple identifaction and authorization management utility.","main":"src/main.js","directories":{"lib":"lib","test":"test"},"scripts":{"test":"rollup -c && tap -R spec ./test/**/*.js && standard --verbose | snazzy"},"keywords":["iam","acl","authentication","authorization","auth","management"],"author":{"name":"Corey Butler"},"license":"MIT","devDependencies":{"fs-extra":"^8.1.0","rollup":"^1.17.0","rollup-plugin-buble":"^0.19.2","rollup-plugin-replace":"^2.0.0","rollup-plugin-strip-code":"^0.2.6","rollup-plugin-terser":"^5.1.1","rollup-plugin-uglify":"^4.0.0","rollupify":"^0.5.1","snazzy":"^7.1.1","source-map-support":"^0.5.10","standard":"^12.0.1","tap":"^14.2.0","tap-diff":"^0.1.1","tape":"^4.9.1"},"gitHead":"f4846aeff249af9c8b3b1fdcfd25b649a1519002","_id":"@butlerlogic/iam@1.0.0-beta4","_nodeVersion":"12.3.1","_npmVersion":"6.9.0","dist":{"integrity":"sha512-wnia8PUEjQfPEgoCEjBpZqvmpusI1tz1Vr5uuGI2MluNoc0N5kHnchUzseTqdBnWz0svMwbKGBZxajk5C7tbWw==","shasum":"375c347f7c5048fbee1b2a8d18f72393a982b0a9","tarball":"https://registry.npmjs.org/@butlerlogic/iam/-/iam-1.0.0-beta4.tgz","fileCount":10,"unpackedSize":51026,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdPRKbCRA9TVsSAnZWagAAZdEP/j+4PVa6HOjtDCKLYCSO\n6oWoWoikUbReHuooxvmXNF1x1cJUUkGqvVmhVVNH4jFX1HpCm3sKWZE2TwKU\nbchVlmDLkITG1ZXfMsdtLreDTsNOWq4tds9MNTcyh+uUfxD4kCpu6defEJZY\nSb2zFxBndsYgKpGH2S5gRF8tW16BCRkA8m+ZCKaCGgIEMHxRa87esfwZ3EiC\nxS+zFvgvV2p244zPgb6Dn/B2lRuWtWI7KmM0ao29cyERPkxInAq6lcc0kGe1\nCJL/UBc0EDx83eGFIkwCRbpu4GBUXIQayqpB90W/C4OAc+ZDqyUUZxNYqKXV\nAi65kHWa9qMTzQBP4fvjHcY1+ywkJjm86qx+BxD0bX6lTCFawY8cNdStd9ir\nvpPwEkJQNHRHZUjl1tQe350+3WwkHeweG84Smj14qpnPbxEJTNAfFfqBfxtV\n18MKQvjAAf0ioGFJBnMesi4fl1IbuwlTwmY6nPmlUcllEfMqi3OtsREkr0N7\nbJpbUA6CT9YVo3cZgNj8VA7AKJus9LZ/C9rAHF5QFMBQjkpHjDyJBHpbAcNw\nJxBKsi0OJzlCu9GjZemsOpoHDTU+RPmawd/WtVbWog6mLYBGvaagVvx58a5k\nbDlXtn8olwFWkRRAfxVWjUt3GimA3p8mI48mZbEzr5td/G6unaLqM3ENaAmB\nuGys\r\n=bAfG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCyRIXHZYZMYhjOFfw8+Ovi05koZghJMouYV92THGbnwAIhAPSjuQGBb20ozSsuCSPV9JgFvpMWBYWFnOERRgc4cQmY"}]},"maintainers":[{"name":"cbutler","email":"corey@coreybutler.com"}],"_npmUser":{"name":"cbutler","email":"corey@coreybutler.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/iam_1.0.0-beta4_1564283546624_0.4987797565954506"},"_hasShrinkwrap":false},"1.0.0-beta5":{"name":"@butlerlogic/iam","version":"1.0.0-beta5","description":"A simple identifaction and authorization management utility.","main":"src/main.js","directories":{"lib":"lib","test":"test"},"scripts":{"test":"tap -R spec ./test/**/*.js","test:syntax":"standard --verbose | snazzy"},"keywords":["iam","acl","authentication","authorization","auth","management"],"author":{"name":"Corey Butler"},"license":"MIT","devDependencies":{"fs-extra":"^8.1.0","rollup":"^1.17.0","rollup-plugin-buble":"^0.19.2","rollup-plugin-replace":"^2.0.0","rollup-plugin-strip-code":"^0.2.6","rollup-plugin-terser":"^5.1.1","rollup-plugin-uglify":"^4.0.0","rollupify":"^0.5.1","snazzy":"^7.1.1","source-map-support":"^0.5.10","standard":"^12.0.1","tap":"^14.2.0","tap-diff":"^0.1.1","tape":"^4.9.1"},"gitHead":"6386f10dd3440be9cc3ca7c218e17725de4370a5","_id":"@butlerlogic/iam@1.0.0-beta5","_nodeVersion":"12.7.0","_npmVersion":"6.10.0","dist":{"integrity":"sha512-NVX3h93bxMFTyZsJxy9x4joiG18uCQiLgazwcnfaUk7ExpJtfeT0oYLOiopmD1tV5W+A1N7RYb1+CUbCJ+gz5A==","shasum":"da743b7fc7e39234f14e0e749398a6278ba2b357","tarball":"https://registry.npmjs.org/@butlerlogic/iam/-/iam-1.0.0-beta5.tgz","fileCount":10,"unpackedSize":59646,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdTljUCRA9TVsSAnZWagAAVRQP/R/xgZbbW2zaOLjm2zaq\nw/FDS20S5SsRMSpZOSax0StLcRR/ViC72UE7a28NFExqVh1OR8t62oDu4rvx\n7VEwZK8RsuiSlzQvQrePpRHkIP4V7dBPe0yVOp00ZbDwr7hwZATlVQb6VPe9\nPtHZAdxPiwG8MB3u3HLGAMMPQfqKpPYPq4hTzLsI0Y4MphHL0ne0B4wgjfQ4\nNdGBVuVvTJyzWmbD755yIJ5RygrOUJQqRxEAIRKJTHJr2JY6a4VdNiAk/jI7\n9lawKWxplbIQMJzuEbEma4cVr7n/r4HwnsSOmYd8VXQx8wwPb2DhVauq9tmt\n9QzUnXHvkg031y/q0xnVicCKRk+0luXz+FnIXbf5+s9wMDPi85XtHITx5cOT\nfNwCECg3Q5YvQwSOlKS1paDzPAQCdBaRJXOObwd1hoHnWLylAirvm54shgHp\njhnqjv4A4K64U5ymMaBrtZCbWrk37HscTXIldVIl6Yx7nHW0YYPW64hvMjsO\nFvlDrwEzlwvuxnm86pGRqcAICyMfvvON52TOAjw6W2mJUwvrS8RDIviQN26p\nllKDHExdhg/Zv5pqr1uWBtNkdapxi3MFjHMQnODsrZQQk42RMAf93+lv+mvi\nSTeLQOPJ38qLi4cvQ79QQXwYPs4co+R6eqUS+r16s9oaKEyWpXfiPeEhvoee\nnL9h\r\n=OqCF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHtpo4BEcTTmrGof3rAm1c0h2fMKVsY8Sn8yq9gTWb6SAiEA51W6PXlykMGuvw80o+85G8J2TLBSHx7SazBsUN/rCK4="}]},"maintainers":[{"name":"cbutler","email":"corey@coreybutler.com"}],"_npmUser":{"name":"cbutler","email":"corey@coreybutler.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/iam_1.0.0-beta5_1565415635968_0.19684408592074631"},"_hasShrinkwrap":false},"1.0.0-beta6":{"name":"@butlerlogic/iam","version":"1.0.0-beta6","description":"A simple identifaction and authorization management utility.","main":"src/main.js","directories":{"lib":"lib","test":"test"},"scripts":{"test":"tap -R spec ./test/**/*.js","test:syntax":"standard --verbose | snazzy"},"keywords":["iam","acl","authentication","authorization","auth","management"],"author":{"name":"Corey Butler"},"license":"MIT","devDependencies":{"fs-extra":"^8.1.0","rollup":"^1.17.0","rollup-plugin-buble":"^0.19.2","rollup-plugin-replace":"^2.0.0","rollup-plugin-strip-code":"^0.2.6","rollup-plugin-terser":"^5.1.1","rollup-plugin-uglify":"^4.0.0","rollupify":"^0.5.1","snazzy":"^7.1.1","source-map-support":"^0.5.10","standard":"^12.0.1","tap":"^14.2.0","tap-diff":"^0.1.1","tape":"^4.9.1"},"gitHead":"d5efbe9d0615349e0b6a240ded95b4028e90e4de","_id":"@butlerlogic/iam@1.0.0-beta6","_nodeVersion":"12.7.0","_npmVersion":"6.10.0","dist":{"integrity":"sha512-1JSDjElEvtTWDK2PquitADQg3hF08scyA9KVys17f8u3ktL5GXzB/SsMjbmkX7Gp106uJ98c6HDVz8UIWh6srg==","shasum":"b497e678c0557f586d1c2d0c3b4ed79b648f9d01","tarball":"https://registry.npmjs.org/@butlerlogic/iam/-/iam-1.0.0-beta6.tgz","fileCount":10,"unpackedSize":59713,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdTuuLCRA9TVsSAnZWagAAS6cP/iMe4JzGGbJfHNYF7KQF\nTotKVlcj8M6GE+h+nF0mn9uBo9F4fWVsdxOh/PtcuQuWJp2Y2e20XZD9BNuX\nKwlbRoeQZeBcGIibYXnx79xXSiE93OtHBMV9QpuHHFeY3H+v6cWNAtc8BlGU\nw1fShGHkS6i9OtR5i8pUGHy+H5nislClukQlpnl4UdCHD/NzZk2z6gl4M6oF\nJ47058IX+fOl2f8BZ+rTZFEDCFnPPiUFxWuIKnKsuEOX7vt0doZbUq0qz/IA\n2Qjer3amMtUID67kDg+TFxGcgKb5OgiFS3XPYBvXwfwruAw34xgDG8KivEha\nrXpYG7+yRXWQtUYdJ+JTPz7s5ouKiDlzikzgh9jUoM9HxliuRLQn3h3h5hsF\n7KQBkZtofThk/skpo07S5f3DpG9gN15yg6Fm1nVBrVCnDTE+oKesVVgJk8E3\n5W5ZvTUrVHy6iGR08XTByeqzBxldByNv3LJhystofsH7lgGVJfzplhDV8RTS\n/dSW8PYudKCbYHPtWZeK0tBYwAyBgVZyJtb4rUazcPmS5huk5NVuSQ7lFI9f\niNbwMRhS8PapWL3e5VZhCh7t2C7b6TAfedPenOg9GmojYsgLKfMaWLf4pgs9\nLmQtim+wM/rzgcXkF02myKHErnHEvksTKtmIHVTrcHjFQDLnkSaFPZLbWxjF\n69Ga\r\n=a+Z/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCID9rOvOO8MUg3qAlrN0W0cxOPirBOXpRWImt2Y1Jp8KeAiEA/azkK5F/3FuykdjjHn7mRinbBwr6yYBnMv94RUtJNo8="}]},"maintainers":[{"name":"cbutler","email":"corey@coreybutler.com"}],"_npmUser":{"name":"cbutler","email":"corey@coreybutler.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/iam_1.0.0-beta6_1565453194669_0.8326196805374322"},"_hasShrinkwrap":false},"1.0.0-beta7":{"name":"@butlerlogic/iam","version":"1.0.0-beta7","description":"A simple identifaction and authorization management utility.","main":"src/main.js","directories":{"lib":"lib","test":"test"},"scripts":{"test":"tap -R spec ./test/**/*.js","test:syntax":"standard --verbose | snazzy"},"keywords":["iam","acl","authentication","authorization","auth","management"],"author":{"name":"Corey Butler"},"license":"MIT","devDependencies":{"fs-extra":"^8.1.0","rollup":"^1.17.0","rollup-plugin-buble":"^0.19.2","rollup-plugin-replace":"^2.0.0","rollup-plugin-strip-code":"^0.2.6","rollup-plugin-terser":"^5.1.1","rollup-plugin-uglify":"^4.0.0","rollupify":"^0.5.1","snazzy":"^7.1.1","source-map-support":"^0.5.10","standard":"^12.0.1","tap":"^14.2.0","tap-diff":"^0.1.1","tape":"^4.9.1"},"gitHead":"d5efbe9d0615349e0b6a240ded95b4028e90e4de","_id":"@butlerlogic/iam@1.0.0-beta7","_nodeVersion":"12.7.0","_npmVersion":"6.10.0","dist":{"integrity":"sha512-WB1imjqIUy4qenUdsbj0N7tfeL86Urs7iYLiNIocYaK258fOzfoPqnvUVQsc4VWmImgLC/eTBehsTF82lFzVuA==","shasum":"4f2a8c41f306c4dd060828c645483dc57a17ffca","tarball":"https://registry.npmjs.org/@butlerlogic/iam/-/iam-1.0.0-beta7.tgz","fileCount":10,"unpackedSize":60586,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdTw9zCRA9TVsSAnZWagAA5U0QAJ9qr+O4sXrF8O6874XJ\nW2bSsbhkwAU7QTMBadxWjXCgwcOFeu0o0tcEsLpWrWm/YeCD/DUZux/9ThLD\nWr38jVT4XOANCs3jpSG4gzAVmlGxTCkw58IERl1iu9+a3xbhgI8OZNucgriU\nvX643v9Wh67/tksn3cn1HoUYwV1mI6oR8q/ta/onv87Ot6B3HJozhR15NdC3\nwh8D9sZUG1WideC7f9i5uOVucnem0zz7VrC8z9/i+lMrbEGKr7YF8TX5T6wF\n8LlLBwhnKwElAKtfi7LJSVW3az8MErsLa0xRLBxFSqzx0EPlqx1h0oBmdvPN\nInAEmnpCwZKdTdIy8CgG0eYAY5QdYmT74FLfAcHEyfUkDB9kf9yDGYa9PVjl\nTC3WwjpzRKX8nUsz78pkRMDnE9lpf5EzpUWTolp+HAoH7kjHlZ/71Ix+iRvL\n1qbJyigQPVDXfs/fxAf4OzUxlJIrmAYA9LBO+lmrxGd5AECswFJd8ONQpEHZ\nzYK+y48lZCBPbGGR4luHMNA/tj1NpBgs5Y6ouh7U5duYJ7dIBA9fTykMlO1g\n2G4GeGcUPNtzYAMIY4lcdLC5TnaeFb8i7vmRbNB6JttdRXv3EXFULsEpwmvn\nSlnCzI4sgvTp9fQ9s4CeSgjFdht9+otsfKH7PHnj/9ol1m+wQO/BAnfZd68c\nfnAT\r\n=qRos\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBIz/dCGCc5rugekvFlb8trNi80io1vyQLiFNZPIrp/ZAiBNDOYkWs7FFkf7JEq7MPuPM9bsYS654BbTNXhw5vNuAQ=="}]},"maintainers":[{"name":"cbutler","email":"corey@coreybutler.com"}],"_npmUser":{"name":"cbutler","email":"corey@coreybutler.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/iam_1.0.0-beta7_1565462387079_0.33680002448002777"},"_hasShrinkwrap":false},"1.0.0-beta9":{"name":"@butlerlogic/iam","version":"1.0.0-beta9","description":"A simple identification and authorization management utility.","main":"src/main.js","directories":{"lib":"src/lib","test":"test"},"scripts":{"test":"tap -R spec ./test/**/*.js","test:syntax":"standard --verbose | snazzy"},"keywords":["iam","acl","authentication","authorization","auth","management"],"author":{"name":"Corey Butler"},"license":"MIT","type":"module","devDependencies":{"fs-extra":"^8.1.0","rollup":"^1.17.0","rollup-plugin-buble":"^0.19.2","rollup-plugin-replace":"^2.0.0","rollup-plugin-strip-code":"^0.2.6","rollup-plugin-terser":"^5.1.1","rollup-plugin-uglify":"^4.0.0","rollupify":"^0.5.1","snazzy":"^7.1.1","source-map-support":"^0.5.10","standard":"^12.0.1","tap":"^14.2.0","tap-diff":"^0.1.1","tape":"^4.9.1"},"gitHead":"70f291c17792928f0738476186b524a5c2c4e5fe","_id":"@butlerlogic/iam@1.0.0-beta9","_nodeVersion":"12.7.0","_npmVersion":"6.10.0","dist":{"integrity":"sha512-nrdF6dPFGMg14OGUNpMWm8tfoU5cCUTZFPagmcukddPUDauZJ7fugKmGz2g1Cw7sLAkKrJQTDK45xcKqyYp3cg==","shasum":"81094969f031fa0f101ddf81167b93cece341f43","tarball":"https://registry.npmjs.org/@butlerlogic/iam/-/iam-1.0.0-beta9.tgz","fileCount":10,"unpackedSize":70240,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdVJl3CRA9TVsSAnZWagAAK74QAKC4FPq9Dh+rbGXdnchr\nKlvcXPlmzS5Rs8aNxXCLNpAe3YGrV2O5H500aR6xFVGri6Cq3G8UbAX/IMgH\nu3mEa0r6wy+3rv/hhPLyM3QjpVwHDWJQyNUn4OpqIFWod73Drh8Vr2qNFfWm\npWOnb/2mPRcXmufO/0HI/r5k/6cISvqYVy8AyxWuV6egdLJrpeXsN17RlNpO\n6kLbsHuBcjutqgGkKiCzughz0LpCnKrMSmAlOrKKGcpT1v7i4uKmppWwNtQm\nSlqQh5UaHQdpachglTMJTt+JaN/x3cnfaBMhRCmtIqKvdkqyW2OryaxZwqpk\nc84v5xonHf/XbyUaH9TWHhExTJ0bT0fRHklGilAGjyEokIRVARhEJ4wdNYhf\nbFh7P7AZuXW5LRsTTurrZ8Zu0XUB9Turj56JdlKaraVb/OQ5eWEmLiAsgk8X\nuVA3mwIWvz7klLdXxvzYG7VGYeWvZzUafWyyYztxOrUnHhWDWaxso/0gYtwf\n6KsEBPMB6klhEnyz5kIM2bzZuhpDVZgkX3Tcy9uOhEjocyv3R1tjjfnzQ5IX\n0Gmbo+ltR0JNx3dRFSXb8XQkBHtaebLHbr/aWoMuTP+EVByhPjtrd/8dCfT5\nS9CanRAoKsOi9Cuyf7aCE69reeOSyUyMvhEtzXnUbk4gyoevKE7pKON7Z/9U\n5jUu\r\n=Dd5t\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEpqLueJn057Cd96lSAiEhmMbMVwWnWsWutq3R6uKaHvAiAqjDr+uSgkRpBB6k5YtNpS08iDvjAJVLiWhCT2h1JFBw=="}]},"maintainers":[{"name":"cbutler","email":"corey@coreybutler.com"}],"_npmUser":{"name":"cbutler","email":"corey@coreybutler.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/iam_1.0.0-beta9_1565825399098_0.6754885580339711"},"_hasShrinkwrap":false}},"time":{"created":"2019-07-23T22:32:54.100Z","1.0.0-beta1":"2019-07-23T22:32:54.427Z","modified":"2022-04-04T21:10:05.153Z","1.0.0-beta2":"2019-07-25T00:31:33.096Z","1.0.0-beta3":"2019-07-25T01:02:36.214Z","1.0.0-beta4":"2019-07-28T03:12:26.802Z","1.0.0-beta5":"2019-08-10T05:40:36.119Z","1.0.0-beta6":"2019-08-10T16:06:34.772Z","1.0.0-beta7":"2019-08-10T18:39:47.213Z","1.0.0-beta9":"2019-08-14T23:29:59.241Z"},"maintainers":[{"email":"cicd@author.io","name":"authoriocicd"},{"email":"corey@coreybutler.com","name":"cbutler"}],"description":"A simple identification and authorization management utility.","keywords":["iam","acl","authentication","authorization","auth","management"],"author":{"name":"Corey Butler"},"license":"MIT","readme":"# IAM (Identification and Authorization Management)\n_(For the browser and Node.js)_\n\nThis library manages roles and permissions, allowing developers to create simple or complex authorization patterns. It keeps track of resources, rights, roles, and groups. By maintaining the permission structure within the library (internally), it is capable of automatically deriving user rights, even in complex schemas.\n\n**Determining whether a user is authorized to view/use a specific feature of an application should always be a binary operation.** In other words, the code should reflect the answer to a simple question: _\"does the user have the right to do something with the system resource?\"_.\n\n**The goal:**\n\n```javascript\nif (user.authorized('system resource', 'view')) {\n  display()\n} else {\n  throw new Error('Access Denied')\n}\n```\n\n## Shortcuts\n\n- [Why? (Including Examples)](abstracting-complexity)\n- [Design Your Access Control System](#designing-your-access-control-system)\n- [API Docs](#installation)\n- [Tracing Permission Lineage](#tracing-permission-lineage)\n- [Access Control Philosophy](https://github.com/coreybutler/iam/wiki)\n\n---\n\n## Abstracting complexity\n\nIssues and confusion with authorization commonly occur when the conditional logic is too complicated.\n\nConsider the following authorization question:\n\n> \"Is the user authorized to use this feature, or are they part of a group that can access this feature, or have they been explicitly denied access to a feature, or are they part of a group that's part of another group that has permission, or are any permission overrides to account for?\"\n\nJust like proper sentences, **code shouldn't have \"run on\" logic**. You shouldn't have to be a mental gymnast to understand whether someone should have access to a feature or not. IAM abstracts this complexity.\n\n### Demo UI\n\n![IAM Example UI](https://github.com/coreybutler/iam/raw/master/examples/basic/IAM.png)\n\nThe code for this is available in the [basic example](https://github.com/coreybutler/iam/tree/master/examples/basic).\n\n\n### Demo API\n\n![IAM Example API](https://github.com/coreybutler/iam/raw/master/examples/api/api_example.png)\n\nThe code for this is available in the [api example](https://github.com/coreybutler/iam/tree/master/examples/api).\n\n---\n\n## Designing Your Access Control System\n\n**Resources** are arbitrary names associated with an application, such as `admin portal`, `user settings`, or an any other component of a system where access should be controlled.\n\n**Rights** are defined for each resource. For example, the `admin portal` resource may have `view` and `manage` rights associated with it. Users who are granted `view` rights should be able to see the `admin portal`, while users with `manage` rights can do something in the admin portal. Users without either of these rights shouldn't see the admin portal at all.\n\nTo grant/revoke access, developers create **roles** and assign them to **users** or **groups** of users. A role is assigned the rights of specific resources. Users and groups can then be assigned to these roles.\n\n**Groups** can be assigned users, roles, and even other groups. Groups allow developers to define simple or complex permission hierarchies.\n\nBy using each of these major components (resources, rights, roles, users, groups), the permission structure of your applications become significantly easier to manage. In turn, authorizing users becomes a trivial task with the `IAM.User` object. See examples in the usage section below.\n\n---\n\n## Installation\n\nThis is available as an importable ES Module. If you're interested in a CommonJS version, or a version compatible with older browsers, post an issue.\nI plan to do this, but will prioritize efforts based on community demand.\n\nA guide and high level API documentation are below. **See the source code for additional inline documentation.**\n\n### Installing for Node.js >=12\n\n`npm install @butlerlogic/iam -S`\n\n```javascript\nimport IAM from '@butlerlogic/iam'\n```\n\n_Remember_, to use modules in Node.js, the `type` attribute in `package.json` must be set to `\"module\"`:\n\n```hcl\n{\n  \"type\": \"module\"\n}\n```\n\nIf you're running an older version of Node (<12.x.x), you may need to\nrun Node with the `--experimental-modules` flag:\n\n`node --experimental-modules index.js`\n\nFor more information, read the [ES Module Support Announcement](https://medium.com/@nodejs/announcing-a-new-experimental-modules-1be8d2d6c2ff).\n\nSee the [api example](https://github.com/coreybutler/iam/tree/master/examples/api) for a working example.\n\n### Installing for the browser\n\n```html\n<script type=\"module\">\n  import IAM from 'https://cdn.jsdelivr.net/npm/@butlerlogic/iam@latest/src/main.min.js'\n\n  let user = new IAM.User('roleA', 'roleB')\n</script>\n```\n\n---\n\n# API Usage (API)\n\n## Resources & Rights\n\nResources can be thought of as components of a system. For example, in a UI, there may be several different pages/tools available to users. Each page/tool could be a unique resource. A basic web application may have a user page, admin section, and a few tools. All of these could be resources. It is up to the developer to identify and organize resources within the system.\n\nRights can be thought of as actions, permissions, features, etc. Rights often represent what a user can or can't see/do. Like resources, rights are just an arbitrary label, so it can be named any way you want. The naming is less important than understanding there is a relationship between resources and rights (resources have rights).\n\n### Creating a single resource\n\n```javascript\n// IAM.createResource('resource', rights)\nIAM.createResource('admin portal', ['view', 'manage'])\n```\n\n### Creating bulk resources\n\n```javascript\nIAM.createResource({\n  'admin portal': ['view', 'manage'],\n  'profile page': ['view'],\n  'tool': ['view']\n})\n```\n\n### Modifying resources\n\nThere is no specific \"modification\" feature. Just create the resource again to overwrite any existing resources/rights.\n\n### Deleting one or more resources\n\n```javascript\nIAM.removeResource('admin portal', 'tool', ...)\n\n// To remove all:\nIAM.clearResources()\n```\n\n### Viewing available resources\n\n```javascript\nconsole.log(IAM.resources)\n```\n```json\n{\n  \"admin portal\": [\"view\", \"manage\"],\n  \"profile page\": [\"view\"],\n  \"tool\": [\"view\"]\n}\n```\n\n## Roles\n\nRoles are used to map system resources/rights to users. A role consists of resources and which rights of the resource should be enforced.\n\n### Creating a role\n\nThe example below creates a simple administrative role called \"admin\". This role grants `view` and `manage` **rights** on the admin portal **resource**.\n\n```javascript\n// IAM.createRole('role name', {\n//   'resource': rights\n// })\n\nIAM.createRole('admin', {\n  'admin portal': ['view', 'manage']\n})\n```\n\n### Granting all rights\n\nFor situations where all rights need to be granted on a specific resource, a shortcut `*` value can be used.\n\n```javascript\nIAM.createRole('admin', {\n  'admin portal': '*'\n})\n```\n\n### DENY rights\n\nTo explicitly deny a right, preface the right with the `deny:` prefix.\n\n```javascript\nIAM.createRole('basic user', {\n  'admin portal': ['deny:view', 'deny:manage']\n})\n\n// Alternatively\nIAM.createRole('basic user', {\n  'admin portal': 'deny:*'\n})\n```\n\n### FORCIBLY ALLOW rights\n\nThere are circumstances where a user may belong to more than one role or group, where one role denies a right and another allows it. For example, users may be denied access to an administration tool by default, but admins should be granted special access to the tool. In this case, the admin rights must override the denied rights. This is accomplished by prefixing a right with the `allow:` prefix.\n\n```javascript\nIAM.createRole('basic user', {\n  'admin portal': 'deny:*'\n})\n\nIAM.createRole('superuser', {\n  'admin portal': 'allow:*'\n})\n```\n\nIf a user was assigned to both the `basic user` _and_ `superuser` roles, the user would be granted all permissions to the admin portal because the `allow:*` right of the \"superuser\" role supercedes the `deny:*` right of the \"basic user\" role.\n\n> ALLOW RIGHTS ALWAYS SUPERCEDE DENIED RIGHTS. ALWAYS.\n\n### Applying rights to everyone\n\nThere is a private/hidden role produced by IAM, called `everyone`. This role is always assigned to all users. It is used to assign permissions which are applicable to every user of the system. A special `all()` method simplifies the process of assigning rights to everyone.\n\n```javascript\nIAM.all({\n  'resource': 'right',\n  'admin portal': 'deny:*',\n  'user portal': 'view', // A single string is valid\n  'tool': ['view'] // Arrays are also valid.\n})\n```\n\n### Viewing roles/rights\n\nThe full list of roles and rights associated with them is available in the `IAM.roles` attribute.\n\n```javascript\nconsole.log(IAM.roles)\n```\n```json\n{\n  \"admin portal\": [\"deny:view\", \"deny:manage\"],\n  \"user portal\": [\"view\", \"manage\"],\n  \"tool\": [\"view\", \"manage\"]\n}\n```\n\n## Users\n\nUsers can be assigned to roles, granting or denying access to system resources.\n\n### Creating a user\n\n```javascript\nlet user = new IAM.User()\nuser.name = 'John Doe'\n```\n\nPlease note that user \"name\" does not necessarily refer to a person's name. It is merely an optional label to help identify a particular user (useful when viewing reports, groups of users, etc).\n\n### Assigning users to a role\n\n```javascript\nuser.assign('roleA')\nuser.assign('roleB', 'roleC')\n```\n\nThere is also a shortcut to assign roles to a user when the user is created:\n\n```javascript\nlet user = new IAM.User('admin', 'basic user')\n```\n\nIn the example above, the user would automatically be assigned to the \"admin\" and \"basic user\" roles.\n\n### Removing users from a role\n\n```javascript\nuser.revoke('admin')\nuser.clear() // Removes all role assignments.\n```\n\n### Determining if a user is assigned to a role\n\n```javascript\nuser.assignedTo('role')\nuser.of('role')\n```\n\n### Determining if a user is authorized to use a resource\n\n```javascript\nif (user.authorized('admin portal', 'manage')) {\n  adminView.enable()\n}\n```\n\nThe code above states \"if the user has the manage right on the admin portal, enable the admin view.\"\n\n### Group membership\n\nSee the group section below.\n\n## Group Management\n\nGroups are a simple but powerful organizational container. Groups have two types of members: users\nand other groups.\n\nRoles are assigned to groups, applying the permissions to all members of the group. For example, a user who is a member of the \"admin\" group will receive all of the same roles/privileges assigned to the \"admin\" group.\n\nUsers inherit permissions from the groups they are a part of, but groups inherit permissions from the groups within them. For example, a group called \"superadmin\" contains a group called \"admin\". The \"superadmin\" group inherits all privileges from the \"admin\" group. This is a \"reverse\" cascade hierarchy, which allows privileges to be \"rolled up\" into higher order groups.\n\n### Creating groups\n\n```javascript\nlet group = IAM.createGroup('admin')\n// or\nlet groups = IAM.createGroup('admin', 'profile', '...')\n```\n\nWhen a single group is created, the new group is returned (i.e. `group` in the first example). When multiple groups are created at the same time, an array of groups is returned (i.e. `groups` in the second example)\n\n### Group descriptions\n\nSometimes (especially in reporting) it is useful to have a description of a group. A generic description is generated by default, but it's possible to supply a custom description using the `description` attribute.\n\n```javascript\nlet group = IAM.createGroup('admin')\n\ngroup.description = 'An administrative group.'\n```\n\nDescriptions are optional.\n\n### Assigning roles/privileges to a group\n\n```javascript\ngroup.assign('roleA', 'roleB')\n\nlet roleC = IAM.createRole('roleC', {...})\n\ngroup.assign(roleC)\n```\n\nIt is possible to assign one or more roles at the same time. A role must be the unique name (string) of an existing role or the actual `IAM.Role` object.\n\n### Removing roles/privileges from a group\n\n```javascript\ngroup.revoke('roleA', roleC)\n```\n\nSimilar to adding a role, supply one or more existing role name/`IAM.Role` objects to the `revoke` method.\n\n### Removing all roles from a group\n\n`group.clearRoles()` clears all role assignments.\n\n### Adding & removing users to a group\n\n```javascript\nlet user = new IAM.User('John Doe')\n\ngroup.addMember(user)\ngroup.removeMember(user)\n```\n\n### Adding & removing subgroups to a group\n\n```javascript\nlet group = new IAM.Group('admin')\nlet supergroup = new IAM.Group('superadmin')\n\n// Groups can be added by IAM.Group object or by name\nsupergroup.addMember(group)\n// or\nsupergroup.addMember('admin')\n\n// Groups can be removed by IAM.Group object or by name\nsupergroup.removeMember(group)\n// or\nsupergroup.removeMember('admin')\n```\n\n---\n\n# Tracing Permission Lineage\n\nThere are situations when it is useful to know how/why a privilege was assigned to a user. For example, it's not uncommon to ask questions like \"why does/n't John Doe have permission to the administration section?\". The lineage system is designed to trace a permission back to the authorization source. In other words, it helps identify which group, role, or inheritance pattern ultimately granted/denied access to a resource.\n\nThe `IAM.Group` and `IAM.User` objects both contain a `trace()` method for this. This method requires two arguments: `resource` (string/`IAM.Resource`) and `right` (string/`IAM.Right`).\n\nConsider the following, where a system resource called `admin portal` exists, but everyone is denied access by default. A role called `administrator` is created, which grants access to the `admin portal` resource. Using this structure, only members of the `administrator` role should have access to the `admin portal` resource.\n\n```javascript\n// Create a system resource and rights.\nIAM.createResource({\n  'admin portal', ['view', 'manage'],\n})\n\n// Deny admin portal rights for everyone.\nIAM.all({\n  'admin portal': 'deny:*'\n})\n\n// Create an \"administrator\" role for users who SHOULD be able to access the admin portal.\nIAM.createRole('administrator', {\n  'admin portal': 'allow:*'\n})\n\n// Create some groups for organizing administrative users.\nIAM.createGroup('partialadmin', 'admin', 'superadmin')\n\n// Assign the administrator role to the partialadmin group.\nIAM.getGroup('partialadmin').assign('administrator')\n\n// Add the partialadmin group to the admin group,\n// and add the admin group to the superadmin group.\n// This is the equivalent of saying \"the partialadmin\n// group belongs to the admin group, and the admin group\n// belongs to the superadmin group\".\nIAM.getGroup('admin').addMember('partialadmin')\nIAM.getGroup('superadmin').addMember('admin')\n\n// Create a user\nlet user = new IAM.User()\nuser.name = 'John Doe' // Optional \"nicety\" for reporting purposes.\n\n// Add the user to the superadmin group.\nuser.join('superadmin')\n\n// The user should have access to view the admin portal.\nconsole.log(user.authorized('admin portal', 'view')) // Outputs \"true\"\n```\n\nPerhaps the user \"John Doe\" shouldn't have access to the admin portal. Instead of being frustrated and wondering why that user has access when he shouldn't, use the trace method to quickly find out how permission was granted.\n\n```javascript\nconsole.log(user.trace('admin portal', 'view'))\n```\n\nThe console output would look like:\n\n```javascript\n{\n  \"display\": \"superadmin (group) <-- admin (subgroup) <-- partialadmin (subgroup) <-- administrator (role) <-- * (right to view)\",\n  \"description\": \"\"The \\\"view\\\" right on the \\\"admin portal\\\" resource is granted by the \\\"admin\\\" role, which is assigned to the \\\"subadmin\\\" group, which is a member of the \\\"admin\\\" group, which the user is a member of.\\\"\",\n  \"governedBy\": {\n    \"group\": Group {#oid: Symbol(superadmin group),…},\n    \"right\": Right {#oid: Symbol(allow:* right),…},\n    \"role\": Role {#oid: Symbol(admin role), …}\n  },\n  \"granted\": true,\n  \"resource\": Resource {#oid: Symbol(admin portal resource),…},\n  \"right\": \"view\",\n  \"stack\": (5) [Group, Group, Group, Role, Right],\n  \"type\": \"role\"\n}\n```\n\nThe `display` and `description` attributes are the most descriptive.\n\nIn this case, the user is just part of a group that he probably shouldn't be a member of... so fixing it is a matter of removing the user from the group. The important part of this trace feature is _you didn't have to hunt through an entire application code base to find out which group_.\n\nHere is the actual output from the [basic example](https://github.com/coreybutler/iam/tree/master/examples/basic):\n\n![IAM Example Lineage](https://github.com/coreybutler/iam/raw/master/examples/IAM-lineage.png)\n\nThe lineage/trace tool also supports explicitly denied rights (i.e. `deny:xxx`). It will return `null` if there is no lineage.\n\nLineage is parsed into several additional attributes, purely for ease of use.\n\nThe `stack` attribute provides references to the full lineage, including all elements that were responsible for assigning/revoking the specified privileges. This is the same as the `display` attribute, but provides a programmatic trace instead of a descriptive trace.\n\nThe `governedBy` attribute provides the highest level group, role, and right. The `granted` attribute determines whether the right was allowed or not. The `resource` attribute is a reference to the system resource, and the `right` attribute is the actual right.\n\nThe `type` attribute indicates whether a role the permission was granted/revoked by a \"role\" or \"group\" assigned to the user.\n","readmeFilename":"README.md"}