{"_id":"@client-extension-util-liferay/fastify","name":"@client-extension-util-liferay/fastify","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"author":{"name":"Keven Leone","email":"keven.santos.sz@gmail.com"},"description":"Fastify plugins and utilities for Liferay client extensions","dependencies":{"fastify":"^5.4.0","fastify-plugin":"^5.0.1","jwk-to-pem":"^2.0.7"},"devDependencies":{"@types/bun":"latest","@types/jwk-to-pem":"^2.0.3","@client-extension-util-liferay/auth":"workspace:*","@client-extension-util-liferay/shared":"workspace:*"},"exports":{".":"./dist/index.js"},"keywords":["client-extension","fastify","liferay","plugin"],"license":"MIT","main":"./dist/index.js","module":"index.ts","name":"@client-extension-util-liferay/fastify","peerDependencies":{"typescript":"^5"},"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/kevenleone/liferay-client-extension-util.git","directory":"packages/fastify"},"scripts":{"build":"bun build ./src/*.ts --outdir ./dist --target node --root ./src && tsc --emitDeclarationOnly --declaration --outDir ./dist ./src/index.ts > /dev/null 2>&1 || true"},"type":"module","version":"1.0.0","_id":"@client-extension-util-liferay/fastify@1.0.0","gitHead":"c4e467e06cf834172a988c6bbfdf706b17859acc","types":"./dist/index.d.ts","bugs":{"url":"https://github.com/kevenleone/liferay-client-extension-util/issues"},"homepage":"https://github.com/kevenleone/liferay-client-extension-util#readme","_nodeVersion":"22.6.0","_npmVersion":"10.8.2","dist":{"integrity":"sha512-lqLeVyp5inLko5hx8txUHuSGkwL6c+u8Zct1mKR2BNP4EmF64bdfrJ3l5lyr6amwUsXLyAPrN1l08CiwWLh3uw==","shasum":"07800ccde482df8ffac06e624f223ce27fec412c","tarball":"https://registry.npmjs.org/@client-extension-util-liferay/fastify/-/fastify-1.0.0.tgz","fileCount":5,"unpackedSize":440965,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDGIkwyO6N/gv70+cfnUjKL70wMkhFcNkxqjEgVQKOF/AIgPB/1TcsYeeMbffFmXpD7XF8Zjzq5UisTMaD1Dgr70Jc="}]},"_npmUser":{"name":"kevenleone","email":"keven.santos.sz@gmail.com"},"directories":{},"maintainers":[{"name":"kevenleone","email":"keven.santos.sz@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/fastify_1.0.0_1756927838608_0.6781943486292363"},"_hasShrinkwrap":false}},"time":{"created":"2025-09-03T19:30:38.506Z","1.0.0":"2025-09-03T19:30:38.810Z","modified":"2025-09-03T19:30:39.140Z"},"maintainers":[{"name":"kevenleone","email":"keven.santos.sz@gmail.com"}],"description":"Fastify plugins and utilities for Liferay client extensions","homepage":"https://github.com/kevenleone/liferay-client-extension-util#readme","keywords":["client-extension","fastify","liferay","plugin"],"repository":{"type":"git","url":"git+https://github.com/kevenleone/liferay-client-extension-util.git","directory":"packages/fastify"},"author":{"name":"Keven Leone","email":"keven.santos.sz@gmail.com"},"bugs":{"url":"https://github.com/kevenleone/liferay-client-extension-util/issues"},"license":"MIT","readme":"# @client-extension-util-liferay/fastify\n\nFastify plugin for Liferay Client Extension authentication and integration.\n\n## Features\n\n- Fastify plugin for Liferay OAuth2 authentication\n- JWT token verification using Liferay's JWKS endpoint\n- Support for excluding specific routes from authentication\n- Request decoration with Liferay authorization data\n\n## Installation\n\n```bash\nbun add @client-extension-util-liferay/fastify\n# or\nnpm install @client-extension-util-liferay/fastify\n# or\nyarn add @client-extension-util-liferay/fastify\n```\n\n## Usage\n\n```typescript\nimport Fastify from 'fastify';\nimport liferayAuthPlugin from '@client-extension-util-liferay/fastify';\n\nconst fastify = Fastify();\n\n// Register the Liferay authentication plugin\nawait fastify.register(liferayAuthPlugin);\n\n// Define your routes\nfastify.get('/api/protected', async (request, reply) => {\n  // Access the Liferay authorization data\n  const auth = request.liferayAuthorization;\n  \n  return { message: `Hello, ${auth.username}!` };\n});\n\nawait fastify.listen({ port: 3000 });\nconsole.log('Server running on port 3000');\n```\n\n## Environment Variables\n\nThis package requires the following environment variables to be set:\n\n- `liferay.oauth.application.external.reference.codes`: Comma-separated list of external reference codes for OAuth applications\n- `liferay.oauth.urls.excludes`: Comma-separated list of URLs to exclude from authentication\n- `com.liferay.lxc.dxp.domains`: DXP domain for API calls\n- `com.liferay.lxc.dxp.server.protocol`: Protocol for DXP server (http/https)\n","readmeFilename":"README.md","_rev":"1-4a23299ba45e4ebc3e8a664ee76df6cf"}