{"_id":"@carisls/sso-core","_rev":"11-2a2225bcef81e196bd6ea113bb26a920","name":"@carisls/sso-core","dist-tags":{"latest":"1.3.0"},"versions":{"1.0.0":{"name":"@carisls/sso-core","version":"1.0.0","keywords":["sso","jwt"],"author":{"name":"Mihovil Strujic","email":"mstrujic@carisls.com"},"license":"MIT","_id":"@carisls/sso-core@1.0.0","maintainers":[{"name":"mstrujic-caris","email":"mstrujic@carisls.com"},{"name":"michaelortho","email":"mihovil.strujic@gmail.com"}],"dist":{"shasum":"b9c3503d74e3431c3b4a60045d97707581232d8e","tarball":"https://registry.npmjs.org/@carisls/sso-core/-/sso-core-1.0.0.tgz","fileCount":20,"integrity":"sha512-OdC/vNiTMerey0/nCT+H/NdT9Kb+LeXW0qIY6GzTV5EOTzElnjAK81iDImfYo6Wb3Uq3G10NnYXA0iBpkhKCCg==","signatures":[{"sig":"MEQCIF7YzmyMhEeJFv1qMqJLoo5Wbqiz02QBdJlqft58s9YLAiBSyFAz4zMxeeXsMeTKyqGOvl1ir6jxNh/ZaCiBrdvOYQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14862},"main":"cjs/index.cjs","module":"esm/index.js","exports":{".":{"import":"./esm/index.js","require":"./cjs/index.cjs"}},"gitHead":"fc4c26bb150b2dae83bab3bd30f0ddb17d9099f7","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"mstrujic-caris","email":"mstrujic@carisls.com"},"_npmVersion":"10.8.2","description":"A core component used by other components","directories":{},"_nodeVersion":"22.7.0","dependencies":{"axios":"^1.7.5","jwk-to-pem":"^2.0.6","jsonwebtoken":"^9.0.2","encryption-se":"^1.0.3","openid-client":"^5.6.5"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/sso-core_1.0.0_1724797872456_0.5406584355459818","host":"s3://npm-registry-packages"}},"1.0.1":{"name":"@carisls/sso-core","version":"1.0.1","keywords":["sso","jwt"],"author":{"name":"Mihovil Strujic","email":"mstrujic@carisls.com"},"license":"MIT","_id":"@carisls/sso-core@1.0.1","maintainers":[{"name":"mstrujic-caris","email":"mstrujic@carisls.com"},{"name":"michaelortho","email":"mihovil.strujic@gmail.com"}],"dist":{"shasum":"f0b7a0023e067394691471c9cd9fb3b333ff1cfb","tarball":"https://registry.npmjs.org/@carisls/sso-core/-/sso-core-1.0.1.tgz","fileCount":23,"integrity":"sha512-6Su8luka/tCIyPGlCawHdXucpY2A6+vYNEjptl7jYJtLzE7UlBqK1xVpAKxKRKNeRDRzXZlmrZ13tzLV6mrqKQ==","signatures":[{"sig":"MEUCIAuP8ztOjXMEgB9pGe2eNexYSCqVnxgTjl3pmvMJeJ4RAiEAlVsM1whabo/IFhnYtCXay/zY6S0pDKWtqF5bc1l/G9A=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":18944},"main":"cjs/index.cjs","type":"module","module":"esm/index.js","exports":{".":{"import":"./esm/index.js","require":"./cjs/index.cjs"}},"gitHead":"2f28fff17156a48e58d93f2904c38c0b1c3e81e8","scripts":{"test":"npm run test:lint","test:lint":"eslint '**/*.js' '**/*.cjs'","test:lint-fix":"eslint '**/*.js' '**/*.cjs' --fix"},"_npmUser":{"name":"mstrujic-caris","email":"mstrujic@carisls.com"},"_npmVersion":"10.8.2","description":"A core component used by other components","directories":{},"_nodeVersion":"22.6.0","dependencies":{"axios":"^1.7.5","jwk-to-pem":"^2.0.6","jsonwebtoken":"^9.0.2","encryption-se":"^1.0.3","openid-client":"^5.6.5"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^9.9.1","neostandard":"^0.11.4"},"_npmOperationalInternal":{"tmp":"tmp/sso-core_1.0.1_1724870721137_0.8364922860971191","host":"s3://npm-registry-packages"}},"1.0.2":{"name":"@carisls/sso-core","version":"1.0.2","keywords":["sso","jwt"],"author":{"name":"Mihovil Strujic","email":"mstrujic@carisls.com"},"license":"MIT","_id":"@carisls/sso-core@1.0.2","maintainers":[{"name":"mstrujic-caris","email":"mstrujic@carisls.com"},{"name":"michaelortho","email":"mihovil.strujic@gmail.com"}],"dist":{"shasum":"58e7c6d44ff591035b5c68de0bc8206ddb4071f4","tarball":"https://registry.npmjs.org/@carisls/sso-core/-/sso-core-1.0.2.tgz","fileCount":23,"integrity":"sha512-wPdJhoRW2145ZmwMVJyi93CKdCkICK6CoMmrPcRJ6ZdN1mDT2fE9FJI+UAzsWYUNBBSG6cMLzdIHYvRCdTTFNw==","signatures":[{"sig":"MEUCIA8yvhauJ21hqA9hJ7klpxRE9AE66P6geZZ1CwPIf4M4AiEA8ejYO6Z/Nk4e8RyrEapiZRttb4X0QyO3fUcYED/P+oQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":18945},"main":"cjs/index.cjs","type":"module","module":"esm/index.js","exports":{".":{"import":"./esm/index.js","require":"./cjs/index.cjs"}},"gitHead":"e53d34752a8f21e4e58f51f2da0e249e9badf31b","scripts":{"test":"npm run test:lint","test:lint":"eslint '**/*.js' '**/*.cjs'","test:lint-fix":"eslint '**/*.js' '**/*.cjs' --fix"},"_npmUser":{"name":"mstrujic-caris","email":"mstrujic@carisls.com"},"_npmVersion":"10.8.2","description":"A core component used by other components","directories":{},"_nodeVersion":"22.8.0","dependencies":{"axios":"^1.7.7","jwk-to-pem":"^2.0.6","jsonwebtoken":"^9.0.2","encryption-se":"^1.0.3","openid-client":"^5.7.0"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^9.10.0","neostandard":"^0.11.4"},"_npmOperationalInternal":{"tmp":"tmp/sso-core_1.0.2_1726088715735_0.36415788650668257","host":"s3://npm-registry-packages"}},"1.0.3":{"name":"@carisls/sso-core","version":"1.0.3","keywords":["sso","jwt"],"author":{"name":"Mihovil Strujic","email":"mstrujic@carisls.com"},"license":"MIT","_id":"@carisls/sso-core@1.0.3","maintainers":[{"name":"mstrujic-caris","email":"mstrujic@carisls.com"},{"name":"michaelortho","email":"mihovil.strujic@gmail.com"}],"dist":{"shasum":"59116cd291d5a8f0e4108adb9efaa88169135059","tarball":"https://registry.npmjs.org/@carisls/sso-core/-/sso-core-1.0.3.tgz","fileCount":23,"integrity":"sha512-ns1nsfIutKi2P8+c3nf0nEs7LHx6Df8v79/GGhxODbecKtD50WXreANSeKPeZMStejztVZWUz3aDWCKpIgeoYw==","signatures":[{"sig":"MEYCIQC3rGsgqfkoJul3j6aPYxvKXF+dRG/5KKNVyf+p7HwQUgIhAKeGnYRKr4uRANIMFH11zfL+Ybur0GkGxBYlL6P7YkSU","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":18945},"main":"cjs/index.cjs","type":"module","module":"esm/index.js","exports":{".":{"import":"./esm/index.js","require":"./cjs/index.cjs"}},"gitHead":"3f09b16fb0956588a8de1fa1552ea27ab624cc12","scripts":{"test":"npm run test:lint","test:lint":"eslint '**/*.js' '**/*.cjs'","test:lint-fix":"eslint '**/*.js' '**/*.cjs' --fix"},"_npmUser":{"name":"mstrujic-caris","email":"mstrujic@carisls.com"},"_npmVersion":"10.9.2","description":"A core component used by other components","directories":{},"_nodeVersion":"22.13.1","dependencies":{"axios":"^1.7.9","jwk-to-pem":"^2.0.7","jsonwebtoken":"^9.0.2","encryption-se":"^1.0.3","openid-client":"^6.1.7"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^9.18.0","neostandard":"^0.12.0"},"_npmOperationalInternal":{"tmp":"tmp/sso-core_1.0.3_1737575285745_0.23843381616575376","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"@carisls/sso-core","version":"1.1.0","keywords":["sso","jwt"],"author":{"name":"Mihovil Strujic","email":"mstrujic@carisls.com"},"license":"MIT","_id":"@carisls/sso-core@1.1.0","maintainers":[{"name":"mstrujic-caris","email":"mstrujic@carisls.com"},{"name":"michaelortho","email":"mihovil.strujic@gmail.com"}],"dist":{"shasum":"6c8612c8e3efbcff23f1578585594e668ac3a97a","tarball":"https://registry.npmjs.org/@carisls/sso-core/-/sso-core-1.1.0.tgz","fileCount":23,"integrity":"sha512-1D2AsK6ztiP3IfLMRR29VNmggcQ2ZVColLtGtk6Iv6rEWfCGzZQ1eD7llDprH5BpaOP5fDRTpSY+4x1yEu9jCQ==","signatures":[{"sig":"MEQCIAYP2QzJK6aNGBLNGIiQgaSKI/wkzEKL5XB4153DHB8CAiB8+pWEKe52aeEYcnCwWEXhcZmVLmicFvJBsRg1frJKeA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":18917},"main":"cjs/index.cjs","type":"module","module":"esm/index.js","exports":{".":{"import":"./esm/index.js","require":"./cjs/index.cjs"}},"gitHead":"80c50953453b9e97b37ff343846369ee68e5c39b","scripts":{"test":"npm run test:lint","test:lint":"eslint '**/*.js' '**/*.cjs'","test:lint-fix":"eslint '**/*.js' '**/*.cjs' --fix"},"_npmUser":{"name":"mstrujic-caris","email":"mstrujic@carisls.com"},"_npmVersion":"10.9.2","description":"A core component used by other components","directories":{},"_nodeVersion":"22.13.1","dependencies":{"axios":"^1.7.9","jwk-to-pem":"^2.0.7","jsonwebtoken":"^9.0.2","encryption-se":"^1.0.3"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^9.18.0","neostandard":"^0.12.0"},"_npmOperationalInternal":{"tmp":"tmp/sso-core_1.1.0_1737674469633_0.5956341657290498","host":"s3://npm-registry-packages-npm-production"}},"1.1.1":{"name":"@carisls/sso-core","version":"1.1.1","keywords":["sso","jwt"],"author":{"name":"Mihovil Strujic","email":"mstrujic@carisls.com"},"license":"MIT","_id":"@carisls/sso-core@1.1.1","maintainers":[{"name":"mstrujic-caris","email":"mstrujic@carisls.com"},{"name":"michaelortho","email":"mihovil.strujic@gmail.com"}],"dist":{"shasum":"993ef377cb137b8a7a7f3072eb9deeaeefc5bddc","tarball":"https://registry.npmjs.org/@carisls/sso-core/-/sso-core-1.1.1.tgz","fileCount":23,"integrity":"sha512-eztaXKjGF4MV4feNx9GqBpltiPoMwRktat7Zz/K4ZhuczaRQZ44rg2dVG31gEfkLQUeZ4x8BvLKPugrYfpHR5A==","signatures":[{"sig":"MEUCIQDO7GMXPYdSMCYlKxJX4zeicUWDjaMCfPT+lKbTlkCAdAIgUDrYGPxHb/y+cIU1PuzztH3PVE8ooUVAmwEjDm0+9kk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":18953},"main":"cjs/index.cjs","type":"module","module":"esm/index.js","exports":{".":{"import":"./esm/index.js","require":"./cjs/index.cjs"}},"gitHead":"55d5ea8ad79866b85b3f621e8df253c63a497e1a","scripts":{"test":"npm run test:lint","test:lint":"eslint '**/*.js' '**/*.cjs'","test:lint-fix":"eslint '**/*.js' '**/*.cjs' --fix"},"_npmUser":{"name":"mstrujic-caris","email":"mstrujic@carisls.com"},"_npmVersion":"10.9.2","description":"A core component used by other components","directories":{},"_nodeVersion":"22.13.1","dependencies":{"axios":"^1.7.9","jwk-to-pem":"^2.0.7","jsonwebtoken":"^9.0.2","encryption-se":"^1.0.3"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^9.18.0","neostandard":"^0.12.0"},"_npmOperationalInternal":{"tmp":"tmp/sso-core_1.1.1_1737695892935_0.5460275113008881","host":"s3://npm-registry-packages-npm-production"}},"1.1.2":{"name":"@carisls/sso-core","version":"1.1.2","keywords":["sso","jwt"],"author":{"name":"Mihovil Strujic","email":"mstrujic@carisls.com"},"license":"MIT","_id":"@carisls/sso-core@1.1.2","maintainers":[{"name":"mstrujic-caris","email":"mstrujic@carisls.com"},{"name":"michaelortho","email":"mihovil.strujic@gmail.com"}],"dist":{"shasum":"2d5659b84cfda59f55238e649c2761d9ac7a0523","tarball":"https://registry.npmjs.org/@carisls/sso-core/-/sso-core-1.1.2.tgz","fileCount":23,"integrity":"sha512-t20L2muiD1fqzUE1p9RmIsrbJd1XhnK3y/e9SClZ/prnj6R8YJVBjike4GWYf+F6ZiyrdirDtSi7EFY7VL4ULw==","signatures":[{"sig":"MEQCIBjunp3A0BJXEC7M7eiDeQCVDAUso58lsy+/h07rYUnzAiBpVhsqWezl+zc9hKtkQLzy0FcASvZOqjlEcI52E7MZ7w==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":18953},"main":"cjs/index.cjs","type":"module","module":"esm/index.js","exports":{".":{"import":"./esm/index.js","require":"./cjs/index.cjs"}},"gitHead":"0675d02b297feb8b0d7851668c1eeb86c73d8a20","scripts":{"test":"npm run test:lint","test:lint":"eslint '**/*.js' '**/*.cjs'","test:lint-fix":"eslint '**/*.js' '**/*.cjs' --fix"},"_npmUser":{"name":"mstrujic-caris","email":"mstrujic@carisls.com"},"_npmVersion":"10.9.2","description":"A core component used by other components","directories":{},"_nodeVersion":"22.13.1","dependencies":{"axios":"^1.7.9","jwk-to-pem":"^2.0.7","jsonwebtoken":"^9.0.2","encryption-se":"^1.0.3"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^9.18.0","neostandard":"^0.12.0"},"_npmOperationalInternal":{"tmp":"tmp/sso-core_1.1.2_1737735405680_0.7230527260142494","host":"s3://npm-registry-packages-npm-production"}},"1.1.3":{"name":"@carisls/sso-core","version":"1.1.3","keywords":["sso","jwt"],"author":{"name":"Mihovil Strujic","email":"mstrujic@carisls.com"},"license":"MIT","_id":"@carisls/sso-core@1.1.3","maintainers":[{"name":"mstrujic-caris","email":"mstrujic@carisls.com"},{"name":"michaelortho","email":"mihovil.strujic@gmail.com"}],"dist":{"shasum":"8b235a86bfc1e7be1d939d518ed37603729ef15a","tarball":"https://registry.npmjs.org/@carisls/sso-core/-/sso-core-1.1.3.tgz","fileCount":23,"integrity":"sha512-V9OjUNbHRdJFHoDA+yBbHJaWqAFBSSGF7m7w61kDxX08cdvvol3hw9olD/B6kc14yZ+RG2LKDRQXGxnLefcAXQ==","signatures":[{"sig":"MEYCIQCQ2XV1OfzYZF38uAEoLOvS/8J0Hxq/vyfoRneWSsJpDgIhAIUtTgLPGfSDf9xEZgUTa0nBUM3IBiri3O7N9tzITsGK","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":18953},"main":"cjs/index.cjs","type":"module","module":"esm/index.js","exports":{".":{"import":"./esm/index.js","require":"./cjs/index.cjs"}},"gitHead":"0bc45a4d681c4bc09212c69a667fa116d4c5a74e","scripts":{"test":"npm run test:lint","test:lint":"eslint '**/*.js' '**/*.cjs'","test:lint-fix":"eslint '**/*.js' '**/*.cjs' --fix"},"_npmUser":{"name":"mstrujic-caris","email":"mstrujic@carisls.com"},"_npmVersion":"10.9.2","description":"A core component used by other components","directories":{},"_nodeVersion":"22.14.0","dependencies":{"axios":"^1.8.4","jwk-to-pem":"^2.0.7","jsonwebtoken":"^9.0.2","encryption-se":"^1.0.3"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^9.24.0","neostandard":"^0.12.1"},"_npmOperationalInternal":{"tmp":"tmp/sso-core_1.1.3_1744720997069_0.051081370693297545","host":"s3://npm-registry-packages-npm-production"}},"1.1.4":{"name":"@carisls/sso-core","version":"1.1.4","keywords":["sso","jwt"],"author":{"name":"Mihovil Strujic","email":"mstrujic@carisls.com"},"license":"MIT","_id":"@carisls/sso-core@1.1.4","maintainers":[{"name":"mstrujic-caris","email":"mstrujic@carisls.com"},{"name":"michaelortho","email":"mihovil.strujic@gmail.com"}],"dist":{"shasum":"bf9aaffc0fde99e06a991191c9989445ee9d0b82","tarball":"https://registry.npmjs.org/@carisls/sso-core/-/sso-core-1.1.4.tgz","fileCount":23,"integrity":"sha512-OL89aWALFTUQfVs90lfLruo/JQ2mZBG1j5I+HsZF3ZCsTyY4n1JuVXduQuv61e7eM9Zoh//vsjESxZwpTKZ2kQ==","signatures":[{"sig":"MEUCIBB5LFADV4MFEpRHptgEkZeQKSa4M1+lc1ErRh2PGSCMAiEAq03fgS139ZY72thBigp1PITFdtyjJXwKE5JeNAlvYhQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":18976},"main":"cjs/index.cjs","type":"module","module":"esm/index.js","exports":{".":{"import":"./esm/index.js","require":"./cjs/index.cjs"}},"gitHead":"0013de4293cc246523ad480a19741fd47ccc7b96","scripts":{"test":"npm run test:lint","test:lint":"eslint '**/*.js' '**/*.cjs'","test:lint-fix":"eslint '**/*.js' '**/*.cjs' --fix"},"_npmUser":{"name":"GitLab CI/CD","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"gitlab","oidcConfigId":"oidc:618d15a9-d0b0-4562-83fd-8aa9218214ea"}},"_npmVersion":"11.6.2","description":"A core component used by other components","directories":{},"_nodeVersion":"24.12.0","dependencies":{"axios":"^1.13.2","jwk-to-pem":"^2.0.7","jsonwebtoken":"^9.0.3","encryption-se":"^1.0.3"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^9.39.2","neostandard":"^0.12.2"},"_npmOperationalInternal":{"tmp":"tmp/sso-core_1.1.4_1766712342008_0.982342935106252","host":"s3://npm-registry-packages-npm-production"}},"1.2.0":{"name":"@carisls/sso-core","version":"1.2.0","keywords":["sso","jwt"],"author":{"name":"Mihovil Strujic","email":"mstrujic@carisls.com"},"license":"MIT","_id":"@carisls/sso-core@1.2.0","maintainers":[{"name":"mstrujic-caris","email":"mstrujic@carisls.com"},{"name":"michaelortho","email":"mihovil.strujic@gmail.com"}],"dist":{"shasum":"36c4702c9fe0002eb195fadb865f5a269887774f","tarball":"https://registry.npmjs.org/@carisls/sso-core/-/sso-core-1.2.0.tgz","fileCount":24,"integrity":"sha512-wwH3bM4fG9l4tM0Z0jZuIcluU54Da+PBVP4MAuKIpXT2DJQYIl5CVGyqqZTjB5DD5QAsa2Co1zW8FHzwLKnvGA==","signatures":[{"sig":"MEUCIFWbpSZDBj5OfNKmt+0tG/dNtuCTqKWi7lyxpM582B7hAiEApddQQnZqo4hsjH34Zq9FeShwXkWIGu5EMsfiWYF/Tik=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":28508},"main":"cjs/index.cjs","type":"module","module":"esm/index.js","exports":{".":{"import":"./esm/index.js","require":"./cjs/index.cjs"}},"gitHead":"2392afc781c11feaae2e70d2d772f9538b6a7f62","scripts":{"test":"npm run test:lint","test:lint":"eslint '**/*.js' '**/*.cjs'","test:lint-fix":"eslint '**/*.js' '**/*.cjs' --fix"},"_npmUser":{"name":"GitLab CI/CD","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"gitlab","oidcConfigId":"oidc:618d15a9-d0b0-4562-83fd-8aa9218214ea"}},"_npmVersion":"11.6.2","description":"A core component used by other components","directories":{},"_nodeVersion":"24.12.0","dependencies":{"axios":"^1.13.2","jwk-to-pem":"^2.0.7","jsonwebtoken":"^9.0.3","encryption-se":"^1.0.3"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^9.39.2","neostandard":"^0.12.2"},"_npmOperationalInternal":{"tmp":"tmp/sso-core_1.2.0_1766713834413_0.1340841805758326","host":"s3://npm-registry-packages-npm-production"}},"1.3.0":{"name":"@carisls/sso-core","version":"1.3.0","description":"A core component used by other components","main":"cjs/index.cjs","module":"esm/index.js","type":"module","exports":{".":{"require":"./cjs/index.cjs","import":"./esm/index.js"}},"scripts":{"build":"node scripts/build-cjs.js && npm run test:cjs","build:cjs":"node scripts/build-cjs.js && npm run test:cjs","lint:fix-cjs":"eslint 'cjs/**/*.cjs' --fix","test":"npm run test:lint && npm run test:unit && npm run test:coverage","test:lint":"eslint '**/*.js' '**/*.cjs'","test:lint-fix":"eslint '**/*.js' '**/*.cjs' --fix","test:unit":"mocha 'esm/**/*.test.js'","test:coverage":"c8 --reporter=text --clean mocha 'esm/**/*.test.js' && rm -rf coverage .nyc_output","test:cjs":"node scripts/test-cjs.cjs"},"c8":{"include":["esm/**/*.js"],"exclude":["esm/**/*.test.js","node_modules/**","cjs/**"],"all":true,"check-coverage":false},"keywords":["sso","jwt"],"author":{"name":"Mihovil Strujic","email":"mstrujic@carisls.com"},"license":"MIT","dependencies":{"axios":"^1.13.2","encryption-se":"^1.0.3","jsonwebtoken":"^9.0.3"},"devDependencies":{"@babel/cli":"^7.28.6","@babel/core":"^7.28.6","@babel/preset-env":"^7.28.6","babel-plugin-add-module-exports":"^1.0.4","c8":"^10.1.3","chai":"^6.2.2","eslint":"^9.39.2","mocha":"^11.7.5","neostandard":"^0.12.2","sinon":"^21.0.1"},"gitHead":"3601977b4b3affc5dafb793898a5185e90c98094","_id":"@carisls/sso-core@1.3.0","_nodeVersion":"24.13.0","_npmVersion":"11.6.2","dist":{"integrity":"sha512-WTnI2fpWmKFY47oLRECkS4xlR1toNypC8l3dt3yeYrcwu2spHUYHiWgV7OA7XPW1RFivK/EkqLaPbmkk8T6OHA==","shasum":"6573e73a487834fbbd8038fedb620d4586640ee4","tarball":"https://registry.npmjs.org/@carisls/sso-core/-/sso-core-1.3.0.tgz","fileCount":31,"unpackedSize":64958,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCICtPmBozbtjEYwvCnoH1r7oWtfMoiJX28fIRMZ2W5Tf0AiEApdOd6etXfPcp3esCC8RHuoTwfi7p6YK96hAumJ0uEL8="}]},"_npmUser":{"name":"GitLab CI/CD","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"gitlab","oidcConfigId":"oidc:618d15a9-d0b0-4562-83fd-8aa9218214ea"}},"directories":{},"maintainers":[{"name":"mstrujic-caris","email":"mstrujic@carisls.com"},{"name":"michaelortho","email":"mihovil.strujic@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/sso-core_1.3.0_1769134729805_0.07474582357167003"},"_hasShrinkwrap":false}},"time":{"created":"2024-08-27T22:31:12.371Z","modified":"2026-01-23T02:18:50.135Z","1.0.0":"2024-08-27T22:31:12.633Z","1.0.1":"2024-08-28T18:45:21.353Z","1.0.2":"2024-09-11T21:05:15.903Z","1.0.3":"2025-01-22T19:48:05.936Z","1.1.0":"2025-01-23T23:21:09.803Z","1.1.1":"2025-01-24T05:18:13.121Z","1.1.2":"2025-01-24T16:16:45.874Z","1.1.3":"2025-04-15T12:43:17.241Z","1.1.4":"2025-12-26T01:25:42.164Z","1.2.0":"2025-12-26T01:50:34.566Z","1.3.0":"2026-01-23T02:18:49.982Z"},"author":{"name":"Mihovil Strujic","email":"mstrujic@carisls.com"},"license":"MIT","keywords":["sso","jwt"],"description":"A core component used by other components","maintainers":[{"name":"mstrujic-caris","email":"mstrujic@carisls.com"},{"name":"michaelortho","email":"mihovil.strujic@gmail.com"}],"readme":"# @carisls/sso-core\n\nA core SSO (Single Sign-On) component library for JWT token validation, user mapping, and authorization. This package provides essential utilities for handling OIDC/OAuth2 authentication flows, token validation, and Express.js middleware integration.\n\n> **Note:** This package is typically not installed directly. It is automatically installed as a dependency of other SSO packages:\n> - `@carisls/sso-standard`\n> - `@carisls/sso-resource-api`\n\n## Features\n\n- 🔐 JWT token validation with JWKS support\n- 🔑 Public key fetching and caching\n- 👤 User token mapping and transformation\n- 🛡️ Express.js authorization middleware\n- 🔒 Encryption/decryption utilities\n- 🌐 Multi-issuer support\n- 📦 Supports both ESM and CommonJS\n\n## Installation\n\nThis package is usually installed automatically as a dependency. If you need to install it directly:\n\n```bash\nnpm install @carisls/sso-core\n```\n\n## Usage\n\n### ESM (ECMAScript Modules)\n\n```javascript\nimport {\n  authorize,\n  certFetcherModule,\n  encryptorModule,\n  HttpError,\n  issuerSelectorModule,\n  postForm,\n  tokenDecoderModule,\n  tokenValidatorModule,\n  userMapper\n} from '@carisls/sso-core';\n```\n\n### CommonJS\n\n```javascript\nconst {\n  authorize,\n  certFetcherModule,\n  encryptorModule,\n  HttpError,\n  issuerSelectorModule,\n  postForm,\n  tokenDecoderModule,\n  tokenValidatorModule,\n  userMapper\n} = require('@carisls/sso-core');\n```\n\n## API Reference\n\n### `authorize(role, exceptions, redirectToLogin)`\n\nExpress.js middleware for authorization filtering based on user roles.\n\n**Parameters:**\n- `role` (string | string[] | undefined): Role(s) to filter by. If undefined, only checks for authenticated user.\n- `exceptions` (string[] | undefined): Array of URL paths to skip authorization.\n- `redirectToLogin` (boolean, default: `false`): If `true`, redirects to login page instead of returning 401.\n\n**Returns:** Express middleware function `(req, res, next) => void`\n\n**Example:**\n\n```javascript\nimport express from 'express';\nimport { authorize } from '@carisls/sso-core';\n\nconst app = express();\n\n// Require any authenticated user\napp.use(authorize());\n\n// Require specific role\napp.use('/admin', authorize('admin'));\n\n// Require one of multiple roles\napp.use('/dashboard', authorize(['admin', 'user']));\n\n// With exceptions and redirect\napp.use(authorize('user', ['/public', '/health'], true));\n```\n\n### `certFetcherModule(jwksUri, publicKeyCache)`\n\nCreates a function to fetch and cache public keys from a JWKS (JSON Web Key Set) endpoint.\n\n**Parameters:**\n- `jwksUri` (string): URL to the JWKS endpoint (e.g., `https://example.com/.well-known/jwks.json`)\n- `publicKeyCache` (number, default: `300`): Cache expiration time in seconds.\n\n**Returns:** Async function `(kid) => Promise<string>` that returns the PEM-formatted public key for the given key ID.\n\n**Example:**\n\n```javascript\nimport { certFetcherModule } from '@carisls/sso-core';\n\nconst getCert = certFetcherModule('https://auth.example.com/.well-known/jwks.json', 600);\n\n// Get public key for a specific key ID\nconst publicKey = await getCert('key-id-123');\n```\n\n### `encryptorModule(password, passwordSalt, iterationCount)`\n\nCreates an encryption/decryption utility.\n\n**Parameters:**\n- `password` (string): Encryption password.\n- `passwordSalt` (string, default: `'C5mp4Hl$X9wby#s5'`): Salt for password derivation.\n- `iterationCount` (number, default: `123123`): Number of iterations for key derivation.\n\n**Returns:** Object with `encrypt` and `decrypt` methods.\n\n**Example:**\n\n```javascript\nimport { encryptorModule } from '@carisls/sso-core';\n\nconst { encrypt, decrypt } = encryptorModule('my-secret-password');\n\nconst encrypted = encrypt('sensitive data');\nconst decrypted = decrypt(encrypted);\n```\n\n### `issuerSelectorModule(providers, cache)`\n\nCreates a validator that supports multiple JWT issuers/providers.\n\n**Parameters:**\n- `providers` (Array<{ ssoUrl?: string, iss?: string, publicKey?: string }>): Array of provider configurations.\n  - `ssoUrl`: OpenID Connect configuration URL (e.g., `https://auth.example.com`)\n  - `iss`: Issuer identifier (used as fallback if `ssoUrl` fails)\n  - `publicKey`: Optional static public key (PEM format) if not using JWKS\n- `cache` (number): Public key cache duration in seconds.\n\n**Returns:** Promise resolving to an object with:\n- `validator(tokenEnc, nonce, decodeOnly)`: Async function to validate tokens\n- `providers`: Map of configured providers\n\n**Example:**\n\n```javascript\nimport { issuerSelectorModule } from '@carisls/sso-core';\n\nconst { validator } = await issuerSelectorModule([\n  { ssoUrl: 'https://auth1.example.com', iss: 'https://auth1.example.com' },\n  { ssoUrl: 'https://auth2.example.com', iss: 'https://auth2.example.com' },\n  { publicKey: '-----BEGIN PUBLIC KEY-----\\n...', iss: 'static-issuer' }\n], 600);\n\n// Validate token\ntry {\n  const result = await validator(encryptedToken, nonce);\n  console.log('Token valid:', result.token);\n} catch (error) {\n  console.error('Token validation failed:', error.message);\n}\n\n// Decode only (no validation)\nconst { token } = await validator(encryptedToken, null, true);\n```\n\n### `postForm(url, data)`\n\nSends a POST request with form-urlencoded data.\n\n**Parameters:**\n- `url` (string): Target URL.\n- `data` (object): Data object to be encoded as form data.\n\n**Returns:** Promise resolving to the response data.\n\n**Example:**\n\n```javascript\nimport { postForm } from '@carisls/sso-core';\n\nconst response = await postForm('https://auth.example.com/token', {\n  grant_type: 'authorization_code',\n  code: 'auth-code-123',\n  client_id: 'my-client',\n  client_secret: 'my-secret'\n});\n```\n\n### `tokenDecoderModule`\n\nUtility object for decoding JWT tokens without validation.\n\n**Methods:**\n- `header(encToken)`: Decodes and returns the JWT header.\n- `data(encToken)`: Decodes and returns the JWT payload.\n\n**Example:**\n\n```javascript\nimport { tokenDecoderModule } from '@carisls/sso-core';\n\nconst token = 'eyJhbGciOiJSUzI1NiIs...';\n\nconst header = tokenDecoderModule.header(token);\nconst payload = tokenDecoderModule.data(token);\n\nconsole.log('Algorithm:', header.alg);\nconsole.log('User ID:', payload.sub);\n```\n\n### `tokenValidatorModule(jwksUri, publicKeyCache, publicKey)`\n\nCreates a token validator function.\n\n**Parameters:**\n- `jwksUri` (string | null): JWKS endpoint URL. If `null`, uses `publicKey` instead.\n- `publicKeyCache` (number): Cache duration in seconds (ignored if `publicKey` is provided).\n- `publicKey` (string | undefined): Optional static public key in PEM format.\n\n**Returns:** Async function `(tokenEnc, nonce) => Promise<{ token, publicKey }>`\n\n**Example:**\n\n```javascript\nimport { tokenValidatorModule } from '@carisls/sso-core';\n\n// Using JWKS\nconst validateWithJWKS = tokenValidatorModule(\n  'https://auth.example.com/.well-known/jwks.json',\n  600\n);\n\n// Using static public key\nconst validateWithKey = tokenValidatorModule(\n  null,\n  0,\n  '-----BEGIN PUBLIC KEY-----\\n...'\n);\n\nconst result = await validateWithJWKS(encryptedToken, 'nonce-value');\nconsole.log('Validated token:', result.token);\nconsole.log('Public key used:', result.publicKey);\n```\n\n### `userMapper(token, idToken)`\n\nMaps a JWT token to a standardized user object.\n\n**Parameters:**\n- `token` (object): Decoded JWT access token.\n- `idToken` (object | undefined): Optional decoded ID token.\n\n**Returns:** User object with the following structure:\n\n```typescript\n{\n  iss: string;              // Issuer\n  id: string;               // User ID (from 'sub')\n  sid?: string;             // Session ID\n  sa: boolean;              // Service account flag (true if no session)\n  azp?: string;             // Authorized party\n  name?: {                  // Name object (only if session exists)\n    full: string;\n    familyName: string;\n    givenName: string;\n  };\n  email?: string;           // Email (only if session exists)\n  roles: string[];          // User roles\n}\n```\n\n**Example:**\n\n```javascript\nimport { userMapper } from '@carisls/sso-core';\n\nconst decodedToken = {\n  iss: 'https://auth.example.com',\n  sub: 'user-123',\n  sid: 'session-456',\n  email: 'user@example.com',\n  given_name: 'John',\n  family_name: 'Doe',\n  roles: ['user', 'admin']\n};\n\nconst user = userMapper(decodedToken);\n// {\n//   iss: 'https://auth.example.com',\n//   id: 'user-123',\n//   sid: 'session-456',\n//   sa: false,\n//   name: {\n//     full: 'John Doe',\n//     familyName: 'Doe',\n//     givenName: 'John'\n//   },\n//   email: 'user@example.com',\n//   roles: ['user', 'admin']\n// }\n```\n\n## Complete Example\n\n```javascript\nimport express from 'express';\nimport {\n  issuerSelectorModule,\n  userMapper,\n  authorize\n} from '@carisls/sso-core';\n\nconst app = express();\n\n// Configure SSO providers\nconst { validator } = await issuerSelectorModule([\n  { ssoUrl: 'https://auth.example.com', iss: 'https://auth.example.com' }\n], 600);\n\n// Express middleware to validate tokens\napp.use(async (req, res, next) => {\n  try {\n    const token = req.headers.authorization?.replace('Bearer ', '');\n    if (!token) {\n      return next({ status: 401, message: 'No token provided' });\n    }\n\n    const { token: decodedToken } = await validator(token);\n    req.user = userMapper(decodedToken);\n    next();\n  } catch (error) {\n    next({ status: 401, message: error.message });\n  }\n});\n\n// Protected route with role-based authorization\napp.get('/admin', authorize('admin'), (req, res) => {\n  res.json({ message: 'Admin access granted', user: req.user });\n});\n\napp.listen(3000);\n```\n\n## License\n\nMIT\n\n## Author\n\nMihovil Strujic <mstrujic@carisls.com>\n\n","readmeFilename":"README.md"}