{"_id":"@apeleghq/hydra-rfc8693","name":"@apeleghq/hydra-rfc8693","dist-tags":{"latest":"1.1.9"},"versions":{"1.1.9":{"name":"@apeleghq/hydra-rfc8693","version":"1.1.9","description":"An implementation of RFC 8693 for Ory Hydra, providing powerful capabilities for token exchange in OAuth 2.0 and OpenID Connect servers.","type":"module","main":"dist/index.cjs","module":"./dist/index.mjs",".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.mjs"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}},"devDependencies":{"@apeleghq/routemate":"^1.0.7","@types/node":"^22.5.4","@typescript-eslint/eslint-plugin":"^8.5.0","@typescript-eslint/parser":"^8.5.0","esbuild":"^0.23.1","eslint":"^8.57.0","eslint-config-prettier":"^9.1.0","eslint-plugin-prettier":"^5.1.3","prettier":"^3.3.3","ts-node":"^10.9.2","typescript":"^5.6.2"},"repository":{"type":"git","url":"git+https://github.com/ApelegHQ/ts-hydra-rfc8693.git"},"scripts":{"lint":"eslint . --ext .js,.jsx,.ts,.tsx","lint:fix":"eslint . --ext .js,.jsx,.ts,.tsx --fix","ts:declaration":"tsc --build --emitDeclarationOnly --declarationMap --declaration","build":"npm run ts:declaration && node esbuild.mjs","test":"node --loader ts-node/esm test/null.test.ts","prepack":"npm run build","prepublishOnly":"npm test && npm run lint","preversion":"npm run lint","version":"npm run lint && git add -A src","postversion":"git push && git push --tags"},"author":{"name":"Apeleg Limited"},"license":"Apache-2.0 WITH LLVM-exception","keywords":["OAuth 2.0","oauth2","OpenID Connect","oidc","RFC 8693","rfc8693","Ory Hydra","hydra","Token Exchange","Authentication","Security","Identity","Server","JavaScript","iam"],"_id":"@apeleghq/hydra-rfc8693@1.1.9","gitHead":"b1d6327c0060ef2a9f7f3c76b4dc8322a0231149","types":"./dist/index.d.ts","bugs":{"url":"https://github.com/ApelegHQ/ts-hydra-rfc8693/issues"},"homepage":"https://github.com/ApelegHQ/ts-hydra-rfc8693#readme","_nodeVersion":"20.17.0","_npmVersion":"10.8.2","dist":{"integrity":"sha512-UviDRBe8QwG3ABpF+PcaMvaWAiEtb9qLd1YmID2tBaOUVoBun6pDsXXhfOp5872uPWS+39kyA6yzch3GpStyYg==","shasum":"ca076c0c5af97894635594095f9fa1c70ba89eb5","tarball":"https://registry.npmjs.org/@apeleghq/hydra-rfc8693/-/hydra-rfc8693-1.1.9.tgz","fileCount":33,"unpackedSize":50547,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@apeleghq%2fhydra-rfc8693@1.1.9","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCMfgqWDtAMIQyrpmR6A33MyoNcZexjF46EIOq+iV7KCwIhANoXsgGawfKk0vLFI7eYemQFrvNcJ9qjf9ILU5PGi6Vf"}]},"_npmUser":{"name":"er-ci-bot","email":"npmjs.com+er-ci-bot+fd8b22b478b6fac7@apeleg.com"},"directories":{},"maintainers":[{"name":"er-ci-bot","email":"npmjs.com+er-ci-bot+fd8b22b478b6fac7@apeleg.com"},{"name":"corrideat","email":"3857362+corrideat@users.noreply.github.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydra-rfc8693_1.1.9_1726178079493_0.31970971335141685"},"_hasShrinkwrap":false}},"time":{"created":"2024-09-12T21:54:39.398Z","1.1.9":"2024-09-12T21:54:39.719Z","modified":"2024-09-12T21:54:40.296Z"},"maintainers":[{"name":"er-ci-bot","email":"npmjs.com+er-ci-bot+fd8b22b478b6fac7@apeleg.com"},{"name":"corrideat","email":"3857362+corrideat@users.noreply.github.com"}],"description":"An implementation of RFC 8693 for Ory Hydra, providing powerful capabilities for token exchange in OAuth 2.0 and OpenID Connect servers.","homepage":"https://github.com/ApelegHQ/ts-hydra-rfc8693#readme","keywords":["OAuth 2.0","oauth2","OpenID Connect","oidc","RFC 8693","rfc8693","Ory Hydra","hydra","Token Exchange","Authentication","Security","Identity","Server","JavaScript","iam"],"repository":{"type":"git","url":"git+https://github.com/ApelegHQ/ts-hydra-rfc8693.git"},"author":{"name":"Apeleg Limited"},"bugs":{"url":"https://github.com/ApelegHQ/ts-hydra-rfc8693/issues"},"license":"Apache-2.0 WITH LLVM-exception","readme":"# 🐉 hydra-rfc8693 📜\r\n\r\nAn NPM package for implementing RFC 8693 for Ory Hydra 🚀\r\n\r\n [![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=Exact-Realty_hydra-rfc8693&metric=reliability_rating)](https://sonarcloud.io/summary/new_code?id=Exact-Realty_hydra-rfc8693)\r\n [![Vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=Exact-Realty_hydra-rfc8693&metric=vulnerabilities)](https://sonarcloud.io/summary/new_code?id=Exact-Realty_hydra-rfc8693)\r\n [![Bugs](https://sonarcloud.io/api/project_badges/measure?project=Exact-Realty_hydra-rfc8693&metric=bugs)](https://sonarcloud.io/summary/new_code?id=Exact-Realty_hydra-rfc8693)\r\n [![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=Exact-Realty_hydra-rfc8693&metric=security_rating)](https://sonarcloud.io/summary/new_code?id=Exact-Realty_hydra-rfc8693)\r\n [![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=Exact-Realty_hydra-rfc8693&metric=sqale_rating)](https://sonarcloud.io/summary/new_code?id=Exact-Realty_hydra-rfc8693)\r\n ![NPM Downloads](https://img.shields.io/npm/dw/@apeleghq/hydra-rfc8693?style=flat-square)\r\n [![License](https://img.shields.io/badge/License-Apache%202.0%20with%20llvm%20exception-blue.svg)](https://github.com/Exact-Realty/ts-hydra-rfc8693/blob/master/LICENSE)\r\n\r\n## 📖 Introduction\r\n\r\nWelcome to **hydra-rfc8693**! This powerful package enables you to supercharge\r\nyour OAuth 2.0 and OpenID Connect server with seamless implementation of RFC\r\n8693 for Ory Hydra. Empower your applications with advanced token exchange,\r\nflexible authentication and token transformation capabilities. Boost your\r\nsecurity and scalability while adhering to industry standards. 💪\r\n\r\n## ✨ Features\r\n\r\n**hydra-rfc8693** empowers you to enhance your OAuth 2.0 and OpenID Connect\r\nserver without the burden of additional dependencies. It seamlessly integrates\r\nwith Ory Hydra, providing a runtime-agnostic solution that fits into any\r\nJavaScript project effortlessly.\r\n\r\n- **Token Exchange Supercharged:** Effortlessly handle token exchange with\r\npowerful capabilities at your fingertips.\r\n- **Transform Tokens on the Fly:** Seamlessly transform token types to adapt to\r\nvarious scenarios and requirements.\r\n- **OAuth 2.0 and OpenID Connect Compliant:** Ensure interoperability and\r\ncompatibility with industry-standard protocols.\r\n- **Deep Integration with Ory Hydra:** Maximise the potential of Ory Hydra by\r\nleveraging the full capabilities of RFC 8693.\r\n- **Scalable and Highly Available:** Built to scale and designed for high\r\navailability to meet the demands of your applications.\r\n- **Flexible Authentication:** Support a wide range of authentication mechanisms\r\nto suit your specific needs.\r\n- **No Dependencies:** The package has no external dependencies, keeping your\r\nproject lightweight and hassle-free.\r\n- **Runtime Agnostic:** Utilises standard JavaScript only, making it compatible\r\nwith any runtime environment.\r\n\r\n## 🚀 Installation\r\n\r\nGetting started with **hydra-rfc8693** is as easy as running a simple command:\r\n\r\n```sh\r\nnpm install \"@apeleghq/hydra-rfc8693\"\r\n```\r\n\r\n## 💡 Usage\r\n\r\nIntegrating **hydra-rfc8693** into your project is a breeze. Here's a quick\r\nexample to get you started:\r\n\r\n```js\r\nimport server, { listeners } from '@apeleghq/routemate';\r\nimport exchangeTokenEndpoint from '@apeleghq/hydra-rfc8693';\r\n\r\nconst exchangeTokenEndpointHandler = exchangeTokenEndpoint(\r\n  'deadbeef-abba-cafe-affe-123456789012', // hydraClientId\r\n  undefined, // hydraClientSecret\r\n  'none', // hydraTokenAuthMethod\r\n  'about:invalid', // hydraClientRedirectUri\r\n  'http://localhost:4444', // hydraPublicUri\r\n  'http://localhost:4445', // hydraAdminUri\r\n  { ['clientAuthMethod']: 'none' }, // hydraPublicAuthParams\r\n  // NB! Remember to use authentication in production\r\n  { ['clientAuthMethod']: 'none' }, // hydraAdminAuthParams\r\n  (body) => ({\r\n    subject: 'alice@example.com',\r\n    access_token: {\r\n      // Example of a claim in the access token\r\n      original_request: String(body),\r\n    },\r\n    id_token: {\r\n      name: 'Alice',\r\n    }\r\n  }),\r\n  [], // scope. Optional list of scopes\r\n  [], // audience. Optional list of audiences\r\n  [], // subjectTokenType. Optional list of acceptable token types;\r\n      // null or undefined defaults to access tokens\r\n  [], // actorTokenType. Optional list of acceptable token types\r\n      // null or undefined defaults to none\r\n);\r\n\r\nserver(listeners.node)\r\n  .listen(5678, '127.0.0.1')\r\n  .then((r) => {\r\n    r.post('/token', exchangeTokenEndpointHandler);\r\n  });\r\n```\r\n\r\n## 🤝 Contributing\r\n\r\n🎉 We appreciate contributions from the community! If you have any ideas,\r\nsuggestions or find any issues, feel free to open an issue or submit a pull\r\nrequest on our\r\n[GitHub repository](https://github.com/Exact-Realty/ts-hydra-rfc8693).\r\n\r\n## ❗️ Disclaimer\r\n\r\n⚠️ **IMPORTANT**: This software assumes a secure setup and should only be\r\nused for token exchange when the token issuer is trusted. It is essential to\r\nexercise caution and ensure the security of your setup when utilising token\r\nexchange capabilities.\r\n\r\nThis software is not affiliated with or endorsed by Ory or the developers of\r\nOry Hydra. It is an independent implementation of RFC 8693 for Ory Hydra and is\r\nprovided as-is, without any warranties or guarantees of fitness for a\r\nparticular purpose.\r\n\r\n## 📄 License\r\n\r\nThis project is licensed under the Apache 2.0 License with the LLVM exception.\r\nYou are free to use this package in compliance with the terms of the license.\r\nFor more information, see the `LICENSE` file.\r\n","readmeFilename":"README.md"}