{"_id":"@client-extension-util-liferay/express","name":"@client-extension-util-liferay/express","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"author":{"name":"Keven Leone","email":"keven.santos.sz@gmail.com"},"description":"Express middleware and utilities for Liferay client extensions","dependencies":{"cors":"^2.8.5","express":"^5.1.0","json-web-token":"^3.2.0"},"devDependencies":{"@client-extension-util-liferay/auth":"workspace:*","@client-extension-util-liferay/shared":"workspace:*","@types/bun":"latest","@types/cors":"^2.8.19","@types/express":"^5.0.3","@types/jwk-to-pem":"^2.0.3"},"exports":{".":"./dist/index.js"},"keywords":["client-extension","express","liferay","middleware"],"license":"MIT","main":"./dist/index.js","module":"index.ts","name":"@client-extension-util-liferay/express","peerDependencies":{"typescript":"^5"},"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/kevenleone/liferay-client-extension-util.git","directory":"packages/express"},"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/express@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-J1teBqElNd/NdpX/fawQf4K2oYs/VdXRIz0SfVJe4wShOgyEl4OvkDSZl/hrMcf5Bsbkx/gmuaFomJoXVquW1Q==","shasum":"2bbbdd3c7c1e4bb77cf82acf4fb65988ade7fc6d","tarball":"https://registry.npmjs.org/@client-extension-util-liferay/express/-/express-1.0.0.tgz","fileCount":6,"unpackedSize":438151,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQD5AvowKd1NAKFWGYRWSetGUQ26NGkjbFJsydRG1QF1CQIgYDa05tDZnxLu1oRHHyIMcofwh+SunnbIH39c95PcyPo="}]},"_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/express_1.0.0_1756927835393_0.37104461160648117"},"_hasShrinkwrap":false}},"time":{"created":"2025-09-03T19:30:35.328Z","1.0.0":"2025-09-03T19:30:35.662Z","modified":"2025-09-03T19:30:35.917Z"},"maintainers":[{"name":"kevenleone","email":"keven.santos.sz@gmail.com"}],"description":"Express middleware and utilities for Liferay client extensions","homepage":"https://github.com/kevenleone/liferay-client-extension-util#readme","keywords":["client-extension","express","liferay","middleware"],"repository":{"type":"git","url":"git+https://github.com/kevenleone/liferay-client-extension-util.git","directory":"packages/express"},"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/express\n\nExpress middleware for Liferay Client Extension authentication and integration.\n\n## Features\n\n- Express middleware for Liferay OAuth2 authentication\n- JWT token verification using Liferay's JWKS endpoint\n- Support for excluding specific routes from authentication\n\n## Installation\n\n```bash\nbun add @client-extension-util-liferay/express\n# or\nnpm install @client-extension-util-liferay/express\n# or\nyarn add @client-extension-util-liferay/express\n```\n\n## Usage\n\n```typescript\nimport express from 'express';\nimport { liferayAuthMiddleware } from '@client-extension-util-liferay/express';\n\nconst app = express();\n\n// Apply the Liferay authentication middleware\napp.use(liferayAuthMiddleware);\n\n// Define your routes\napp.get('/api/protected', (req, res) => {\n  // Access the Liferay authorization data\n  const auth = req.liferayAuthorization;\n  \n  res.json({ message: `Hello, ${auth.username}!` });\n});\n\napp.listen(3000, () => {\n  console.log('Server running on port 3000');\n});\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-945eecf2bb19d9c943cb071a526dc41d"}