{"_id":"@csrf-armor/core","_rev":"11-29754e5dcdbe6e7611392c5385384951","name":"@csrf-armor/core","dist-tags":{"latest":"1.2.4"},"versions":{"0.0.1":{"name":"@csrf-armor/core","version":"0.0.1","_id":"@csrf-armor/core@0.0.1","maintainers":[{"name":"muneeb_samuels","email":"muneeb@codebus.io"}],"dist":{"shasum":"d8dc780e554cc172ed03bf853b7783f460660fda","tarball":"https://registry.npmjs.org/@csrf-armor/core/-/core-0.0.1.tgz","fileCount":1,"integrity":"sha512-CsTTgmvD9vvS9UZMSiljsNMXjj+rpjBMCsB7xIvZpvJzTqKUbBz0UpaU3cF2luSMeNGEV/jsb0mFd5V4033BDg==","signatures":[{"sig":"MEUCICm0BqpZEcBpq+5pBrjcn1r2Ea11tYoMDMN/PZnfDX1kAiEApbJ8+G9Yl7/s0+Vj4eiUqu7JvL5CvgRkFhm1lZvDPQk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":89},"gitHead":"1d60628c144712936d6f0963559f2a22706ee0b3","_npmUser":{"name":"muneeb_samuels","email":"muneeb@codebus.io"},"_npmVersion":"10.8.1","description":"Package setup","directories":{},"_nodeVersion":"20.16.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/core_0.0.1_1748898220291_0.21657680599196594","host":"s3://npm-registry-packages-npm-production"}},"1.0.0":{"name":"@csrf-armor/core","version":"1.0.0","keywords":["csrf","security","protection","framework-agnostic","token","validation"],"author":{"name":"Muneeb Samuels"},"license":"MIT","_id":"@csrf-armor/core@1.0.0","maintainers":[{"name":"muneeb_samuels","email":"muneeb@nebz.dev"}],"homepage":"https://github.com/muneebs/csrf-armor#readme","bugs":{"url":"https://github.com/muneebs/csrf-armor/issues"},"dist":{"shasum":"c96bfa3a659c94110d7f81028ad37ce3ce9650e6","tarball":"https://registry.npmjs.org/@csrf-armor/core/-/core-1.0.0.tgz","fileCount":27,"integrity":"sha512-6qaXb2j7G4wV6IN5vBu+lDxy47q47ZXoRoT8NeC0iyJCn5Nw1ShRmsN2fWnWo0dlOKDJiXGj/40LWykfXPjgJQ==","signatures":[{"sig":"MEUCIQCGC8+Dcf2REK0UIGcR4IaYforaNmXDUglBuh0dwUBYzAIgD9SvVpzcPzdttamO+JKIm7lugbrTiE+wvdfDT1J2cCM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":67791},"main":"./dist/index.js","type":"module","_from":"file:csrf-armor-core-1.0.0.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18.0.0"},"exports":{".":"./dist/index.js","./package.json":"./package.json"},"scripts":{"test":"vitest --run","build":"tsdown","clean":"rm -rf dist tsconfig.tsbuildinfo","test:watch":"vitest","type-check":"tsc --noEmit","test:coverage":"vitest run --coverage"},"_npmUser":{"name":"muneeb_samuels","email":"muneeb@nebz.dev"},"_resolved":"/tmp/8f94a0d6ce70fbf4935173de06e4aa80/csrf-armor-core-1.0.0.tgz","_integrity":"sha512-6qaXb2j7G4wV6IN5vBu+lDxy47q47ZXoRoT8NeC0iyJCn5Nw1ShRmsN2fWnWo0dlOKDJiXGj/40LWykfXPjgJQ==","repository":{"url":"git+https://github.com/muneebs/csrf-armor.git","type":"git","directory":"packages/core"},"_npmVersion":"10.8.2","description":"Framework-agnostic CSRF protection core functionality","directories":{},"_nodeVersion":"20.19.1","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"tsdown":"^0.12.6","typescript":"^5"},"_npmOperationalInternal":{"tmp":"tmp/core_1.0.0_1748951067532_0.260594297080337","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@csrf-armor/core","version":"1.0.1","keywords":["csrf","security","protection","framework-agnostic","token","validation"],"author":{"name":"Muneeb Samuels"},"license":"MIT","_id":"@csrf-armor/core@1.0.1","maintainers":[{"name":"muneeb_samuels","email":"muneeb@nebz.dev"}],"homepage":"https://github.com/muneebs/csrf-armor#readme","bugs":{"url":"https://github.com/muneebs/csrf-armor/issues"},"dist":{"shasum":"00f6a4a5c9d6124ba62dcccc890c44b507cefc2f","tarball":"https://registry.npmjs.org/@csrf-armor/core/-/core-1.0.1.tgz","fileCount":27,"integrity":"sha512-cPxhXVWxkFKRn4ewORJGToRYf1taBAhyk/9wKaad+skGhJKlGPrzUcDDBweZKHagckXW7ulGBVWNQsB6AblA5g==","signatures":[{"sig":"MEUCIQCEIzfVS+VrGuxQ2M6oZlMIDCeBnzm8y0BdjdejCQSqLwIgKkB4ydPctVg5TxlHadFEdqML5uNUKsn3kHUbSFx8NNE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":67186},"main":"./dist/index.js","type":"module","_from":"file:csrf-armor-core-1.0.1.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18.0.0"},"exports":{".":"./dist/index.js","./package.json":"./package.json"},"scripts":{"test":"vitest --run","build":"tsdown","clean":"rm -rf dist tsconfig.tsbuildinfo","test:watch":"vitest","type-check":"tsc --noEmit","test:coverage":"vitest run --coverage"},"_npmUser":{"name":"muneeb_samuels","email":"muneeb@nebz.dev"},"_resolved":"/tmp/217b8021d322991bcfe3dcd159abc144/csrf-armor-core-1.0.1.tgz","_integrity":"sha512-cPxhXVWxkFKRn4ewORJGToRYf1taBAhyk/9wKaad+skGhJKlGPrzUcDDBweZKHagckXW7ulGBVWNQsB6AblA5g==","repository":{"url":"git+https://github.com/muneebs/csrf-armor.git","type":"git","directory":"packages/core"},"_npmVersion":"10.8.2","description":"Framework-agnostic CSRF protection core functionality","directories":{},"_nodeVersion":"20.19.1","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"tsdown":"^0.12.6","typescript":"^5"},"_npmOperationalInternal":{"tmp":"tmp/core_1.0.1_1748954300806_0.17855319261260028","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@csrf-armor/core","version":"1.0.2","keywords":["csrf","security","protection","framework-agnostic","token","validation"],"author":{"name":"Muneeb Samuels"},"license":"MIT","_id":"@csrf-armor/core@1.0.2","maintainers":[{"name":"muneeb_samuels","email":"muneeb@nebz.dev"}],"homepage":"https://github.com/muneebs/csrf-armor#readme","bugs":{"url":"https://github.com/muneebs/csrf-armor/issues"},"dist":{"shasum":"550fc93d6d1026ae6e7e5821fce85241dee5b94c","tarball":"https://registry.npmjs.org/@csrf-armor/core/-/core-1.0.2.tgz","fileCount":27,"integrity":"sha512-4V/af+9wfUnjSS8CKc4OiIIS9soD902vTV+c8sAJUpscpVtBse/rQcm8XpJ2kmnajW7+2/LhH3D8vGZD7ucWDg==","signatures":[{"sig":"MEUCIHNBXpSarNmVtnRPuEPvdjL7HyJ5YArPsMTcAHr2MrQ4AiEAxmpVObY8qM1MrjRRbbvOgr+4tTiZiiMChBYTpWXXtQE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":67236},"main":"./dist/index.js","type":"module","_from":"file:csrf-armor-core-1.0.2.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18.0.0"},"exports":{".":"./dist/index.js","./package.json":"./package.json"},"scripts":{"test":"vitest --run","build":"tsdown","clean":"rm -rf dist tsconfig.tsbuildinfo","test:watch":"vitest","type-check":"tsc --noEmit","test:coverage":"vitest run --coverage"},"_npmUser":{"name":"muneeb_samuels","email":"muneeb@nebz.dev"},"_resolved":"/tmp/3f0b996307a34984670678cf8676409e/csrf-armor-core-1.0.2.tgz","_integrity":"sha512-4V/af+9wfUnjSS8CKc4OiIIS9soD902vTV+c8sAJUpscpVtBse/rQcm8XpJ2kmnajW7+2/LhH3D8vGZD7ucWDg==","repository":{"url":"git+https://github.com/muneebs/csrf-armor.git","type":"git","directory":"packages/core"},"_npmVersion":"10.8.2","description":"Framework-agnostic CSRF protection core functionality","directories":{},"_nodeVersion":"20.19.1","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"tsdown":"^0.12.6","typescript":"^5"},"_npmOperationalInternal":{"tmp":"tmp/core_1.0.2_1748994286935_0.3950631401235738","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"@csrf-armor/core","version":"1.0.3","keywords":["csrf","security","protection","framework-agnostic","token","validation"],"author":{"name":"Muneeb Samuels"},"license":"MIT","_id":"@csrf-armor/core@1.0.3","maintainers":[{"name":"muneeb_samuels","email":"muneeb@nebz.dev"}],"homepage":"https://github.com/muneebs/csrf-armor#readme","bugs":{"url":"https://github.com/muneebs/csrf-armor/issues"},"dist":{"shasum":"cab57c6fed23ecae15db86481683b625d3b64e9d","tarball":"https://registry.npmjs.org/@csrf-armor/core/-/core-1.0.3.tgz","fileCount":27,"integrity":"sha512-5a/G2cBdLhJ3Y709hbjGtrCVUB5aegNLd3InNb9eSqCRovsJpp+LZQM4sbIb45DxIX4gPurieApjOpRuue6FjA==","signatures":[{"sig":"MEUCIQC0mZ+qDvOj210sYMwrDYsXcs8mBtY6lOnQjZbcR/4Z7wIgay05+NzOLJNUBT1V0hmoi+F6rlN9qKdzvsP7V7Bk+Kg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":67231},"main":"./dist/index.js","type":"module","_from":"file:csrf-armor-core-1.0.3.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18.0.0"},"exports":{".":"./dist/index.js","./package.json":"./package.json"},"scripts":{"test":"vitest --run","build":"tsdown","clean":"rm -rf dist tsconfig.tsbuildinfo","test:watch":"vitest","type-check":"tsc --noEmit","test:coverage":"vitest run --coverage"},"_npmUser":{"name":"muneeb_samuels","email":"muneeb@nebz.dev"},"_resolved":"/tmp/6379806b0d2c27075eab537778e19a2b/csrf-armor-core-1.0.3.tgz","_integrity":"sha512-5a/G2cBdLhJ3Y709hbjGtrCVUB5aegNLd3InNb9eSqCRovsJpp+LZQM4sbIb45DxIX4gPurieApjOpRuue6FjA==","repository":{"url":"git+https://github.com/muneebs/csrf-armor.git","type":"git","directory":"packages/core"},"_npmVersion":"10.8.2","description":"Framework-agnostic CSRF protection core functionality","directories":{},"_nodeVersion":"20.19.1","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"tsdown":"^0.12.6","typescript":"^5"},"_npmOperationalInternal":{"tmp":"tmp/core_1.0.3_1749132193631_0.47283268116431687","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"@csrf-armor/core","version":"1.1.0","keywords":["csrf","security","protection","framework-agnostic","token","validation"],"author":{"name":"Muneeb Samuels"},"license":"MIT","_id":"@csrf-armor/core@1.1.0","maintainers":[{"name":"muneeb_samuels","email":"muneeb@nebz.dev"}],"homepage":"https://github.com/muneebs/csrf-armor#readme","bugs":{"url":"https://github.com/muneebs/csrf-armor/issues"},"dist":{"shasum":"3a6ee582ee0be641d8258fc65aab74dbcee2d0a0","tarball":"https://registry.npmjs.org/@csrf-armor/core/-/core-1.1.0.tgz","fileCount":27,"integrity":"sha512-We4iTrkMEUxhU7CjsUw7gAgKNKF+VTnw43q+si7MyYvA6bfRT7oOjd5zXTYFtXEVyRA+AJwbmXnks8hCD/caiw==","signatures":[{"sig":"MEUCIFPSpwO3sjkr14l+yoCCtRnEpLJZEpczt0QRQglYo07uAiEA+BO0q52C69K+E8RS/3WD6BUbEQ53LV9w7ZN9A11Tq/Y=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":67231},"main":"./dist/index.js","type":"module","_from":"file:csrf-armor-core-1.1.0.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18.0.0"},"exports":{".":"./dist/index.js","./package.json":"./package.json"},"scripts":{"test":"vitest --run","build":"tsdown","clean":"rm -rf dist tsconfig.tsbuildinfo","test:watch":"vitest","type-check":"tsc --noEmit","test:coverage":"vitest run --coverage"},"_npmUser":{"name":"muneeb_samuels","email":"muneeb@nebz.dev"},"_resolved":"/tmp/15e565223918633b09332540dfa3f446/csrf-armor-core-1.1.0.tgz","_integrity":"sha512-We4iTrkMEUxhU7CjsUw7gAgKNKF+VTnw43q+si7MyYvA6bfRT7oOjd5zXTYFtXEVyRA+AJwbmXnks8hCD/caiw==","repository":{"url":"git+https://github.com/muneebs/csrf-armor.git","type":"git","directory":"packages/core"},"_npmVersion":"10.8.2","description":"Framework-agnostic CSRF protection core functionality","directories":{},"_nodeVersion":"20.19.2","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"tsdown":"^0.12.6","typescript":"^5"},"_npmOperationalInternal":{"tmp":"tmp/core_1.1.0_1749821872555_0.3513168988741888","host":"s3://npm-registry-packages-npm-production"}},"1.2.0":{"name":"@csrf-armor/core","version":"1.2.0","keywords":["csrf","security","protection","framework-agnostic","token","validation"],"author":{"name":"Muneeb Samuels"},"license":"MIT","_id":"@csrf-armor/core@1.2.0","maintainers":[{"name":"muneeb_samuels","email":"muneeb@nebz.dev"}],"homepage":"https://github.com/muneebs/csrf-armor#readme","bugs":{"url":"https://github.com/muneebs/csrf-armor/issues"},"dist":{"shasum":"89c5be357402bd1e12f0c90194069602de229afc","tarball":"https://registry.npmjs.org/@csrf-armor/core/-/core-1.2.0.tgz","fileCount":27,"integrity":"sha512-B6TV+/CDkrzidjr0+SzuGtI4naUnfnijweeouTVmxNR+w5SQA8Ap7imp++21C+FL/alG3kTQHL549LwVo8EjGQ==","signatures":[{"sig":"MEYCIQDD7J+li5q3MLOGnB/8vFffGs0YVNMoCWgHPBj6Pa0ogQIhAJZ+kSeurR/Hz28EP0KSLDytzCyXiXqPlI5Le+mtNhVQ","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":134091},"main":"./dist/index.js","type":"module","_from":"file:csrf-armor-core-1.2.0.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18.0.0"},"exports":{".":"./dist/index.js","./package.json":"./package.json"},"scripts":{"test":"vitest --run","build":"tsdown","clean":"rm -rf dist tsconfig.tsbuildinfo","test:watch":"vitest","type-check":"tsc --noEmit","test:coverage":"vitest run --coverage"},"_npmUser":{"name":"muneeb_samuels","email":"muneeb@nebz.dev"},"_resolved":"/tmp/f738eccf13b9adfe5dd5dbe8f0ddb198/csrf-armor-core-1.2.0.tgz","_integrity":"sha512-B6TV+/CDkrzidjr0+SzuGtI4naUnfnijweeouTVmxNR+w5SQA8Ap7imp++21C+FL/alG3kTQHL549LwVo8EjGQ==","repository":{"url":"git+https://github.com/muneebs/csrf-armor.git","type":"git","directory":"packages/core"},"_npmVersion":"10.8.2","description":"Framework-agnostic CSRF protection core functionality","directories":{},"_nodeVersion":"20.19.2","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"tsdown":"^0.12.6","typescript":"^5"},"_npmOperationalInternal":{"tmp":"tmp/core_1.2.0_1750026217794_0.390583235978865","host":"s3://npm-registry-packages-npm-production"}},"1.2.1":{"name":"@csrf-armor/core","version":"1.2.1","keywords":["csrf","security","protection","framework-agnostic","token","validation"],"author":{"name":"Muneeb Samuels"},"license":"MIT","_id":"@csrf-armor/core@1.2.1","maintainers":[{"name":"muneeb_samuels","email":"muneeb@nebz.dev"}],"homepage":"https://github.com/muneebs/csrf-armor#readme","bugs":{"url":"https://github.com/muneebs/csrf-armor/issues"},"dist":{"shasum":"8f0e4f95acd60eb930dcf3e9f93126be0e5e35a5","tarball":"https://registry.npmjs.org/@csrf-armor/core/-/core-1.2.1.tgz","fileCount":27,"integrity":"sha512-TzCDap0phs6IDAm6iHv73Ls7jZsH+9uUe4/L/0BGJ6MnUZurP11fi2sB1mw7IgQR1vZi6fBB0pOXtsp9nifCcg==","signatures":[{"sig":"MEUCIQDuLrVkhvSxntf5LruHH9qBhjsesh9DE6wD48/cEAmvkAIgBVa9fLPtI7nAhBo8CT5Gq+rC2X+pp22lUyLcWSuzMWY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":133384},"main":"./dist/index.mjs","type":"module","_from":"file:csrf-armor-core-1.2.1.tgz","types":"./dist/index.d.mts","module":"./dist/index.mjs","engines":{"node":">=18.0.0"},"exports":{".":"./dist/index.mjs","./package.json":"./package.json"},"scripts":{"test":"vitest --run","build":"tsdown","clean":"rm -rf dist tsconfig.tsbuildinfo","test:watch":"vitest","type-check":"tsc --noEmit","test:coverage":"vitest run --coverage"},"_npmUser":{"name":"muneeb_samuels","email":"muneeb@nebz.dev"},"_resolved":"/tmp/3ed7e59a4e2f50065ffb74bd299bda53/csrf-armor-core-1.2.1.tgz","_integrity":"sha512-TzCDap0phs6IDAm6iHv73Ls7jZsH+9uUe4/L/0BGJ6MnUZurP11fi2sB1mw7IgQR1vZi6fBB0pOXtsp9nifCcg==","repository":{"url":"git+https://github.com/muneebs/csrf-armor.git","type":"git","directory":"packages/core"},"_npmVersion":"10.8.2","description":"Framework-agnostic CSRF protection core functionality","directories":{},"_nodeVersion":"20.20.0","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"tsdown":"^0.20.1","typescript":"^5"},"_npmOperationalInternal":{"tmp":"tmp/core_1.2.1_1769911359889_0.30835247255398457","host":"s3://npm-registry-packages-npm-production"}},"1.2.2":{"name":"@csrf-armor/core","version":"1.2.2","keywords":["csrf","security","protection","framework-agnostic","token","validation"],"author":{"name":"Muneeb Samuels"},"license":"MIT","_id":"@csrf-armor/core@1.2.2","maintainers":[{"name":"muneeb_samuels","email":"muneeb@nebz.dev"}],"homepage":"https://github.com/muneebs/csrf-armor#readme","bugs":{"url":"https://github.com/muneebs/csrf-armor/issues"},"dist":{"shasum":"ace614115dd819eda62cc9f3d18117fcb38249a4","tarball":"https://registry.npmjs.org/@csrf-armor/core/-/core-1.2.2.tgz","fileCount":27,"integrity":"sha512-+PH2dLzyhXWLVZL6XwPrCqypwgS05/F34QbQoJjUghgmXx4Ki/zmNgp2wAatB8bFo0Ovz6MuX3okQZhYoFfxBQ==","signatures":[{"sig":"MEQCIH159cKruNm9QqRWfuiox6FIDOSiJHpv0NK98KD3FTA3AiAxfc0IqR/YyLBlSJBvBBt9nyobsJLz85ys5E73Snz1fQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":133384},"main":"./dist/index.mjs","type":"module","_from":"file:csrf-armor-core-1.2.2.tgz","types":"./dist/index.d.mts","module":"./dist/index.mjs","engines":{"node":">=18.0.0"},"exports":{".":"./dist/index.mjs","./package.json":"./package.json"},"scripts":{"test":"vitest --run","build":"tsdown","clean":"rm -rf dist tsconfig.tsbuildinfo","test:watch":"vitest","type-check":"tsc --noEmit","test:coverage":"vitest run --coverage"},"_npmUser":{"name":"muneeb_samuels","email":"muneeb@nebz.dev"},"_resolved":"/tmp/faf43e3c9a53120726fd6dfc2a017bb8/csrf-armor-core-1.2.2.tgz","_integrity":"sha512-+PH2dLzyhXWLVZL6XwPrCqypwgS05/F34QbQoJjUghgmXx4Ki/zmNgp2wAatB8bFo0Ovz6MuX3okQZhYoFfxBQ==","repository":{"url":"git+https://github.com/muneebs/csrf-armor.git","type":"git","directory":"packages/core"},"_npmVersion":"10.8.2","description":"Framework-agnostic CSRF protection core functionality","directories":{},"_nodeVersion":"20.20.2","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"tsdown":"^0.20.1","typescript":"^5"},"_npmOperationalInternal":{"tmp":"tmp/core_1.2.2_1775393606602_0.1661224265482033","host":"s3://npm-registry-packages-npm-production"}},"1.2.3":{"name":"@csrf-armor/core","version":"1.2.3","keywords":["csrf","security","protection","framework-agnostic","token","validation"],"author":{"name":"Muneeb Samuels"},"license":"MIT","_id":"@csrf-armor/core@1.2.3","maintainers":[{"name":"muneeb_samuels","email":"muneeb@nebz.dev"}],"homepage":"https://github.com/muneebs/csrf-armor#readme","bugs":{"url":"https://github.com/muneebs/csrf-armor/issues"},"dist":{"shasum":"0ae1a8e8fcb7fe2d27a68ea3737648f7c004ba29","tarball":"https://registry.npmjs.org/@csrf-armor/core/-/core-1.2.3.tgz","fileCount":27,"integrity":"sha512-a2U4MgNsgwFOdHJkGDtaie1IFfE2Y6E2XJbV9feQ0X9baHcCASxIq+z90PZDQKdcPvPAZekl9jbyeAV/XS3tLA==","signatures":[{"sig":"MEYCIQCXPbNXb5Y0adO/mcJCa/e0I7fL9gvi7NHZcVMu+6kN7AIhAJLgvTW93owqDpwJIGn9ypl0dYoee7eCl8luPEJSPhI/","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":133384},"main":"./dist/index.mjs","type":"module","_from":"file:csrf-armor-core-1.2.3.tgz","types":"./dist/index.d.mts","module":"./dist/index.mjs","engines":{"node":">=18.0.0"},"exports":{".":"./dist/index.mjs","./package.json":"./package.json"},"scripts":{"test":"vitest --run","build":"tsdown","clean":"rm -rf dist tsconfig.tsbuildinfo","test:watch":"vitest","type-check":"tsc --noEmit","test:coverage":"vitest run --coverage"},"_npmUser":{"name":"muneeb_samuels","email":"muneeb@nebz.dev"},"_resolved":"/tmp/90b396893f9f79d6cff71d442ec3d339/csrf-armor-core-1.2.3.tgz","_integrity":"sha512-a2U4MgNsgwFOdHJkGDtaie1IFfE2Y6E2XJbV9feQ0X9baHcCASxIq+z90PZDQKdcPvPAZekl9jbyeAV/XS3tLA==","repository":{"url":"git+https://github.com/muneebs/csrf-armor.git","type":"git","directory":"packages/core"},"_npmVersion":"10.8.2","description":"Framework-agnostic CSRF protection core functionality","directories":{},"_nodeVersion":"20.20.2","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"tsdown":"^0.20.1","typescript":"^5"},"_npmOperationalInternal":{"tmp":"tmp/core_1.2.3_1776813816569_0.1464347329155482","host":"s3://npm-registry-packages-npm-production"}},"1.2.4":{"name":"@csrf-armor/core","version":"1.2.4","description":"Framework-agnostic CSRF protection core functionality","type":"module","main":"./dist/index.mjs","types":"./dist/index.d.mts","exports":{".":"./dist/index.mjs","./package.json":"./package.json"},"keywords":["csrf","security","protection","framework-agnostic","token","validation"],"author":{"name":"Muneeb Samuels"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/muneebs/csrf-armor.git","directory":"packages/core"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"bugs":{"url":"https://github.com/muneebs/csrf-armor/issues"},"homepage":"https://github.com/muneebs/csrf-armor#readme","engines":{"node":">=18.0.0"},"devDependencies":{"tsdown":"^0.22.14","typescript":"^7"},"module":"./dist/index.mjs","scripts":{"build":"tsdown","test":"vitest --run","test:watch":"vitest","test:coverage":"vitest run --coverage","type-check":"tsc --noEmit","clean":"rm -rf dist tsconfig.tsbuildinfo"},"_id":"@csrf-armor/core@1.2.4","_integrity":"sha512-b6Uctk4gq4wTItlrpSCm/JP6kpVYBValoCEzmtdT1zKyw4/JbdlX/5eawVskuPwXQhtAF1E7rJwVrUPb6FeKyA==","_resolved":"/tmp/755fbd0d50adc77746e37cbcaac13102/csrf-armor-core-1.2.4.tgz","_from":"file:csrf-armor-core-1.2.4.tgz","_nodeVersion":"24.19.0","_npmVersion":"11.17.0","dist":{"integrity":"sha512-b6Uctk4gq4wTItlrpSCm/JP6kpVYBValoCEzmtdT1zKyw4/JbdlX/5eawVskuPwXQhtAF1E7rJwVrUPb6FeKyA==","shasum":"623ef58e645430125dd3bffe6f51ddceb588b6c4","tarball":"https://registry.npmjs.org/@csrf-armor/core/-/core-1.2.4.tgz","fileCount":27,"unpackedSize":132223,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@csrf-armor%2fcore@1.2.4","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCZ9heVZmRy89mSue1+9BDrLLVAsXliFKYi8brFO9p/JgIgSH6AqjdGuQCtiD+IbM4nM6+OI2EhUac6hRPnAVBJk0Y="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:a184162e-e62b-4816-9f6a-0e99b7114204"}},"directories":{},"maintainers":[{"name":"muneeb_samuels","email":"muneeb@nebz.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/core_1.2.4_1786094130204_0.33709665222053053"},"_hasShrinkwrap":false}},"time":{"created":"2025-06-02T21:03:40.159Z","modified":"2026-08-07T09:15:30.937Z","0.0.1":"2025-06-02T21:03:40.458Z","1.0.0":"2025-06-03T11:44:27.744Z","1.0.1":"2025-06-03T12:38:20.978Z","1.0.2":"2025-06-03T23:44:47.127Z","1.0.3":"2025-06-05T14:03:13.828Z","1.1.0":"2025-06-13T13:37:52.783Z","1.2.0":"2025-06-15T22:23:37.995Z","1.2.1":"2026-02-01T02:02:40.030Z","1.2.2":"2026-04-05T12:53:26.735Z","1.2.3":"2026-04-21T23:23:36.724Z","1.2.4":"2026-08-07T09:15:30.367Z"},"bugs":{"url":"https://github.com/muneebs/csrf-armor/issues"},"author":{"name":"Muneeb Samuels"},"license":"MIT","homepage":"https://github.com/muneebs/csrf-armor#readme","keywords":["csrf","security","protection","framework-agnostic","token","validation"],"repository":{"type":"git","url":"git+https://github.com/muneebs/csrf-armor.git","directory":"packages/core"},"description":"Framework-agnostic CSRF protection core functionality","maintainers":[{"name":"muneeb_samuels","email":"muneeb@nebz.dev"}],"readme":"# @csrf-armor/core\n\n<img src=\"https://cdn.nebz.dev/csrf-armor/logo.jpeg\" alt=\"CSRF Armor\" />\n\n[![CodeQL](https://github.com/muneebs/csrf-armor/workflows/CodeQL%20Security%20Analysis/badge.svg)](https://github.com/muneebs/csrf-armor/actions/workflows/codeql-analysis.yml)\n[![CI](https://github.com/muneebs/csrf-armor/workflows/CI/badge.svg)](https://github.com/muneebs/csrf-armor/actions/workflows/ci.yml)\n[![npm version](https://img.shields.io/npm/v/@csrf-armor/core.svg)](https://www.npmjs.com/package/@csrf-armor/core)\n[![TypeScript](https://img.shields.io/badge/TypeScript-Ready-blue.svg)](https://www.typescriptlang.org/)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\n**Framework-agnostic CSRF protection with multiple security strategies and zero dependencies.**\n\nBuilt for modern web applications that need flexible, high-performance CSRF protection without vendor lock-in.\n\n## 🚀 Quick Start\n\n```bash\nnpm install @csrf-armor/core\n```\n\n```typescript\nimport { generateSignedToken, parseSignedToken } from '@csrf-armor/core';\n\n// Generate a secure token\nconst token = await generateSignedToken('your-32-char-secret', 3600);\n\n// Validate the token later\nconst payload = await parseSignedToken(submittedToken, 'your-32-char-secret');\nconsole.log('Token valid until:', new Date(payload.exp * 1000));\n```\n\n> **⚠️ SECURITY WARNING**: Use a strong secret in production! Generate with `crypto.getRandomValues(new Uint8Array(32))`.\n\n---\n\n## 🛡️ Choose Your Strategy\n\n| Strategy | Security | Performance | Best For | Setup Complexity |\n|----------|----------|-------------|----------|------------------|\n| **Signed Double Submit** ⭐ | ⭐⭐⭐⭐⭐ | ⭐⭐⭐⭐ | E-commerce, finance | Medium |\n| **Double Submit** | ⭐ | ⭐⭐⭐⭐⭐ | Local development | Easy |\n| **Signed Token** | ⭐⭐⭐⭐ | ⭐⭐⭐⭐ | APIs, microservices | Medium |\n| **Origin Check** | ⭐⭐⭐ | ⭐⭐⭐⭐⭐ | Mobile backends | Easy |\n| **Hybrid** | ⭐⭐⭐⭐⭐ | ⭐⭐⭐ | Maximum security | Hard |\n\n---\n\n## 🔧 Framework Integration\n\n### Express.js\n\n> **💡 Complete Express.js solution**: [@csrf-armor/express](../express) with React hooks and simplified setup.\n\n### Next.js\n\n> **💡 Complete Next.js solution**: [@csrf-armor/nextjs](../nextjs) with React hooks and simplified setup.\n\n**🔌 More framework examples and adapters**: [Advanced Configuration Guide →](./docs/ADVANCED.md)\n\n---\n\n## ⚙️ Configuration\n\n### Basic Setup\n\n```typescript\nimport { createCsrfProtection } from '@csrf-armor/core';\n\n// Recommended for most applications\nconst csrfProtection = createCsrfProtection(adapter, {\n  strategy: 'signed-double-submit',\n  secret: process.env.CSRF_SECRET!, // ⚠️ Required in production\n  cookie: {\n    secure: true,      // HTTPS only\n    sameSite: 'strict' // Strict same-site policy\n  }\n});\n```\n\n### Strategy-Specific Configuration\n\n```typescript\n// High Security (Financial, Healthcare)\n{ strategy: 'hybrid', secret: process.env.CSRF_SECRET!, allowedOrigins: ['https://app.com'] }\n\n// High Performance (Public APIs)  \n{ strategy: 'origin-check', allowedOrigins: ['https://mobile.app'] }\n\n// Balanced (Most Web Apps)\n{ strategy: 'signed-double-submit', secret: process.env.CSRF_SECRET! }\n\n// Development\n{ strategy: 'double-submit', cookie: { secure: false } }\n```\n\n**📚 Complete configuration options**: [Advanced Configuration Guide →](./docs/ADVANCED.md)\n\n---\n\n## 🔍 Common Issues\n\n### ❓ Getting \"Token mismatch\" errors?\n\n```typescript\n// Ensure your adapter extracts tokens from all sources\nasync getTokenFromRequest(request: CsrfRequest, config: RequiredCsrfConfig) {\n  const headers = request.headers instanceof Map \n    ? request.headers \n    : new Map(Object.entries(request.headers));\n\n  // Try header first\n  const headerValue = headers.get(config.token.headerName.toLowerCase());\n  if (headerValue) return headerValue;\n\n  // Try form data\n  if (request.body && typeof request.body === 'object') {\n    const body = request.body as Record<string, unknown>;\n    const formValue = body[config.token.fieldName];\n    if (typeof formValue === 'string') return formValue;\n  }\n\n  return undefined;\n}\n```\n\n### ❓ Tokens not working across subdomains?\n\n```typescript\nconst config = {\n  cookie: {\n    domain: '.yourdomain.com', // Note the leading dot\n    sameSite: 'lax' // 'strict' blocks cross-subdomain\n  }\n};\n```\n\n### ❓ CSRF blocking legitimate requests?\n\n```typescript\nconst config = {\n  excludePaths: ['/api/webhooks', '/api/public', '/health'],\n  skipContentTypes: ['application/json'] // For JSON-only APIs\n};\n```\n\n### ❓ Performance issues?\n\nChoose a faster strategy or exclude read-only endpoints:\n\n```typescript\n// Option 1: Faster strategy\n{ strategy: 'double-submit' } // No crypto overhead\n\n// Option 2: Exclude read-only paths  \n{ excludePaths: ['/api/read', '/api/search'] }\n```\n\n---\n\n## 🧠 Core API\n\n### Token Functions\n\n```typescript\n// Generate signed tokens\nconst token = await generateSignedToken('secret', 3600);\n\n// Parse and validate\nconst payload = await parseSignedToken(token, 'secret');\nconsole.log('Expires:', new Date(payload.exp * 1000));\n\n// Generate random nonces\nconst nonce = generateNonce(32); // 64 hex characters\n```\n\n### Protection Class\n\n```typescript\nconst protection = createCsrfProtection(adapter, config);\nconst result = await protection.protect(request, response);\n\nif (result.success) {\n  console.log('CSRF token:', result.token);\n} else {\n  console.error('Validation failed:', result.reason);\n}\n```\n\n### Error Handling\n\n```typescript\nimport { TokenExpiredError, TokenInvalidError, OriginMismatchError } from '@csrf-armor/core';\n\ntry {\n  await parseSignedToken(token, secret);\n} catch (error) {\n  if (error instanceof TokenExpiredError) {\n    // Handle expired token\n  } else if (error instanceof TokenInvalidError) {\n    // Handle invalid signature\n  }\n}\n```\n\n**📖 Complete API documentation**: [Advanced Configuration Guide →](./docs/ADVANCED.md)\n\n---\n\n## 📚 Documentation\n\n- **[Advanced Configuration Guide](./docs/ADVANCED.md)** - Complex setups, custom strategies, all config options\n- **[Security Analysis](./docs/SECURITY.md)** - Security model deep-dive and best practices\n- **[Migration Guide](./docs/MIGRATION.md)** - How to migrate from existing CSRF libraries\n\n---\n\n## 🤝 Contributing\n\n**Community contributions welcome!** This project would benefit from:\n\n**🎯 High-Impact Contributions:**\n- **Framework adapters**: Express, Fastify, Koa, SvelteKit, Remix\n- **Performance optimizations**: Benchmark improvements, edge cases\n- **Security enhancements**: Vulnerability reports, new strategies\n- **Developer experience**: Better examples, TypeScript improvements\n\n**🚀 Getting Started:**\n1. Fork the repository\n2. Create a feature branch: `git checkout -b feature/express-adapter`\n3. Make your changes with tests\n4. Submit a PR with clear description\n\n**💬 Get Help:**\n- 🐛 [Report bugs](https://github.com/muneebs/csrf-armor/issues/new)\n- 💡 [Request features](https://github.com/muneebs/csrf-armor/issues/new)\n- 💬 [Ask questions](https://github.com/muneebs/csrf-armor/discussions)\n\n---\n\n## 📦 Related Packages\n\n- **[@csrf-armor/nextjs](../nextjs)** - Next.js App Router middleware and React hooks\n- **[@csrf-armor/express](../express)** - Express.js middleware adapter\n\n*More framework packages coming based on community demand and contributions!*\n\n---\n\n## 📄 License\n\nMIT © [Muneeb Samuels](https://github.com/muneebs)\n\n**Questions?** Open an issue or start a discussion!\n","readmeFilename":"README.md"}