{"_id":"@cadriciel/module-auth","_rev":"5-5e267896f3b44d975ff874e85773b9a1","name":"@cadriciel/module-auth","dist-tags":{"latest":"0.3.2"},"versions":{"0.1.2":{"name":"@cadriciel/module-auth","version":"0.1.2","_id":"@cadriciel/module-auth@0.1.2","maintainers":[{"name":"stephane.zucatti","email":"stephane.zucatti@me.com"}],"dist":{"shasum":"01723708711181fd3fd83869ad4ce04e82eafc64","tarball":"https://registry.npmjs.org/@cadriciel/module-auth/-/module-auth-0.1.2.tgz","fileCount":38,"integrity":"sha512-IMWjf0XL04iUayY4O6um3nzJf83WnXvwMiYZXJvhb0kxjMpbc8uNwgs2pnY5snRrCWn+nnV5hjQq0jx3SelEbg==","signatures":[{"sig":"MEYCIQDy/2AOR1DUWAyL+I+t0X39f7V3CET7+S84tsM9zYb/6QIhAOJ+oGvLZsUd7vDleZvZiFz0pLgdGZ/rmQJT2tw+1I43","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":52586},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","gitHead":"f74e84fa30d74a84360e54c1ca70f1a9d1c6ce21","scripts":{"dev":"tsc --watch","test":"bun test","build":"tsc"},"_npmUser":{"name":"stephane.zucatti","email":"stephane.zucatti@me.com"},"_npmVersion":"10.8.2","directories":{},"_nodeVersion":"20.20.0","dependencies":{"jsonwebtoken":"^9.0.2","@cadriciel/kernel":"^0.1.3","@cadriciel/module-db":"^0.1.1"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.3.3","@types/node":"^20.11.16","@types/jsonwebtoken":"^9.0.5"},"_npmOperationalInternal":{"tmp":"tmp/module-auth_0.1.2_1769125568554_0.9178006349531951","host":"s3://npm-registry-packages-npm-production"}},"0.1.4":{"name":"@cadriciel/module-auth","version":"0.1.4","_id":"@cadriciel/module-auth@0.1.4","maintainers":[{"name":"stephane.zucatti","email":"stephane.zucatti@me.com"}],"dist":{"shasum":"5b944639315bd1b796152296f94aff3c48d809c9","tarball":"https://registry.npmjs.org/@cadriciel/module-auth/-/module-auth-0.1.4.tgz","fileCount":40,"integrity":"sha512-fXnOFHijAxX88J3WPqVWnKcSBCXtP/TCSJiEL3GpaEeyj9XrTn8FUlfnB7Rtrd4SUPPkDoN7b3QHKR6b0MccOg==","signatures":[{"sig":"MEUCIQCWJiggEktLvEowXzLQlrLhrGWZNXOkmgipzSI5QBwNIgIgBYwBXRnlFBsxuJ/WBLsnlHSeN3Bk/XO9gESwlq7Q0CA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":53580},"main":"src/index.ts","type":"module","types":"dist/index.d.ts","gitHead":"ee460fe33f2016308e40b69efe326982cee17e52","scripts":{"dev":"tsc --watch","test":"bun test","build":"tsc"},"_npmUser":{"name":"stephane.zucatti","email":"stephane.zucatti@me.com"},"_npmVersion":"10.8.2","description":"Enterprise-grade authentication and identity management for the Cadriciel framework, featuring **Keycloak** integration and JWT security.","directories":{},"_nodeVersion":"20.20.0","dependencies":{"jsonwebtoken":"^9.0.2","@cadriciel/kernel":"workspace:*","@cadriciel/module-db":"workspace:*"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.3.3","@types/node":"^20.11.16","@types/jsonwebtoken":"^9.0.5"},"_npmOperationalInternal":{"tmp":"tmp/module-auth_0.1.4_1769288269229_0.9052895348517493","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"name":"@cadriciel/module-auth","version":"0.2.1","_id":"@cadriciel/module-auth@0.2.1","maintainers":[{"name":"stephane.zucatti","email":"stephane.zucatti@me.com"}],"dist":{"shasum":"43efff2a5f917670558f5c2969f72a6c4c446af4","tarball":"https://registry.npmjs.org/@cadriciel/module-auth/-/module-auth-0.2.1.tgz","fileCount":11,"integrity":"sha512-rQXr/GwLfrTnpZBA4A/iZfugHhujsb0fFikOxLcOzpDs4aliLfSCYYcuXkdezwqjqKABW/V38d276slzV28f3w==","signatures":[{"sig":"MEQCIFmU4bwPduNk61amdHPYkFjWAQrBCZGW678M/LkNoQJMAiBDwtF0gW6V6AbOTyW3784cdQNx2mbtAKOjyz2z8U1XDQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":25839},"main":"src/index.ts","type":"module","types":"dist/index.d.ts","gitHead":"bc18f7cc510f309ee7547671ab2b526aba7b2ab5","scripts":{"dev":"tsc --watch","test":"bun test","build":"tsc"},"_npmUser":{"name":"stephane.zucatti","email":"stephane.zucatti@me.com"},"_npmVersion":"10.8.2","description":"Enterprise-grade authentication and identity management for the Cadriciel framework, featuring **Keycloak** integration and JWT security.","directories":{},"_nodeVersion":"20.20.0","dependencies":{"jsonwebtoken":"^9.0.2","@cadriciel/kernel":"^0.2.0","@cadriciel/module-db":"^0.2.1"},"_hasShrinkwrap":false,"devDependencies":{"hono":"^4.0.0","sequelize":"^6.37.5","typescript":"^5.3.3","@types/node":"^20.11.16","@types/jsonwebtoken":"^9.0.5"},"peerDependencies":{"hono":"^4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/module-auth_0.2.1_1769596727975_0.5941098693659017","host":"s3://npm-registry-packages-npm-production"}},"0.3.1":{"name":"@cadriciel/module-auth","version":"0.3.1","_id":"@cadriciel/module-auth@0.3.1","maintainers":[{"name":"stephane.zucatti","email":"stephane.zucatti@me.com"}],"dist":{"shasum":"bcee18fab3df0609b231a17922413988adf92905","tarball":"https://registry.npmjs.org/@cadriciel/module-auth/-/module-auth-0.3.1.tgz","fileCount":14,"integrity":"sha512-ivQmPMGLWY49eGHnZzyDGkV2IuJPEZgja4Lx2oZxsJ9wwQ3UgjUwcrXBokDZLCG9h4EauFAKDDw1+YIZSERLYg==","signatures":[{"sig":"MEUCIQDSm/GXR4Q2WFJvz4qiwOZzr5yEl/ky5DjAA41ZALbR4QIgbnMChMwBfYEZ55A6IaPRK7ne7mQ8dCjlk0/zJr7ePv8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":14855},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","gitHead":"9cab0b2e4d869b3ce19160f938ee7985000582a4","scripts":{"build":"tsc","prepublishOnly":"npm run build"},"_npmUser":{"name":"stephane.zucatti","email":"stephane.zucatti@me.com"},"_npmVersion":"10.8.2","description":"Authentication module for Cadriciel","directories":{},"_nodeVersion":"20.20.0","dependencies":{"jsonwebtoken":"^9.0.2","@cadriciel/kernel":"^0.3.1","@cadriciel/module-db":"^0.3.1"},"_hasShrinkwrap":false,"devDependencies":{"hono":"^4.0.0","sequelize":"^6.37.5","typescript":"^5.3.3","@types/node":"^20.11.16","@types/jsonwebtoken":"^9.0.5"},"peerDependencies":{"hono":"^4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/module-auth_0.3.1_1769599728238_0.2653233148515577","host":"s3://npm-registry-packages-npm-production"}},"0.3.2":{"name":"@cadriciel/module-auth","version":"0.3.2","description":"Authentication module for Cadriciel","type":"module","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"tsc","prepublishOnly":"npm run build"},"dependencies":{"@cadriciel/kernel":"^0.3.2","@cadriciel/module-db":"^0.3.2","jsonwebtoken":"^9.0.2"},"peerDependencies":{"hono":"^4.0.0"},"devDependencies":{"@types/jsonwebtoken":"^9.0.5","@types/node":"^20.11.16","typescript":"^5.3.3","hono":"^4.0.0","sequelize":"^6.37.5"},"_id":"@cadriciel/module-auth@0.3.2","gitHead":"53da9048cd30a615fc609814ac919518df3d14c3","_nodeVersion":"20.20.0","_npmVersion":"10.8.2","dist":{"integrity":"sha512-6pTpJ4ww0evOoMIP5WEL7R9d8N/t8cwnYvNsjX98Wla3A6jwkduXLPKswP3Aa1yyv3Cyt6jhW2aUMVsuQBAxHw==","shasum":"e59c9fa24753f1895175cbc818123b377555ba2a","tarball":"https://registry.npmjs.org/@cadriciel/module-auth/-/module-auth-0.3.2.tgz","fileCount":14,"unpackedSize":14855,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDNYTT/bailjYUTSdn8KCmAwKyN24VqYARBr5pHdmP2eAIhAK7zlbFTq9n3r7/J9F9QhGa5avryol9oNgRWavCiHs6f"}]},"_npmUser":{"name":"stephane.zucatti","email":"stephane.zucatti@me.com"},"directories":{},"maintainers":[{"name":"stephane.zucatti","email":"stephane.zucatti@me.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/module-auth_0.3.2_1769607862624_0.6896464191954765"},"_hasShrinkwrap":false}},"time":{"created":"2026-01-22T23:46:08.334Z","modified":"2026-01-28T13:44:22.875Z","0.1.2":"2026-01-22T23:46:08.710Z","0.1.4":"2026-01-24T20:57:49.385Z","0.2.1":"2026-01-28T10:38:48.143Z","0.3.1":"2026-01-28T11:28:48.375Z","0.3.2":"2026-01-28T13:44:22.763Z"},"description":"Authentication module for Cadriciel","maintainers":[{"name":"stephane.zucatti","email":"stephane.zucatti@me.com"}],"readme":"# 🔐 @cadriciel/module-auth\n\nEnterprise-grade authentication and identity management for the Cadriciel framework, featuring **Keycloak** integration and JWT security.\n\n## Features\n\n- **Keycloak Integration**: Seamless OIDC/OAuth2 authentication.\n- **JWT Protection**: Secure, stateless session management.\n- **Auto-Middleware**: Injects the authenticated user object into the Hono context (`c.get('user')`).\n- **Secure Route Metadata**: Activate authentication on any route by simply adding `secure: true` to its metadata.\n- **REST Endpoints**: Built-in `/api/user` and `/api/avatar` routes.\n\n## Usage\n\n```typescript\nimport AuthModule from \"@cadriciel/module-auth\";\n\nkernel.load(AuthModule);\n```\n\n### Securing a Route\n\n```typescript\nexport const GET = (c: Context) => {\n  const user = c.get(\"user\");\n  return c.json({ message: \"Welcome\", user });\n};\n\nGET.meta = {\n  secure: true // This activates the auth middleware for this route\n};\n```\n","readmeFilename":"README.md"}