{"_id":"@dmamontov/graphql-mesh-oauth2-proxy-user-plugin","_rev":"3-06e905ed906cecfe0f61e332ef7379a3","name":"@dmamontov/graphql-mesh-oauth2-proxy-user-plugin","dist-tags":{"latest":"1.0.3"},"versions":{"1.0.0":{"name":"@dmamontov/graphql-mesh-oauth2-proxy-user-plugin","version":"1.0.0","author":{"name":"Dmitry Mamontov"},"type":"module","repository":{"type":"git","url":"git+https://github.com/dmamontov/graphql-mesh-oauth2-proxy-user-plugin.git"},"license":"MIT","engines":{"node":">=20.0.0"},"main":"dist/cjs/index.js","module":"dist/esm/index.js","exports":{".":{"require":{"types":"./dist/typings/index.d.cts","default":"./dist/cjs/index.js"},"import":{"types":"./dist/typings/index.d.ts","default":"./dist/esm/index.js"},"default":{"types":"./dist/typings/index.d.ts","default":"./dist/esm/index.js"}},"./package.json":"./package.json"},"typings":"dist/typings/index.d.ts","scripts":{"build":"bob build","lint":"eslint ."},"peerDependencies":{"graphql":"*"},"dependencies":{"@envelop/core":"^5.0.0","@envelop/generic-auth":"^7.0.0","@graphql-mesh/string-interpolation":"^0.5.3","@graphql-mesh/types":"^0.97.5","graphql":"*","jwt-decode":"^4.0.0"},"devDependencies":{"@babel/core":"7.24.5","@eslint/js":"8.57.0","@theguild/prettier-config":"2.0.6","@types/node":"20.12.2","@typescript-eslint/eslint-plugin":"7.4.0","@typescript-eslint/parser":"7.4.0","bob-the-bundler":"7.0.1","eslint":"8.57.0","eslint-config-love":"43.1.0","eslint-config-prettier":"9.1.0","eslint-config-standard":"17.1.0","eslint-formatter-stylish":"8.40.0","eslint-import-resolver-alias":"1.1.2","eslint-import-resolver-typescript":"3.6.1","eslint-plugin-import":"2.29.1","eslint-plugin-jsonc":"2.14.1","eslint-plugin-n":"16.6.2","eslint-plugin-prettier":"5.1.3","eslint-plugin-promise":"6.1.1","eslint-plugin-sonar":"0.13.2","eslint-plugin-standard":"5.0.0","eslint-plugin-unicorn":"51.0.1","prettier":"3.2.5","ts-node":"10.9.2","typescript":"5.4.3"},"publishConfig":{"access":"public","directory":"dist"},"sideEffects":false,"typescript":{"definition":"dist/typings/index.d.ts"},"_id":"@dmamontov/graphql-mesh-oauth2-proxy-user-plugin@1.0.0","gitHead":"4720af8eb363b520e3845629b05921cf2b6a77f3","description":"Oauth2 Proxy User Plugin for GraphQL Mesh, based on [@envelop/generic-auth](https://www.npmjs.com/package/@envelop/generic-auth), is a plugin for GraphQL Mesh designed to handle tokens added via OAuth2 Proxy. This plugin ensures security by disallowing Gr","bugs":{"url":"https://github.com/dmamontov/graphql-mesh-oauth2-proxy-user-plugin/issues"},"homepage":"https://github.com/dmamontov/graphql-mesh-oauth2-proxy-user-plugin#readme","_nodeVersion":"20.5.1","_npmVersion":"9.8.0","dist":{"integrity":"sha512-flgjLkZv883BXyIrTvh/dVIYSX+Jm5rCZT1+jHkom9J6JuS5VwkID0W62Di52AEzt6b+b2jzEYUQS6v6KUVoaA==","shasum":"ae6953e0211d588e34c03deb8395a532ad82a722","tarball":"https://registry.npmjs.org/@dmamontov/graphql-mesh-oauth2-proxy-user-plugin/-/graphql-mesh-oauth2-proxy-user-plugin-1.0.0.tgz","fileCount":25,"unpackedSize":22936,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIA2XEDsIL8l8PjbAmAc5U4O6zeaFe9lbGY/7YwWe+gVZAiEA9pxIMH3wBUjLDcYEPv7/7sk6iQFNX43Kav2RtxsLm+0="}]},"_npmUser":{"name":"dmamontov","email":"d.slonyara@gmail.com"},"directories":{},"maintainers":[{"name":"dmamontov","email":"d.slonyara@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-mesh-oauth2-proxy-user-plugin_1.0.0_1715260243742_0.9443673827142061"},"_hasShrinkwrap":false},"1.0.1":{"name":"@dmamontov/graphql-mesh-oauth2-proxy-user-plugin","version":"1.0.1","sideEffects":false,"peerDependencies":{"graphql":"*"},"dependencies":{"@envelop/core":"^5.0.0","@envelop/generic-auth":"^7.0.0","@graphql-mesh/string-interpolation":"^0.5.3","@graphql-mesh/types":"^0.97.5","graphql":"*","jwt-decode":"^4.0.0"},"repository":{"type":"git","url":"git+https://github.com/dmamontov/graphql-mesh-oauth2-proxy-user-plugin.git"},"author":{"name":"Dmitry Mamontov"},"license":"MIT","engines":{"node":">=20.0.0"},"main":"cjs/index.js","module":"esm/index.js","typings":"typings/index.d.ts","typescript":{"definition":"typings/index.d.ts"},"type":"module","exports":{".":{"require":{"types":"./typings/index.d.cts","default":"./cjs/index.js"},"import":{"types":"./typings/index.d.ts","default":"./esm/index.js"},"default":{"types":"./typings/index.d.ts","default":"./esm/index.js"}},"./package.json":"./package.json"},"_id":"@dmamontov/graphql-mesh-oauth2-proxy-user-plugin@1.0.1","gitHead":"8cf0e606417fb565f48d963e4c9e0d8a5f837339","description":"Oauth2 Proxy User Plugin for GraphQL Mesh, based on [@envelop/generic-auth](https://www.npmjs.com/package/@envelop/generic-auth), is a plugin for GraphQL Mesh designed to handle tokens added via OAuth2 Proxy. This plugin ensures security by disallowing Gr","bugs":{"url":"https://github.com/dmamontov/graphql-mesh-oauth2-proxy-user-plugin/issues"},"homepage":"https://github.com/dmamontov/graphql-mesh-oauth2-proxy-user-plugin#readme","_nodeVersion":"20.5.1","_npmVersion":"9.8.0","dist":{"integrity":"sha512-kHh6kOKhBDombxpgG4TgUiS18O6wCF+YrgflPkEn03mgMxpIwPMseBDxviBlaMXW0fDUy8p/i8MhGukhR5tqEg==","shasum":"0190008f01f79d68e0b79f995c28cbf70ce26f2a","tarball":"https://registry.npmjs.org/@dmamontov/graphql-mesh-oauth2-proxy-user-plugin/-/graphql-mesh-oauth2-proxy-user-plugin-1.0.1.tgz","fileCount":15,"unpackedSize":9125,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD90vXbAs2iQ1+MHyp24pcaMtxY4vF5cN2dWrbZg5wgrAIhAOWDK/UCKvtXbDL6zzjAihunnXvtqlsoVu0keJxQUoq1"}]},"_npmUser":{"name":"dmamontov","email":"d.slonyara@gmail.com"},"directories":{},"maintainers":[{"name":"dmamontov","email":"d.slonyara@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-mesh-oauth2-proxy-user-plugin_1.0.1_1715260284119_0.47685205588901436"},"_hasShrinkwrap":false},"1.0.2":{"name":"@dmamontov/graphql-mesh-oauth2-proxy-user-plugin","version":"1.0.2","sideEffects":false,"peerDependencies":{"graphql":"*"},"dependencies":{"@envelop/core":"^5.0.0","@envelop/generic-auth":"^7.0.0","@graphql-mesh/string-interpolation":"^0.5.3","@graphql-mesh/types":"^0.97.5","apollo-server-errors":"*","graphql":"*","jwt-decode":"^4.0.0"},"repository":{"type":"git","url":"git+https://github.com/dmamontov/graphql-mesh-oauth2-proxy-user-plugin.git"},"author":{"name":"Dmitry Mamontov"},"license":"MIT","engines":{"node":">=20.0.0"},"main":"cjs/index.js","module":"esm/index.js","typings":"typings/index.d.ts","typescript":{"definition":"typings/index.d.ts"},"type":"module","exports":{".":{"require":{"types":"./typings/index.d.cts","default":"./cjs/index.js"},"import":{"types":"./typings/index.d.ts","default":"./esm/index.js"},"default":{"types":"./typings/index.d.ts","default":"./esm/index.js"}},"./package.json":"./package.json"},"_id":"@dmamontov/graphql-mesh-oauth2-proxy-user-plugin@1.0.2","gitHead":"6a92375abc04a5f7c17fa183deea759ee5fc59ea","description":"Oauth2 Proxy User Plugin for GraphQL Mesh, based on [@envelop/generic-auth](https://www.npmjs.com/package/@envelop/generic-auth), is a plugin for GraphQL Mesh designed to handle tokens added via OAuth2 Proxy. This plugin ensures security by disallowing Gr","bugs":{"url":"https://github.com/dmamontov/graphql-mesh-oauth2-proxy-user-plugin/issues"},"homepage":"https://github.com/dmamontov/graphql-mesh-oauth2-proxy-user-plugin#readme","_nodeVersion":"20.5.1","_npmVersion":"9.8.0","dist":{"integrity":"sha512-yTnXoTo00ogsuFjI6xeNvTIw5LvecuAdDNdJccC83FE2BzuDOOlu1D6gA37e+AqAmJM0TQrxlvlGNfrXukpnRQ==","shasum":"d72b39476ef86add58862bd4566262b2d613c54c","tarball":"https://registry.npmjs.org/@dmamontov/graphql-mesh-oauth2-proxy-user-plugin/-/graphql-mesh-oauth2-proxy-user-plugin-1.0.2.tgz","fileCount":15,"unpackedSize":9335,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIG+5RLZzgueZcE7nGzIJzEZu8Wsi6XLhX3NxvZWfLkZeAiAekMdOSQQ8TwajD2vlW48fLBzfMxFGoD0llK2pMdTTvA=="}]},"_npmUser":{"name":"dmamontov","email":"d.slonyara@gmail.com"},"directories":{},"maintainers":[{"name":"dmamontov","email":"d.slonyara@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-mesh-oauth2-proxy-user-plugin_1.0.2_1715338839320_0.43771562087656735"},"_hasShrinkwrap":false},"1.0.3":{"name":"@dmamontov/graphql-mesh-oauth2-proxy-user-plugin","version":"1.0.3","sideEffects":false,"peerDependencies":{"graphql":"*"},"dependencies":{"@envelop/core":"^5.0.0","@envelop/generic-auth":"^7.0.0","@graphql-mesh/string-interpolation":"^0.5.3","@graphql-mesh/types":"^0.97.5","apollo-server-errors":"*","graphql":"*","jwt-decode":"^4.0.0"},"repository":{"type":"git","url":"git+https://github.com/dmamontov/graphql-mesh-oauth2-proxy-user-plugin.git"},"author":{"name":"Dmitry Mamontov"},"license":"MIT","engines":{"node":">=20.0.0"},"main":"cjs/index.js","module":"esm/index.js","typings":"typings/index.d.ts","typescript":{"definition":"typings/index.d.ts"},"type":"module","exports":{".":{"require":{"types":"./typings/index.d.cts","default":"./cjs/index.js"},"import":{"types":"./typings/index.d.ts","default":"./esm/index.js"},"default":{"types":"./typings/index.d.ts","default":"./esm/index.js"}},"./package.json":"./package.json"},"_id":"@dmamontov/graphql-mesh-oauth2-proxy-user-plugin@1.0.3","gitHead":"8c15f547608ed5c4d88ae3a653a741b46192fe10","description":"Oauth2 Proxy User Plugin for GraphQL Mesh, based on [@envelop/generic-auth](https://www.npmjs.com/package/@envelop/generic-auth), is a plugin for GraphQL Mesh designed to handle tokens added via OAuth2 Proxy. This plugin ensures security by disallowing Gr","bugs":{"url":"https://github.com/dmamontov/graphql-mesh-oauth2-proxy-user-plugin/issues"},"homepage":"https://github.com/dmamontov/graphql-mesh-oauth2-proxy-user-plugin#readme","_nodeVersion":"20.5.1","_npmVersion":"9.8.0","dist":{"integrity":"sha512-RLMO7/SVcf3HvMAfczbdMlR7yD5PRG1o0uGkC/qdgf3t8GtpZOXdNpsxN8r9FwuApcuyvrXVgC728sC/Q7zCvQ==","shasum":"1389beaf93e5c43904798d660b64d56c1915f5f2","tarball":"https://registry.npmjs.org/@dmamontov/graphql-mesh-oauth2-proxy-user-plugin/-/graphql-mesh-oauth2-proxy-user-plugin-1.0.3.tgz","fileCount":15,"unpackedSize":9701,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDJff/p6cDXuwkpGYF3vQczko3drEqtKZXvVFIcoWq19AiA8153fo6WYoggIhJoR7L00mIsJb0GOT55qHkbdMEK1DA=="}]},"_npmUser":{"name":"dmamontov","email":"d.slonyara@gmail.com"},"directories":{},"maintainers":[{"name":"dmamontov","email":"d.slonyara@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/graphql-mesh-oauth2-proxy-user-plugin_1.0.3_1716805145391_0.761022009759009"},"_hasShrinkwrap":false}},"time":{"created":"2024-05-09T13:10:43.650Z","1.0.0":"2024-05-09T13:10:43.951Z","modified":"2024-05-27T10:19:05.686Z","1.0.1":"2024-05-09T13:11:24.269Z","1.0.2":"2024-05-10T11:00:39.461Z","1.0.3":"2024-05-27T10:19:05.533Z"},"maintainers":[{"name":"dmamontov","email":"d.slonyara@gmail.com"}],"description":"Oauth2 Proxy User Plugin for GraphQL Mesh, based on [@envelop/generic-auth](https://www.npmjs.com/package/@envelop/generic-auth), is a plugin for GraphQL Mesh designed to handle tokens added via OAuth2 Proxy. This plugin ensures security by disallowing Gr","homepage":"https://github.com/dmamontov/graphql-mesh-oauth2-proxy-user-plugin#readme","repository":{"type":"git","url":"git+https://github.com/dmamontov/graphql-mesh-oauth2-proxy-user-plugin.git"},"author":{"name":"Dmitry Mamontov"},"bugs":{"url":"https://github.com/dmamontov/graphql-mesh-oauth2-proxy-user-plugin/issues"},"license":"MIT","readme":"# Oauth2 Proxy User Plugin for GraphQL Mesh\n\nOauth2 Proxy User Plugin for GraphQL Mesh, based on [@envelop/generic-auth](https://www.npmjs.com/package/@envelop/generic-auth), is a plugin for GraphQL Mesh designed to handle tokens added via OAuth2 Proxy. This plugin ensures security by disallowing GraphQL queries without authentication through OAuth2 Proxy and adds user information extracted from the token into the GraphQL context.\n\n## Installation\n\nBefore you can use the Oauth2 Proxy User Plugin, you need to install it along with GraphQL Mesh if you haven't already done so. You can install these using npm or yarn.\n\n```bash\nnpm install @dmamontov/graphql-mesh-oauth2-proxy-user-plugin\n```\n\nor\n\n```bash\nyarn add @dmamontov/graphql-mesh-oauth2-proxy-user-plugin\n```\n\n## Configuration\n\n### Modifying tsconfig.json\n\nTo make TypeScript recognize the Oauth2 Proxy User Plugin, you need to add an alias in your tsconfig.json.\n\nAdd the following paths configuration under the compilerOptions in your tsconfig.json file:\n\n```json\n{\n  \"compilerOptions\": {\n    \"paths\": {\n       \"oauth2-proxy-user\": [\"node_modules/@dmamontov/graphql-mesh-oauth2-proxy-user-plugin\"]\n    }\n  }\n}\n```\n\n### Adding the Plugin to GraphQL Mesh\n\nYou need to include the Oauth2 Proxy User Plugin in your GraphQL Mesh configuration file (usually .meshrc.yaml). Below is an example configuration that demonstrates how to use this plugin:\n\n```yaml\nplugins:\n  - oauth2ProxyUser:\n      enabled: true\n      headerKey: 'X-Auth-Request-Access-Token'\n      idKey: email\n      nameKey: name\n      rolesKey: role\n```\n\n## Conclusion\n\nRemember, always test your configurations in a development environment before applying them in production to ensure that everything works as expected.","readmeFilename":"README.md"}