{"_id":"@airdraft/auth","_rev":"10-9ddaea0e82e82dcbc7dd73c5c57647b7","name":"@airdraft/auth","dist-tags":{"latest":"0.1.9"},"versions":{"0.1.0":{"name":"@airdraft/auth","version":"0.1.0","license":"MIT","_id":"@airdraft/auth@0.1.0","maintainers":[{"name":"miracleio","email":"miracleficient@gmail.com"}],"dist":{"shasum":"4b233e4e9852f59ac53fa9c962bfb9d72c792eca","tarball":"https://registry.npmjs.org/@airdraft/auth/-/auth-0.1.0.tgz","fileCount":18,"integrity":"sha512-of+U1YVjZ/Rfjfnr+3amNF+MYWSXfPR1tjcqM1h6EvTlP8wMW6bu6/oQescIQd0yQasqXWqgxfVeL6tZn8YE5w==","signatures":[{"sig":"MEUCIQDmwwgdVgX66CteGVItEJ/vSuwcFdG8C6/bzFp9AsOx/QIgPyvSzydkd+kugD2X74e5k6RYGYJlrUyMRKU7HkouavI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":32872},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"d6c85dfed37f11c42151c93b49a80ede90699616","scripts":{"dev":"tsc --watch","test":"vitest run","build":"tsc","clean":"rm -rf dist","release":"standard-version","typecheck":"tsc --noEmit","test:watch":"vitest","release:major":"standard-version --release-as major","release:minor":"standard-version --release-as minor","release:patch":"standard-version --release-as patch","prepublishOnly":"npm run build"},"_npmUser":{"name":"miracleio","email":"miracleficient@gmail.com"},"_npmVersion":"11.9.0","description":"Airdraft authentication utilities — session, API key, embed token","directories":{},"_nodeVersion":"24.14.0","dependencies":{"zod":"^3.23.0","@airdraft/core":"*"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.7.0","vitest":"^1.5.0","typescript":"^5.4.0","@types/node":"^20.0.0","standard-version":"^9.5.0"},"_npmOperationalInternal":{"tmp":"tmp/auth_0.1.0_1779387914296_0.9636558206776464","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@airdraft/auth","version":"0.1.1","license":"MIT","_id":"@airdraft/auth@0.1.1","maintainers":[{"name":"miracleio","email":"miracleficient@gmail.com"}],"dist":{"shasum":"2a99ad5693c1d0596422746a4b3a11aacd074d79","tarball":"https://registry.npmjs.org/@airdraft/auth/-/auth-0.1.1.tgz","fileCount":18,"integrity":"sha512-r1nTZ0696QwePJvwvDgqxl5i9f23pEu7PwL+u+KJVwN2uxQBEE9FfWsDGTTAuNrOM3yQBCD8DaplBhtP9UphWw==","signatures":[{"sig":"MEYCIQCflXdfMaV/X/vPZ752jnr1sWtXHJur9weJTIpioA0t2gIhANT1Ng34G35s2M7k0TET071uYhw/BSQ6Z+sFJkivNCWj","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":36470},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"277e16b37c997996b49d90ec64fa3f5c023f4d0a","scripts":{"dev":"tsc --watch","test":"vitest run","build":"tsc","clean":"rm -rf dist","release":"standard-version","typecheck":"tsc --noEmit","test:watch":"vitest","release:major":"standard-version --release-as major","release:minor":"standard-version --release-as minor","release:patch":"standard-version --release-as patch","prepublishOnly":"npm run build"},"_npmUser":{"name":"miracleio","email":"miracleficient@gmail.com"},"_npmVersion":"11.9.0","description":"Airdraft authentication utilities — session, API key, embed token","directories":{},"_nodeVersion":"24.14.0","dependencies":{"zod":"^3.23.0","@airdraft/core":"*"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.7.0","vitest":"^1.5.0","typescript":"^5.4.0","@types/node":"^20.0.0","standard-version":"^9.5.0"},"_npmOperationalInternal":{"tmp":"tmp/auth_0.1.1_1779521507725_0.44873166981447454","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@airdraft/auth","version":"0.1.2","license":"MIT","_id":"@airdraft/auth@0.1.2","maintainers":[{"name":"miracleio","email":"miracleficient@gmail.com"}],"dist":{"shasum":"4cdf926514329b5c8db6cb4f0e23523a8a73dcf2","tarball":"https://registry.npmjs.org/@airdraft/auth/-/auth-0.1.2.tgz","fileCount":18,"integrity":"sha512-50vMSJL0l7M8nQi22bL4mGIskfGQFei7eSvAp0fyqj0kOZfzsfYucPrz5kDGb1FBnrbVLWA+26BZfnEu5BwzeQ==","signatures":[{"sig":"MEYCIQCZ1IY8/KgoBJEXStOPG6StDqAqzTIaiRFO+gisrmfTKwIhAKaHTH3iVkm0M6SVZvoeuUGBpkBaiPOYu/+tYG2oRPVg","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":37802},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"8d692f6e9c48b0c7886d404b7bbc9f1b0a79ca7b","scripts":{"dev":"tsc --watch","test":"vitest run","build":"tsc","clean":"rm -rf dist","release":"standard-version","typecheck":"tsc --noEmit","test:watch":"vitest","release:major":"standard-version --release-as major","release:minor":"standard-version --release-as minor","release:patch":"standard-version --release-as patch","prepublishOnly":"npm run build"},"_npmUser":{"name":"miracleio","email":"miracleficient@gmail.com"},"_npmVersion":"11.9.0","description":"Airdraft authentication utilities — session, API key, embed token","directories":{},"_nodeVersion":"24.14.0","dependencies":{"zod":"^3.23.0","@airdraft/core":"*"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.7.0","vitest":"^1.5.0","typescript":"^5.4.0","@types/node":"^20.0.0","standard-version":"^9.5.0"},"_npmOperationalInternal":{"tmp":"tmp/auth_0.1.2_1779557328303_0.3208328059380867","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"name":"@airdraft/auth","version":"0.1.3","license":"MIT","_id":"@airdraft/auth@0.1.3","maintainers":[{"name":"miracleio","email":"miracleficient@gmail.com"}],"dist":{"shasum":"0b0e272c1ae2c38fee22b6f4e81b50c89fbae1ee","tarball":"https://registry.npmjs.org/@airdraft/auth/-/auth-0.1.3.tgz","fileCount":18,"integrity":"sha512-2uKTPU7sS32lzqMKtDJcZ5wm+p7bL8T1O+xll4ir2FgKlH44G+f9gkmY+lNnRm9nnRtOegz9uHJ9TLCeuO+XaA==","signatures":[{"sig":"MEUCIQDdQ7AnE1Hz5Wf0EA41emZS5Ku0WSACSUlm566uNKD5ZQIgOuqBzPN95csxyRVz2Pbsw6q8jBbQ5a0gM6s99JolXDI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":38656},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"88185ba7e7a5ed54561a09a53f6d13367587bbfb","scripts":{"dev":"tsc --watch","test":"vitest run","build":"tsc","clean":"rm -rf dist","release":"standard-version","typecheck":"tsc --noEmit","test:watch":"vitest","release:major":"standard-version --release-as major","release:minor":"standard-version --release-as minor","release:patch":"standard-version --release-as patch","prepublishOnly":"npm run build"},"_npmUser":{"name":"miracleio","email":"miracleficient@gmail.com"},"_npmVersion":"11.9.0","description":"Airdraft authentication utilities — session, API key, embed token","directories":{},"_nodeVersion":"24.14.0","dependencies":{"zod":"^3.23.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.7.0","vitest":"^1.5.0","typescript":"^5.4.0","@types/node":"^20.0.0","@airdraft/core":"*","standard-version":"^9.5.0"},"peerDependencies":{"@airdraft/core":">=0.1.8"},"_npmOperationalInternal":{"tmp":"tmp/auth_0.1.3_1779564285721_0.627209071818531","host":"s3://npm-registry-packages-npm-production"}},"0.1.4":{"name":"@airdraft/auth","version":"0.1.4","license":"MIT","_id":"@airdraft/auth@0.1.4","maintainers":[{"name":"miracleio","email":"miracleficient@gmail.com"}],"dist":{"shasum":"b03706e2aa0317e46b922d95303b807927871cbd","tarball":"https://registry.npmjs.org/@airdraft/auth/-/auth-0.1.4.tgz","fileCount":18,"integrity":"sha512-+cVs3rHH7xIA4x8eiUs+Bc3XaSy9Hr0+4GGpAASCDtiosheX8KYxZ0U6ph1HFdDs64ioZREEqJEgrQWXBFHaYQ==","signatures":[{"sig":"MEYCIQDyRKOLheISQWPO9L6xHsbMnMasNxFdl8pLSuQ13XnkEQIhAJNv33Qhve9iyXD+kIx+3Ly7DuAH9XrbL9TN4ZKTg8RV","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":39329},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"829aab190f831c8d252be75e35c26b42715babe2","scripts":{"dev":"tsc --watch","test":"vitest run","build":"tsc","clean":"rm -rf dist","release":"standard-version","typecheck":"tsc --noEmit","test:watch":"vitest","release:major":"standard-version --release-as major","release:minor":"standard-version --release-as minor","release:patch":"standard-version --release-as patch","prepublishOnly":"npm run build"},"_npmUser":{"name":"miracleio","email":"miracleficient@gmail.com"},"_npmVersion":"11.9.0","description":"Airdraft authentication utilities — session, API key, embed token","directories":{},"_nodeVersion":"24.14.0","dependencies":{"zod":"^3.23.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.7.0","vitest":"^1.5.0","typescript":"^5.4.0","@types/node":"^20.0.0","@airdraft/core":"*","standard-version":"^9.5.0"},"peerDependencies":{"@airdraft/core":">=0.1.8"},"_npmOperationalInternal":{"tmp":"tmp/auth_0.1.4_1779570829078_0.08178319998591155","host":"s3://npm-registry-packages-npm-production"}},"0.1.5":{"name":"@airdraft/auth","version":"0.1.5","license":"MIT","_id":"@airdraft/auth@0.1.5","maintainers":[{"name":"miracleio","email":"miracleficient@gmail.com"}],"dist":{"shasum":"2ab67c0133c84ae64c97af620381dde3d07b3b2a","tarball":"https://registry.npmjs.org/@airdraft/auth/-/auth-0.1.5.tgz","fileCount":19,"integrity":"sha512-LR0OYrBSjLnFuDdzGvZaod/UAeRWXZKeH8oTZzysiB1yMMPJ4xUa+k2j6RJZ9bCZWI1/JR9jguldPx9tPAh7Rg==","signatures":[{"sig":"MEUCIHDjGGEYwCCe55gopiirMypTQ73n+1x1PeV7BVh/gdz/AiEAw0o50Fc/BqRzlSdaXo/tfo5HrMYCzcdokt196vke+js=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":48636},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"f7693c8d6ef7b185d4eadb25c4a39d154b263f89","scripts":{"dev":"tsc --watch","test":"vitest run","build":"tsc","clean":"rm -rf dist","release":"standard-version","typecheck":"tsc --noEmit","test:watch":"vitest","release:major":"standard-version --release-as major","release:minor":"standard-version --release-as minor","release:patch":"standard-version --release-as patch","prepublishOnly":"npm run build"},"_npmUser":{"name":"miracleio","email":"miracleficient@gmail.com"},"_npmVersion":"11.9.0","description":"Airdraft authentication utilities — session, API key, embed token","directories":{},"_nodeVersion":"24.14.0","dependencies":{"zod":"^3.23.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.7.0","vitest":"^1.5.0","typescript":"^5.4.0","@types/node":"^20.0.0","@airdraft/core":"*","standard-version":"^9.5.0"},"peerDependencies":{"@airdraft/core":">=0.1.8"},"_npmOperationalInternal":{"tmp":"tmp/auth_0.1.5_1780125485628_0.3878758287890356","host":"s3://npm-registry-packages-npm-production"}},"0.1.6":{"name":"@airdraft/auth","version":"0.1.6","license":"MIT","_id":"@airdraft/auth@0.1.6","maintainers":[{"name":"miracleio","email":"miracleficient@gmail.com"}],"dist":{"shasum":"d16380b377347f3032a862880f65c11812b43fdd","tarball":"https://registry.npmjs.org/@airdraft/auth/-/auth-0.1.6.tgz","fileCount":19,"integrity":"sha512-uQ3orXonT6cyWPsn33GeWfA16JYabP0arEtWezGK7IvFoGRAQ+4hGOerAP43BgFrCdSQy7om5G30GOMEw2KnHA==","signatures":[{"sig":"MEQCICsJuwCKxuDDPsDmvHeH6KfqyDnamwswRwxF5d6kK+6nAiBQ/p3h9SOTeIa7Hlk5uDOvU29l4DVFKny+XElO+is96Q==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":49051},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"8c9d4744b92db08fa725d40bc50f9ef0f1392e59","scripts":{"dev":"tsc --watch","test":"vitest run","build":"tsc","clean":"rm -rf dist","release":"standard-version","typecheck":"tsc --noEmit","test:watch":"vitest","release:major":"standard-version --release-as major","release:minor":"standard-version --release-as minor","release:patch":"standard-version --release-as patch","prepublishOnly":"npm run build"},"_npmUser":{"name":"miracleio","email":"miracleficient@gmail.com"},"_npmVersion":"11.9.0","description":"Airdraft authentication utilities — session, API key, embed token","directories":{},"_nodeVersion":"24.14.0","dependencies":{"zod":"^3.23.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.7.0","vitest":"^1.5.0","typescript":"^5.4.0","@types/node":"^20.0.0","@airdraft/core":"*","standard-version":"^9.5.0"},"peerDependencies":{"@airdraft/core":">=0.1.8"},"_npmOperationalInternal":{"tmp":"tmp/auth_0.1.6_1780221031494_0.9699264207349094","host":"s3://npm-registry-packages-npm-production"}},"0.1.7":{"name":"@airdraft/auth","version":"0.1.7","license":"MIT","_id":"@airdraft/auth@0.1.7","maintainers":[{"name":"miracleio","email":"miracleficient@gmail.com"}],"dist":{"shasum":"d81193cd5ea192e4e2709658ffba21588b3b363d","tarball":"https://registry.npmjs.org/@airdraft/auth/-/auth-0.1.7.tgz","fileCount":19,"integrity":"sha512-QiFgR6NXo1DXWvAcNtLl9nM7kS1ebec7ETLLsdJybJhw2l1IkIiNcfYWZviYRHM36gc1T2gWt8l1IEHsZAfLlQ==","signatures":[{"sig":"MEUCIQCxqoJMAWd8KgX1ZmkfNHH/8kUNWSd4eszaMw9IA07mcQIgLa9CW774iPJtOQuDcySms/cydp9Dohq8sYOtCVkqBS0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":51197},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"b440d92b589ede7b2419cdcde79995cd0c760516","scripts":{"dev":"tsc --watch","test":"vitest run","build":"tsc","clean":"rm -rf dist","release":"standard-version","typecheck":"tsc --noEmit","test:watch":"vitest","release:major":"standard-version --release-as major","release:minor":"standard-version --release-as minor","release:patch":"standard-version --release-as patch","prepublishOnly":"npm run build"},"_npmUser":{"name":"miracleio","email":"miracleficient@gmail.com"},"_npmVersion":"11.9.0","description":"Airdraft authentication utilities — session, API key, embed token","directories":{},"_nodeVersion":"24.14.0","dependencies":{"zod":"^3.23.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.7.0","vitest":"^1.5.0","typescript":"^5.4.0","@types/node":"^20.0.0","@airdraft/core":"*","standard-version":"^9.5.0"},"peerDependencies":{"@airdraft/core":">=0.1.8"},"_npmOperationalInternal":{"tmp":"tmp/auth_0.1.7_1780475801579_0.4933410068052715","host":"s3://npm-registry-packages-npm-production"}},"0.1.8":{"name":"@airdraft/auth","version":"0.1.8","license":"MIT","_id":"@airdraft/auth@0.1.8","maintainers":[{"name":"miracleio","email":"miracleficient@gmail.com"}],"dist":{"shasum":"3e95c296f33234294d0e931f0006c565ae922513","tarball":"https://registry.npmjs.org/@airdraft/auth/-/auth-0.1.8.tgz","fileCount":19,"integrity":"sha512-/mcCNREr69fDVxxP0eEx98fFjbgcqEyn3FDuXyqZpHCzqRVqTVJnkbX6Yjpwj7X2Sb1NrKWobYN2OU/5plG/SA==","signatures":[{"sig":"MEYCIQCSKWU+VKm4YHfk3ayOpfThgt5jovM4NATKTnHwgmJ/DwIhALE/7ev3FwIZK9yBmtmdZSpQsRtxYugmVi9XAHOnXxJ1","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":53058},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"9fdb3e0fbca1e58bb84aca8dd92155d0057ca4b1","scripts":{"dev":"tsc --watch","test":"vitest run","build":"tsc","clean":"rm -rf dist","release":"standard-version","typecheck":"tsc --noEmit","test:watch":"vitest","release:major":"standard-version --release-as major","release:minor":"standard-version --release-as minor","release:patch":"standard-version --release-as patch","prepublishOnly":"npm run build"},"_npmUser":{"name":"miracleio","email":"miracleficient@gmail.com"},"_npmVersion":"11.9.0","description":"Airdraft authentication utilities — session, API key, embed token","directories":{},"_nodeVersion":"24.14.0","dependencies":{"zod":"^3.23.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.7.0","vitest":"^1.5.0","typescript":"^5.4.0","@types/node":"^20.0.0","@airdraft/core":"*","standard-version":"^9.5.0"},"peerDependencies":{"@airdraft/core":">=0.1.8"},"_npmOperationalInternal":{"tmp":"tmp/auth_0.1.8_1782407202934_0.99774900724491","host":"s3://npm-registry-packages-npm-production"}},"0.1.9":{"_id":"@airdraft/auth@0.1.9","dist":{"shasum":"55456152c7996d119fe4d9c918a6622eed2226a6","tarball":"https://registry.npmjs.org/@airdraft/auth/-/auth-0.1.9.tgz","fileCount":19,"integrity":"sha512-C0yyo0CQA1cfDfGdZcBeEp6+1V+vsopoP42XQPIDh+Kbgz2sLMi5JoyscfF/6mHCEngb1ZltAoRyVScN8aMGVg==","signatures":[{"sig":"MEUCIAQGybSRqhNSXqpsjYkFYU/wwhkrRQoHJvtE+D47ilwjAiEAysqtmulzJqFt92kXmVLZ3gxu65mhy/O51FE3KzNXppc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIB84ZKgUPTxnx5XniMO/63F9N4v6mojvXYTpl0bwJztCAiEA+NZW5yjBqbD626aorjMGZfdxN52oX6twWcLlG+iI2Uw="}],"unpackedSize":53555},"main":"./dist/index.js","name":"@airdraft/auth","type":"module","types":"./dist/index.d.ts","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"b1f87e9ff84be997bf5677f4d616418bef10e557","license":"MIT","scripts":{"dev":"tsc --watch","test":"vitest run","build":"tsc","clean":"rm -rf dist","release":"standard-version","typecheck":"tsc --noEmit","test:watch":"vitest","release:major":"standard-version --release-as major","release:minor":"standard-version --release-as minor","release:patch":"standard-version --release-as patch","prepublishOnly":"npm run build"},"version":"0.1.9","_npmUser":{"name":"miracleio","email":"miracleficient@gmail.com"},"_npmVersion":"10.9.8","description":"Airdraft authentication utilities — session, API key, embed token","directories":{},"maintainers":[{"name":"miracleio","email":"miracleficient@gmail.com"}],"_nodeVersion":"22.23.2","dependencies":{"zod":"^3.23.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.7.0","vitest":"^5.0.0","typescript":"^5.4.0","@types/node":"^20.0.0","@airdraft/core":"*","standard-version":"^9.5.0"},"peerDependencies":{"@airdraft/core":">=0.1.8"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/auth_0.1.9_1789506623187_0.11762698035675934"}}},"time":{"created":"2026-05-21T18:25:14.174Z","modified":"2026-09-15T21:10:23.483Z","0.1.0":"2026-05-21T18:25:14.472Z","0.1.1":"2026-05-23T07:31:47.861Z","0.1.2":"2026-05-23T17:28:48.453Z","0.1.3":"2026-05-23T19:24:45.852Z","0.1.4":"2026-05-23T21:13:49.248Z","0.1.5":"2026-05-30T07:18:05.794Z","0.1.6":"2026-05-31T09:50:31.627Z","0.1.7":"2026-06-03T08:36:41.718Z","0.1.8":"2026-06-25T17:06:43.072Z","0.1.9":"2026-09-15T21:10:23.301Z"},"license":"MIT","description":"Airdraft authentication utilities — session, API key, embed token","maintainers":[{"name":"miracleio","email":"miracleficient@gmail.com"}],"readme":"# @airdraft/auth\n\nLow-level JWT utilities and RBAC types for Airdraft. Used internally by `@airdraft/plugin-auth` and `@airdraft/next`. You typically don't need this package directly unless you're building custom auth middleware or an Airdraft adapter.\n\n## Installation\n\n```bash\nnpm install @airdraft/auth\n```\n\n## RBAC\n\n### Roles\n\n```ts\ntype Role = 'admin' | 'publisher' | 'editor'\n```\n\n| Role | Description |\n|---|---|\n| `admin` | Full access — manage schema, team, and content |\n| `publisher` | Can publish and delete published entries; no team/schema management |\n| `editor` | Can create and edit drafts; cannot publish or delete published entries |\n\n### `RolePermissions`\n\n```ts\ninterface RolePermissions {\n  publish: boolean\n  deletePublished: boolean\n  manageSchema: boolean\n  manageTeam: boolean\n}\n```\n\n### `ROLE_PERMISSIONS`\n\n```ts\nimport { ROLE_PERMISSIONS } from '@airdraft/auth'\n\nROLE_PERMISSIONS.admin     // { publish: true, deletePublished: true, manageSchema: true, manageTeam: true }\nROLE_PERMISSIONS.publisher // { publish: true, deletePublished: true, manageSchema: false, manageTeam: false }\nROLE_PERMISSIONS.editor    // { publish: false, deletePublished: false, manageSchema: false, manageTeam: false }\n```\n\n### `can(user)`\n\nReturns `RolePermissions` for the given user:\n\n```ts\nimport { can } from '@airdraft/auth'\n\nconst perms = can(user)\nif (perms.manageTeam) { /* ... */ }\n```\n\n## Tokens\n\n### `signAccessToken(user, secret, ttl?)`\n\nSigns a JWT access token. TTL defaults to `ACCESS_TOKEN_TTL` (15 minutes).\n\n### `signRefreshToken()`\n\nGenerates a random opaque refresh token string.\n\n### `verifyAccessToken(token, secret)`\n\nReturns `AuthUser | null`. Returns `null` on expiry or invalid signature.\n\n### Token TTLs\n\n```ts\nimport { ACCESS_TOKEN_TTL, REFRESH_TOKEN_TTL } from '@airdraft/auth'\n\nACCESS_TOKEN_TTL   // 14400 seconds (4 hours)\nREFRESH_TOKEN_TTL  // 2592000 seconds (30 days)\n```\n\n## API Keys\n\n### `generateApiKey()`\n\nGenerates a new API key pair. The returned `key` is a secret to be given to the client; `hash` is a SHA-256 hex digest to store server-side.\n\n```ts\nimport { generateApiKey } from '@airdraft/auth'\n\nconst { key, hash } = generateApiKey()\n// key: 'ntk_<64-char-hex>' — send to client once\n// hash: '<sha256-hex>'    — store in database\n```\n\n### `verifyApiKey(raw, hash)`\n\nReturns `true` if the raw key matches the stored hash.\n\n```ts\nimport { verifyApiKey } from '@airdraft/auth'\n\nconst valid = verifyApiKey(incoming, stored.hash)\n```\n\n## Embed Tokens\n\nShort-lived **HMAC-SHA256 signed** tokens for public read-only embeds. Tokens are base64url-encoded and verified with `crypto.timingSafeEqual` to prevent timing attacks.\n\n```ts\nimport { generateEmbedToken, verifyEmbedToken } from '@airdraft/auth'\n\nconst token = generateEmbedToken(\n  {\n    projectId: 'proj_123',\n    allowedOrigin: 'https://my-site.com',\n    ttlSeconds: 3600,       // default 3600, max 86400\n    claims: { collections: ['posts'] },  // optional\n  },\n  process.env.EMBED_TOKEN_SECRET!,\n)\n\nconst result = verifyEmbedToken(token, process.env.EMBED_TOKEN_SECRET!, requestOrigin)\nif (result.valid) {\n  console.log(result.payload.projectId)\n} else {\n  // result.reason: 'expired' | 'origin_mismatch' | 'invalid_signature' | 'malformed'\n}\n```\n\n> **Breaking change (v0.1.5):** The embed token signature algorithm changed from a concatenated SHA-256 hash to proper HMAC-SHA256 (`createHmac`). Tokens issued by earlier versions will fail verification. Reissue any live embed tokens after upgrading.\n\n## Types\n\n```ts\ninterface AuthUser {\n  id: string\n  email: string\n  name?: string\n  role: Role\n  meta?: Record<string, unknown>\n}\n\ninterface ApiKeyPair {\n  key: string   // 'ntk_<64-char-hex>' — send to client once\n  hash: string  // SHA-256 hex digest — store server-side, never return to clients\n}\n```\n\n## Changelog\n\nSee [CHANGELOG.md](./CHANGELOG.md).\n","readmeFilename":"README.md"}