{"_id":"@ainasoft/oidc-rs","_rev":"5-42498c2262646ede0066f4fd266a8e06","name":"@ainasoft/oidc-rs","dist-tags":{"latest":"0.3.6"},"versions":{"0.3.2":{"name":"@ainasoft/oidc-rs","version":"0.3.2","description":"OpenID Connect Resource Server Authentication for Node.js","main":"src/index.js","directories":{"test":"test"},"scripts":{"test":"mocha"},"repository":{"type":"git","url":"git+https://github.com/azanium/oidc-rs.git"},"author":"","contributors":[{"name":"Christian Smith","email":"smith@anvil.io","url":"http://anvil.io"},{"name":"Dmitri Zagidulin","url":"https://github.com/dmitrizagidulin"},{"name":"Suhendra Ahmad","url":"https://github.com/azanium"}],"license":"MIT","bugs":{"url":"https://github.com/azanium/oidc-rs/issues"},"homepage":"https://github.com/azanium/oidc-rs#readme","dependencies":{"@trust/jose":"^0.1.7","node-arn":"^1.1.1","node-fetch":"^1.7.1"},"devDependencies":{"chai":"^4.0.2","chai-as-promised":"^7.1.1","dirty-chai":"^2.0.1","mocha":"^3.2.0","nock":"^9.0.13","node-mocks-http":"^1.6.3","sinon":"^2.3.4","sinon-chai":"^2.11.0"},"gitHead":"18269c29c6f1583876de3ebc1e87325c464ed390","_id":"@ainasoft/oidc-rs@0.3.2","_npmVersion":"6.5.0","_nodeVersion":"10.14.1","_npmUser":{"name":"azanium","email":"syuaibi@gmail.com"},"dist":{"integrity":"sha512-BEmWueEuWnxcgyQjmMftiySFbZ4vA6EB8BBDOzeT5NivOxlHiGfHQ4dvn9iDrHFPQg+striS0erWA/NeoD6wJw==","shasum":"575c18f385b594a1a5872921ab46092804e06515","tarball":"https://registry.npmjs.org/@ainasoft/oidc-rs/-/oidc-rs-0.3.2.tgz","fileCount":28,"unpackedSize":125324,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcMxGrCRA9TVsSAnZWagAAScAP/Rxl2KjArt6sO9N5ln+m\nziSQVVU/2OppS/8vHOcXzNnUfsiW/R0GNMFWW+UtENGNUaU0bsdgcC1w1RPc\nCYBiMDhCReaAW3/OdqGJMt4WaptmARDGbLRmBJNCoKTvpG0MvmyPnOBXlhtY\n+iPCGcU8uhPAMUPqaOYy6VrDl06NFRoL9EV6M4hL7GtqBB/5iUppRggfVd1k\nGP6o6zn7H8ySyK8kWfRaFwPlehNN6mRMgx9awJYGBBxUX/7YvIsiinutBSyo\n5+rXQffIdcs3mC1bM7TP78D+FVHAuEAm2zIawFwzE8V9xR8E0sHj5DqLwMLJ\ntTwR+GvyDOtzwAvDwrAU1YhNNooL0VPmBKHCanUDaWqrVHyskV73HMTdb1tI\nCey6JLpK0O2v6+FvfEMpAn6aOmfUuKJD4mu4QD6FsQtDGiLi/DciDVVXFUt+\nVoC6vZdeCVQssbhur3Spy9da9mS0Z0eXPYjaz9WAxVxmUUZ87le0OltPFRWw\n3FhUzPKaPVxkYjbkFS5AQezbrEblt0BdrARgDr/ikKdT8eWsGbswaiaBC3uU\nlVEJClBadK72TBv/hgYt8hP2PPrC+l67mKdZ0HjRKvBuft0YDw95Q9wbw5nk\nAT+/LFIIK2qTuFRLb981zkSzBqZztzUhyyB4Q9aY1vlggeaPs8AFDOMTuRjU\n8pUC\r\n=g6yQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDgbdrjlg9Gg2EeDCd545+MlfCyJ1csUQjVPg7/YizYGQIgCMEpoPUSBpay7NoW40LnFIJgFrvtYSSfU/n1TDuTgPc="}]},"maintainers":[{"name":"azanium","email":"syuaibi@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/oidc-rs_0.3.2_1546850730364_0.8820644865889773"},"_hasShrinkwrap":false},"0.3.3":{"name":"@ainasoft/oidc-rs","version":"0.3.3","description":"OpenID Connect Resource Server Authentication for Node.js","main":"src/index.js","directories":{"test":"test"},"scripts":{"test":"mocha"},"repository":{"type":"git","url":"git+https://github.com/azanium/oidc-rs.git"},"author":"","contributors":[{"name":"Christian Smith","email":"smith@anvil.io","url":"http://anvil.io"},{"name":"Dmitri Zagidulin","url":"https://github.com/dmitrizagidulin"},{"name":"Suhendra Ahmad","url":"https://github.com/azanium"}],"license":"MIT","bugs":{"url":"https://github.com/azanium/oidc-rs/issues"},"homepage":"https://github.com/azanium/oidc-rs#readme","dependencies":{"@trust/jose":"^0.1.7","node-arn":"^1.1.1","node-fetch":"^1.7.1"},"devDependencies":{"chai":"^4.0.2","chai-as-promised":"^7.1.1","dirty-chai":"^2.0.1","mocha":"^3.2.0","nock":"^9.0.13","node-mocks-http":"^1.6.3","sinon":"^2.3.4","sinon-chai":"^2.11.0"},"gitHead":"3ff7fe5e7f187d08040d9db89e89e626c302c226","_id":"@ainasoft/oidc-rs@0.3.3","_npmVersion":"6.5.0","_nodeVersion":"10.14.1","_npmUser":{"name":"azanium","email":"syuaibi@gmail.com"},"dist":{"integrity":"sha512-C8gzXJhFgaHsLRFHo9zpfROyRBqTjl7m5RK8hRYHs1cztCOsYWuQBQed5pmVXaua4aM7oz0MF9UunwLZkD4XUQ==","shasum":"9f73dc0f3c3451225da0653def4289056b48092b","tarball":"https://registry.npmjs.org/@ainasoft/oidc-rs/-/oidc-rs-0.3.3.tgz","fileCount":28,"unpackedSize":125281,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcM1ezCRA9TVsSAnZWagAA/uEP/jfWsMneBICSBcQvN1Qh\n8TcUntvm9f3mzsnuiM/Jt8q5rbkaN/ql8pkgmHz8USiLlj0yO7O4cUg6H5pQ\nZxpYIE9UD90Yp9FacArtxh/EcVRYsxBcfiwLKhlhjJ+0qPltwCAZYLCrZ7mi\nzT+T/KS3Sonr1GUiN1XHRzUFjI5pxzskMnNfJYwfBwIJeI96ZW6xLUiFC3PA\nc5dV/l9sI73Oi0ykM/k/X84dJYIaxyWFoYbIE1sTDtI7t4X18EEgR48V1mra\nfMj1irzc87Xok/xjyokOy2Hk5aWXGOSKB3lzOscpEJqDllpJjAsUhqYBMOeO\nFUlZ/EOuy3ty7qOgaXFo+RVjIM/54lA1pTV9mviNnCJ0breiTQ7u7DCYJ/hI\nO8gPF8KpThSiBnqRYm4aZ3VnPRHBLMXMVjvkHFrzz3wbiGIw97tTnQJF1hFQ\n8cTgOjsl1LWgiuQHPvQ1hewclmKPWnLH9naEQfX42ofvzlu9UUGDroU8DB0z\nd3JLdcrYGWDsEx9SvE20OAOYWNr8ffa1pPGBYg9rWkj9KUFaTtE/LvUPizgD\nMHJjw1oArwE23jaiCq5dDsfKFVwqsJ/2i5oqjIQq0qii8Cg8dfbY5ySh0Fs1\nGVvKuFz9idJDSewiH3huHD5CIINwS5MTiGfyMMNMAfnvuOPJS/oy3gxXUBGX\nF9wQ\r\n=5k7m\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDcESQfsqbqQ8rUd53yE+4/ezkgJwecxIJE8av8y8kkSwIgXT6OoFxZrWca62EyBHEaOY36krPDAUdNCXwMF1fstXM="}]},"maintainers":[{"name":"azanium","email":"syuaibi@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/oidc-rs_0.3.3_1546868658965_0.7964383750423039"},"_hasShrinkwrap":false},"0.3.4":{"name":"@ainasoft/oidc-rs","version":"0.3.4","description":"OpenID Connect Resource Server Authentication for Node.js","main":"src/index.js","directories":{"test":"test"},"scripts":{"test":"mocha"},"repository":{"type":"git","url":"git+https://github.com/azanium/oidc-rs.git"},"author":"","contributors":[{"name":"Christian Smith","email":"smith@anvil.io","url":"http://anvil.io"},{"name":"Dmitri Zagidulin","url":"https://github.com/dmitrizagidulin"},{"name":"Suhendra Ahmad","url":"https://github.com/azanium"}],"license":"MIT","bugs":{"url":"https://github.com/azanium/oidc-rs/issues"},"homepage":"https://github.com/azanium/oidc-rs#readme","dependencies":{"@trust/jose":"^0.1.7","node-arn":"^1.1.1","node-fetch":"^1.7.1"},"devDependencies":{"chai":"^4.0.2","chai-as-promised":"^7.1.1","dirty-chai":"^2.0.1","mocha":"^3.2.0","nock":"^9.0.13","node-mocks-http":"^1.6.3","sinon":"^2.3.4","sinon-chai":"^2.11.0"},"gitHead":"da77f41c2e8957614874a20ebc21043ad3cc9976","_id":"@ainasoft/oidc-rs@0.3.4","_npmVersion":"6.5.0","_nodeVersion":"10.14.1","_npmUser":{"name":"azanium","email":"syuaibi@gmail.com"},"dist":{"integrity":"sha512-DI7BoSLLuI+njsEVK4ppGrbHs8K1G9pRHn5gmp3y/8Bluhk+qQrKEbr63Jkizi2tMyYSdddjRYNHlr/AeUp6PA==","shasum":"14ff16f386dc778f46aed8a4e16409ea3facf555","tarball":"https://registry.npmjs.org/@ainasoft/oidc-rs/-/oidc-rs-0.3.4.tgz","fileCount":28,"unpackedSize":125338,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcOdzMCRA9TVsSAnZWagAA+uYP/irhNva9xMhhEu2kei0x\nrbOU93b0/Ezt9+0Rw88hoTiqTia5v/Fq8C8cvCt0lJ92ow9HQrr75Ae8NGiE\ncY3IAzQENavJd5Zfvm2yrvjr+hx6j8mtTzu1ui+r1KfoCul15W4ZG+X1v4ZF\nmBNiGHGgPpTWugdYxOnN7El9qDLws87f4v08sALLQ8H/0wWBsnJ7xIY68igo\nfTR7M3uT47xAJ6IekhVHd0gMzkSwxxE+eCYJCyOMvT578891Ql7gYo2PmLbI\n5m7sYyXf6YD4JHraZgkaIE4/4MfqHmyBtvwD5XmgXOzNJZNkkKfUGgoBy8rq\nR9oYdVch9Q6KsmCW5N0jkfsYLrIbI6rdtKHRMH7eIBCUCfiPrblg93JWJfuP\nbBsu9GvxBcSjUH1s9SnEHQbpOhm2PTC+fdQJMFP0CLzrykY7l7KkzitU5jRH\nAOks4cYvLRmzmoLkIojXLeIrjbCgePAeuO6RxyCFyp+D/pw44JgkZbpL5rnU\nfsYM+HLJRV0/Qlqpx4pFunbAiC9oCKxPctKG5jjQUNAPnMk/mSIt0+D6msC1\n2LVpGqrYApoaLHbzijchk8C2DdW5OOn1eb45nK3A3mxHtxj0S+FFSYfiwA5y\nVJuN8TSGIB3zgBk8vPFmpxjKa1Rbxa75ZhYc1YgdJXqnlvK5QvDsL7YOx0CM\nmXOE\r\n=prnV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCwi9euuEbtWENDAkEis22Ln6VjFSh1211flCM5sDrjqQIgLCyW6C96om47+Z39DLk2wxUiNXyR0DISQej/wqXEHx0="}]},"maintainers":[{"name":"azanium","email":"syuaibi@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/oidc-rs_0.3.4_1547295947935_0.5945561400684931"},"_hasShrinkwrap":false},"0.3.5":{"name":"@ainasoft/oidc-rs","version":"0.3.5","description":"OpenID Connect Resource Server Authentication for Node.js","main":"src/index.js","directories":{"test":"test"},"scripts":{"test":"mocha"},"repository":{"type":"git","url":"git+https://github.com/azanium/oidc-rs.git"},"author":"","contributors":[{"name":"Christian Smith","email":"smith@anvil.io","url":"http://anvil.io"},{"name":"Dmitri Zagidulin","url":"https://github.com/dmitrizagidulin"},{"name":"Suhendra Ahmad","url":"https://github.com/azanium"}],"license":"MIT","bugs":{"url":"https://github.com/azanium/oidc-rs/issues"},"homepage":"https://github.com/azanium/oidc-rs#readme","dependencies":{"@trust/jose":"^0.4.0","node-arn":"^1.1.1","node-fetch":"^1.7.1"},"devDependencies":{"chai":"^4.0.2","chai-as-promised":"^7.1.1","dirty-chai":"^2.0.1","mocha":"^5.2.0","nock":"^10.0.6","node-mocks-http":"^1.7.3","sinon":"^2.3.4","sinon-chai":"^2.11.0"},"gitHead":"29d7ee190d7cdcb4737ae3ce04a00f0ec828a867","_id":"@ainasoft/oidc-rs@0.3.5","_npmVersion":"6.4.1","_nodeVersion":"10.12.0","_npmUser":{"name":"azanium","email":"syuaibi@gmail.com"},"dist":{"integrity":"sha512-pi+S03BczSJaGCbS3x/5RCyLQ7tbaMeIRbQDgcy+Kf2icyH0rOpiwQFHF98thpMH9JMNHa+iq/H7/hLYYO/8Tg==","shasum":"61fc7cd21c71d7bce895e8f3ce3b44ca2f21ff71","tarball":"https://registry.npmjs.org/@ainasoft/oidc-rs/-/oidc-rs-0.3.5.tgz","fileCount":28,"unpackedSize":125338,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcWFXfCRA9TVsSAnZWagAAEJcP/33cNZ53LUKx3bADCtif\nL61f5Co9joi6X6W5lKU5oA+FNYjgf5uhzq4720CbmCIkm2nwnL2dhgRjlgpi\nRKUt20/oSx6TboivNcbOW8hvhW7QcZpYHlLTTyPYF8aXmxz/GH4LsNOFgCIh\ncUJnmiQtsP0P5rPOaD2UQKWcRUsVqE90tHuUHGUVAcQsv9J/I3A7oiZuVe+O\nsAsA14S2HuusU0FNxGhVZKVOcOkd2/w2f71byQWsKkM8f0d7mUAXukizGEs8\n/yNIo4R3dsZgfXVjq6NJI7MaTuZetbdFz3QDRF1ws2Q/4k1LcwSHeRQjzv85\nemgLq16URXgIWWxz6z4hM1blJCF2fbPR94ecfHH8lvZZDRcR0fdXpLroyDWi\nJ1WsNs5Doctc51Al0aSbKW2Vd9Kq3Un7gYN8zv+h6jOBTpfGiaIMGDNXvsBk\nxVaat1ypC1/MO+PcWTNMtOTi7kCono52jv/DUSevUp2usU78tgG3YyPJzYBI\nWiYWMAxImeEkigzdtghRUCVLvBvW/rd2mxNu86lYiHaL/Dw2wKNPldFgP2++\nTLchz9kHqeGkWVPuR3TJjl6qV3rjOUOy0sYWjACSAId6IES8cD3Jc1lj8/yW\nZWbfzQPY9/Ka+ZaA2wmEGB5iq5fsG8G0sbv+mnYD4SXKrYP3Hx0Ysv3Tv1w7\nK/zg\r\n=Zodf\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDC5/d4VEjhn+iPV/Goalu84OusMm1qY9EV+9M/wZOm9AiB9lIF2vFK1R0QwXDznlHeQBEGQ9P5tbTi/vvtlBC9LAw=="}]},"maintainers":[{"name":"azanium","email":"syuaibi@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/oidc-rs_0.3.5_1549293023099_0.7372575928956864"},"_hasShrinkwrap":false},"0.3.6":{"name":"@ainasoft/oidc-rs","version":"0.3.6","description":"OpenID Connect Resource Server Authentication for Node.js","main":"src/index.js","directories":{"test":"test"},"scripts":{"test":"mocha"},"repository":{"type":"git","url":"git+https://github.com/azanium/oidc-rs.git"},"author":"","contributors":[{"name":"Christian Smith","email":"smith@anvil.io","url":"http://anvil.io"},{"name":"Dmitri Zagidulin","url":"https://github.com/dmitrizagidulin"},{"name":"Suhendra Ahmad","url":"https://github.com/azanium"}],"license":"MIT","bugs":{"url":"https://github.com/azanium/oidc-rs/issues"},"homepage":"https://github.com/azanium/oidc-rs#readme","dependencies":{"@trust/jose":"^0.1.7","node-arn":"^1.1.1","node-fetch":"^1.7.1"},"devDependencies":{"chai":"^4.0.2","chai-as-promised":"^7.1.1","dirty-chai":"^2.0.1","mocha":"^5.2.0","nock":"^10.0.6","node-mocks-http":"^1.7.3","sinon":"^2.3.4","sinon-chai":"^2.11.0"},"gitHead":"0fe79986a0d80d44e5f4d4377932a48d3b2d37fb","_id":"@ainasoft/oidc-rs@0.3.6","_nodeVersion":"10.14.1","_npmVersion":"6.7.0","dist":{"integrity":"sha512-V4gbsT5xWlaQigylUhc8M2DvM+mor4uDOCEadbuZitSnJ9XYhtzoCpLAGYdYm6vHKiHwpODT7oDSNJ3sbF3A6g==","shasum":"fddb5db391f117f8210cdcd8d2f1f0a46ca785f4","tarball":"https://registry.npmjs.org/@ainasoft/oidc-rs/-/oidc-rs-0.3.6.tgz","fileCount":28,"unpackedSize":122816,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcY6JVCRA9TVsSAnZWagAADQwQAKB3ehZ6I/TnwSmwXW9w\nQDpRlxH3b8q+aCN3joomcCMWg9xRsWkZoo1Ac73594yanQ3edXrZThvzdOyz\neYqWh4FudRjHxIALIz6LsbjTG7JURVJNnPsj19lex4uH4uiX4UpQw5oOlCPd\nVH22clTP8BJkErz60KsWi69oHXWBVEqMXqvjrr0gQ4PHbPELGMz1w+fKDNIx\nDbc4dznYWgc8DoO0Z3swGNq0VT9T3mfAMmlbEab7Me/lyYsHVg5nt+yHr79m\nrcK0ubBFjxV0KacwDDvcouI5C7XcrsNz1GkpUslQCjIcH72I/AEvL6L8u9t1\nU7LMRLs7Q9Qxuk54JSvfuqXFBJUL5ZKwWCcZKaCd46fcfjkUgcyA2MgY3Q8+\nFJmi/4I0ykNAjjiKLbDL3FoCV+nE3tbMw9uA5LuYaO3etIXwhBususo3ObIe\nk6SYda3xlTqjemKa3PCqof67rNnvKFkPe56suJsLTIEPmCkXIQiuJ+3wTHom\nsSzNRQKL4fEuCA/v6zS1E6/XwaFgO2QijpzFtGhZ1C96guyiJaeejbB3qmeG\nuRpptBccE3tABbzwYbhjoqkg1CtH2coN5SnPwrs1Ce/yDf/ZLhrNDzzMESpY\nj0p1iuL35oDbbc8AIu5Ms8PotJJY7442RBBpJSb37dPwnJnhodNm3PNFrJI9\n8sa3\r\n=fJZ8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIC3I1jo0DoSlepwD9CTTmgSKh2ieblHCBLoiDv3Ex1ACAiEA5kwaVBNYz/PU0FCsmm3SkO8/6wQFoDEa0B93cKRwaQI="}]},"maintainers":[{"name":"azanium","email":"syuaibi@gmail.com"}],"_npmUser":{"name":"azanium","email":"syuaibi@gmail.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/oidc-rs_0.3.6_1550033492446_0.22803599258728657"},"_hasShrinkwrap":false}},"time":{"created":"2019-01-07T08:45:30.188Z","0.3.2":"2019-01-07T08:45:30.557Z","modified":"2022-04-04T12:19:42.811Z","0.3.3":"2019-01-07T13:44:19.108Z","0.3.4":"2019-01-12T12:25:48.104Z","0.3.5":"2019-02-04T15:10:23.194Z","0.3.6":"2019-02-13T04:51:32.574Z"},"maintainers":[{"name":"azanium","email":"syuaibi@gmail.com"}],"description":"OpenID Connect Resource Server Authentication for Node.js","homepage":"https://github.com/azanium/oidc-rs#readme","repository":{"type":"git","url":"git+https://github.com/azanium/oidc-rs.git"},"contributors":[{"name":"Christian Smith","email":"smith@anvil.io","url":"http://anvil.io"},{"name":"Dmitri Zagidulin","url":"https://github.com/dmitrizagidulin"},{"name":"Suhendra Ahmad","url":"https://github.com/azanium"}],"bugs":{"url":"https://github.com/azanium/oidc-rs/issues"},"license":"MIT","readme":"# OpenID Connect Resource Server Authentication\n\nOpenID Connect Resource Server Authentication for Node.js\n\n## Features\n\n* [x] OAuth 2.0 Bearer Token Usage (RFC 6750)\n* [x] JWT Access Token Validation (Specification pending)\n* [x] Issuer discovery (OpenID Connect Discovery)\n* [x] Dynamic key rotation (OpenID Connect Core)\n* [x] Multiple issuer support\n* [x] Scope validation\n* [x] Allow and deny access by \"iss\", \"aud\", and \"sub\" claims\n* [ ] OAuth 2.0 Token Introspection (RFC 7662)\n* [ ] Cookie Token Authentication (Specification pending)\n\n## Usage\n\n### Install\n\nWe're still tidying up a few things. The package will be published to npm after testing and docs are complete.\n\n```bash\n$ npm install https://github.com/anvilresearch/oidc-rs.git\n```\n\n### Require\n\n```\nconst ResourceServer = require('oidc-rs')\n```\n\n### ResourceServer\n\nResourceServer maintains a cache of provider metadata and JSON Web Keys for verifying signatures. Provider discovery and acquisition of keys takes place when a JWT access token is decoded. The provider metadata and JWK Set are cached in memory. Therefore no configuration is required.\n\n```\nlet rs = new ResourceServer()\n```\n\nThe provider cache can be serialized and persisted, then restored like so:\n\n```\nlet providers = require('./providers.json')\nResourceServer.from({providers}).then(rs => /* ... */)\n```\n\n#### Global server authentication\n\n```javascript\nconst app = express()\napp.use(rs.authenticate(options))\n```\n\n#### Route specific configuration\n\n```javascript\napp.get('/endpoint', rs.authenticate(options), (req, res, next) => {})\n```\n\n### Middleware Options\n\nNo configuration is _required_ in order to start using this middleware. All options are optional.\n\n```javascript\nrs.authenticate({\n  realm: 'user',\n  scopes: ['foo', 'bar'],\n  allow: {\n    issuers: ['https://forge.anvil.io'],\n    audience: ['clientid1', 'clientid2'],\n    subjects: ['userid1', 'userid2', 'useridn']\n  },\n  deny: { // probably want to use either allow or deny, but not both\n    issuers: ['https://forge.anvil.io'],\n    audience: ['clientid1', 'clientid2'],\n    subjects: ['userid1', 'userid2', 'useridn']\n  },\n  handleErrors: false, // defaults to true\n  tokenProperty: 'token',\n  claimsProperty: 'claims'\n})\n```\n\n* `realm` – Value of \"realm\" parameter to use in WWW-Authenticate challenge header.\n* `scopes` – Array of scope values required to access this resource.\n* `allow` – Object with arrays of allowed issuers, audience and subjects.\n* `deny` – Object with arrays of restricted issuers, audience and subjects.\n* `handleErrors` – When set to false, error conditions will result in a call to `next()`, passing control to the application's error handling.\n* `tokenProperty` – Name of property on `req` to assign decoded JWT object. The property will not be set unless defined.\n* `claimsProperty` – name of property on `req` to assign verified JWT claims. Defaults to \"claims\".\n\n## Running tests\n\n### Nodejs\n\n```bash\n$ npm test\n```\n\n## MIT License\n\nCopyright (c) 2016 Anvil Research, Inc.\n\n\n","readmeFilename":"README.md"}