{"_id":"@clerk/backend-core","_rev":"241-095bb447bfeeb42ab16f3be0c3335469","name":"@clerk/backend-core","dist-tags":{"prerelease":"0.1.0-alpha.3","next":"2.9.3-next.2","staging":"2.13.0-staging.1","latest":"2.13.2"},"versions":{"0.1.0-alpha.0":{"name":"@clerk/backend-core","version":"0.1.0-alpha.0","license":"MIT","_id":"@clerk/backend-core@0.1.0-alpha.0","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"dist":{"shasum":"8b2dd86e3e93f4da43b9efe0843f8490a5ed88e0","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-0.1.0-alpha.0.tgz","fileCount":403,"integrity":"sha512-tKRSW5i05oSPlEKoqF4GAJz6c5gRwFzXlV3xPIdDUx2mgKmazo+Of6pwVOhZonthFypGMIa2nvf58JjODKMajg==","signatures":[{"sig":"MEYCIQCAQA8gTaeVeqcO/qpM6fU4FAIZFCkx6AcgdelR+vAkpQIhAJDR18oNZFPTY7Od2uEuJWSFI8/Vh3oIKkvfshANlB1L","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":479376,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh6TEiCRA9TVsSAnZWagAA/+EP/jup1ug4gujzLT2airM6\noqgfI7seQ7aICzzhBaITHYq3YuRXRxsIQLMuBwMRy58SWb9dJMU4CA51EUDf\nNvN4XXuN0891x3bFKGeunLsfs8nJs7xNXJXOvzvoYdCLMQku15okQE1TNIXm\nDMoZykdKc5FNxONhWLbjnDdtKPRPyQ6USSC0D33bjE3Xir3ZvPGaxiEFrZqT\ndRSvukMQL80PJi6HS8pFdPseQ0d5Bke3KubJTLG85z2sYMF4pFUtFJzF6g+y\nZcwuKI8peRA1Vt+ICumgPZ1bI27BMRjGfOKkTxpTDsJM1YMgOqwPRAwaGHGs\n370Ere5IbKSw0M70PBmu0gQVjEDvTWI2snObUFrOarf3ML9/Q3/ItMeMjDdb\nqJyUyvo3X74yreujbCIGI8dmZl5PObry5WZmVNIhIUDxfsvit51gXLH27SB1\nG/03t1it1mw8JDFHChxuFNsCqvHU8I3NIttETCOO4FGJi9IFbQZ8OCGYCik3\nsZUTcNaFDc/YKDo/9j5TA+gm9E8l3uYfJaspaiNa3ysW/UCredKQSJTjHQUX\niYAvULLkz/9lYTOmXU//cpcvzfld1vmVREFVVSG9kqMpOTBKLkdHHzl/WBrv\nXdNmIuhvWuc/82cNrmCu5nCf/bqYJk0Mh9Ieemn//E3sLsP+vurzViELDX0Q\n/ovp\r\n=9Nem\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","gitHead":"8bbeff4ec5be7bee24f2527652168fe9e4a8652c","scripts":{"test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix","prebuild":"rimraf dist"},"_npmUser":{"name":"igneel64","email":"p.perlepes@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","_npmVersion":"lerna/4.0.0/node@v16.13.1+x64 (darwin)","description":"<p align=\"center\">   <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">     <img src=\"../../docs/clerk-logo.svg\" height=\"50\">   </a>   <br /> </p>","directories":{},"_nodeVersion":"16.13.1","dependencies":{"query-string":"^7.0.1","camelcase-keys":"^7.0.1","snakecase-keys":"^5.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"got":"^11.0.0","jest":"^27.4.5","nock":"^13.2.1","rimraf":"^3.0.2","ts-jest":"^27.1.2","node-fetch":"^2.6.0","typescript":"^4.5.2","@types/jest":"^27.0.3","@types/node":"^16.11.12","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.2.3"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_0.1.0-alpha.0_1642672418556_0.19937153945937647","host":"s3://npm-registry-packages"}},"0.1.0-alpha.1":{"name":"@clerk/backend-core","version":"0.1.0-alpha.1","license":"MIT","_id":"@clerk/backend-core@0.1.0-alpha.1","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://github.com/clerkinc/javascript/tree/main/packages/backend-core","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"aefa9383c07d222326c8af9110d1fcbc0b530c58","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-0.1.0-alpha.1.tgz","fileCount":403,"integrity":"sha512-23U6EDv3vNjJaPBbL/buRI4TcYzigiMEWtOhaqKck5ENleSzacXHVz4yjTZ1+LwyJIfj2B88EYdTqZC/Fql4Jg==","signatures":[{"sig":"MEUCIDZufVCZ5al4+EPJaj72n2WgWySvSXCe28B/g6axuOPWAiEA5dJw2GtCdniAmYuzFXkqOT9VvKfmFpBWt/kuNF8CD+g=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":480794,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh6XEFCRA9TVsSAnZWagAA7WEP/0S3gB1SAg7oJUh8F29q\nTR7Y1At+IkOseRRiSckxdWO//Pahr6KG4Bq63VcmITLKnKdFzX7KDs/EerS3\nmbcIE+QNuGPdjD7o0ch5tKy0SLu/vZn9LMgOWSmZdy630iAyGCYJ6CekGv8C\nU0LHmaXCmbY6rZ72NybsWzrllBwksdfWCozcJ+686o8P4UU8aORf5jP7jfTc\nUzjttQ/AxdoHNDPl24SWqw0s8iRmCKCSSLEmP1MOOFYtxeA6F6ZQU0T2Zo6Q\nanuP5EJsAS1AkzceGSvT2I3yKi0iCTIYZQNv1ZIjzuSP1YNlnB1ZYD+ZoUpl\n0vEX1BuCzSSuVGm1/rEYRpKU24mc1r3YG6b4GI0j/vCax4c/0eIATVlNIGIi\nxc7avYVtp+TpEr1ZVxwiVlD/5uImd6e422+r4fKJuxT+Kmo+72vKZ0C9Y6HJ\nxPF+NpE+CXR4lnXs+ozSZx/PRhq06r8bEwwpc1JGsHNcSGQDB3Gu/3DZshDm\nRXoi1hMnz2H8j9dg4B1JU/QEQnr80M6rOKSGkYSDD4qM2Q/hf85wy1KfokdZ\nZf37Hv5MDVyyaXefT1yZfigzHJ+raRDtIv6CgLWCw+fsDPDmV3nkWt6tAofq\n2baNmtiSie6KsJPUhc396V3d87rkiUWORgD2hsueqxPNAL3ebFxr/a2BUzAh\nD86q\r\n=pOMw\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"../../docs/clerk-logo.svg\" height=\"50\">\n  </a>\n  <br />\n</p>\n\n# Clerk Backend Core SDK\n\n_Core Clerk API resources and authentication utilities for JavaScript environments._\n\n```diff\n! This package provides low-level utilities and is mostly used as the base for other Clerk SDKs.\n```\n\n## Usage\n\n```sh\nnpm install @clerk/backend-core\n# or\nyarn add @clerk/backend-core\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\nwithout being platform/environment specific.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"./docs/core-sdk.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendAPI](./src/api/ClerkBackendAPI.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendAPI` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (\n  algorithm: Algorithm,\n  key: CryptoKey,\n  signature: Uint8Array,\n  data: Uint8Array\n) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\n\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendAPI](./src/api/ClerkBackendAPI.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://docs.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendAPI.ts#17) implementation.\n","gitHead":"97dca3fa40feb5128c66555c7cc00d0b64211567","scripts":{"test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix","prebuild":"rimraf dist"},"_npmUser":{"name":"igneel64","email":"p.perlepes@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.13.1+x64 (darwin)","description":"<p align=\"center\">   <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">     <img src=\"../../docs/clerk-logo.svg\" height=\"50\">   </a>   <br /> </p>","directories":{},"_nodeVersion":"16.13.1","dependencies":{"query-string":"^7.0.1","camelcase-keys":"^7.0.1","snakecase-keys":"^5.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"got":"^11.0.0","jest":"^27.4.5","nock":"^13.2.1","rimraf":"^3.0.2","ts-jest":"^27.1.2","node-fetch":"^2.6.0","typescript":"^4.5.2","@types/jest":"^27.0.3","@types/node":"^16.11.12","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.2.3"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_0.1.0-alpha.1_1642688773269_0.19409358706524782","host":"s3://npm-registry-packages"}},"0.1.0-alpha.3":{"name":"@clerk/backend-core","version":"0.1.0-alpha.3","license":"MIT","_id":"@clerk/backend-core@0.1.0-alpha.3","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://github.com/clerkinc/javascript/tree/main/packages/backend-core","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"9cff0c6837c35d831748c71a8fd457484113aa47","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-0.1.0-alpha.3.tgz","fileCount":403,"integrity":"sha512-7uKpdfbUpx9/hcq3nCjOweIlwTUMDT73WZtVwZzJHY1aIXNjNuEtNRqawoQLe1MJ3EMVNiFxN9iTmppJlC7xHA==","signatures":[{"sig":"MEUCIQD20xM56Ce1EFA3xG4W75jY5//Zx5dQBeUR3KJlz4O6zwIgWHn26StxkUFRmg3jiYk5k+wb9V0t3NH9oxZpSfUyQL8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":481525,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh6XdJCRA9TVsSAnZWagAAt14QAIS5xqYsBzyx8/f9rj/O\nH6wnEteOIkkDDdsyZlFVceD5GS9K3Wug6XUNkx8bhyoSvHLD+Fyzet7yoA/a\n30y9iay0JmsfiaQt+FuNtDeoFJKiX4sDOGAy291AbgAeSFk1TC8twTx4qRrx\nrN8vIeT81HzSp570/BF6hS0AnVlqXXM2Yq/wlaGH1SBmlGq/+OAN4gKljcIX\nVZU8QfCBDJMtk2s+FCBjNosacBoUajuKStHhdUTpl/HOq5UYgge2Tl4nvwdO\nF43eeouuF2f1Ej99k2MD6JVXfBTY/Ehm/xekjX+1YBoTCHZ8Z2ivkoyxqvEs\nTb5hWXK1HUgL/l14JCJjBPYCKwUbEveu3I9h3octd3aWLHlWhSOwkgHF6jhP\nXQvffj//kCk+I7J5InBCC17VLKzHHXPd3PS40N0eY5VvJmEqzDlrMN3eLv8b\n3HwA6LxChpWnTOmUN828LPv8RBpnXhmP73yLlmUcPC7ECFh6c+JagUb+Rges\ncBduPW4CM8+NrAYV1PdfhAt5ENlgtEOPs3owyEoRngSKJ/BeHyZteksnG4uw\nFGoJtn5iT65sLcxqCn1uPp+rc/1OOScmH9L/DrQ6W3ylLyZcvxgXqX37spKj\nSedLiDUJC84nqFXbU8a0t9eJv6gkKvhDkYjS2t4fyx7VXVVgjrQVx/wsaqS7\nMXap\r\n=30nc\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/clerk.svg\" height=\"50\">\n  </a>\n  <br />\n</p>\n\n# Clerk Backend Core SDK\n\n_Core Clerk API resources and authentication utilities for JavaScript environments._\n\n```diff\n! This package provides low-level utilities and is mostly used as the base for other Clerk SDKs.\n```\n\n## Usage\n\n```sh\nnpm install @clerk/backend-core\n# or\nyarn add @clerk/backend-core\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\nwithout being platform/environment specific.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendAPI](./src/api/ClerkBackendAPI.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendAPI` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (\n  algorithm: Algorithm,\n  key: CryptoKey,\n  signature: Uint8Array,\n  data: Uint8Array\n) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\n\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendAPI](./src/api/ClerkBackendAPI.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://docs.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendAPI.ts#17) implementation.\n","gitHead":"a2ea7b80fa371cac2baadd9cc36c031c804fab19","scripts":{"test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix","prebuild":"rimraf dist"},"_npmUser":{"name":"igneel64","email":"p.perlepes@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.13.1+x64 (darwin)","description":"<p align=\"center\">   <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">     <img src=\"https://images.clerk.dev/static/clerk.svg\" height=\"50\">   </a>   <br /> </p>","directories":{},"_nodeVersion":"16.13.1","dependencies":{"query-string":"^7.0.1","camelcase-keys":"^7.0.1","snakecase-keys":"^5.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"got":"^11.0.0","jest":"^27.4.5","nock":"^13.2.1","rimraf":"^3.0.2","ts-jest":"^27.1.2","node-fetch":"^2.6.0","typescript":"^4.5.2","@types/jest":"^27.0.3","@types/node":"^16.11.12","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.2.3"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_0.1.0-alpha.3_1642690377264_0.01957180035155659","host":"s3://npm-registry-packages"}},"0.1.0":{"name":"@clerk/backend-core","version":"0.1.0","license":"MIT","_id":"@clerk/backend-core@0.1.0","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://github.com/clerkinc/javascript/tree/main/packages/backend-core","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"c8b5d9f1cdbd4f259aff6b40b02fea68c549fd3e","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-0.1.0.tgz","fileCount":403,"integrity":"sha512-wnxGSG0/i/Gn9KVdmx9elImqhcWAaxE7pBi+7nzYYFN9DWMOGmFAu9ehqC8t6NfXB1aJNJMLOdREWBMNVeJXfQ==","signatures":[{"sig":"MEUCIHgWnOpZly02hzL2fWSzlIL5vYYeXSAywl3VTQW27FAaAiEA68tSfmkJQeYGTCcKJ3eV9qJkNkyDWWm/Lb1KTEKYUWw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":481717,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh6XmUCRA9TVsSAnZWagAAg+AP/2C4Y7hUaiccA+BJUPlm\nW4yE6VcJZwQaE4MSZdxOGv9aQJnKWIbjj8WfxHPg/Nwzo5xg9XHYoqZeBJ7z\nJA6XBarUXWaOGndAlS/F7HGWa9jGd/FFkokZstAJPIHUpbCBsiTRPmNDQRik\nCfWT+Mf9TqJAAsJ7c/fDxPi3m9PPsBUvQzZLRAQZTZuPxmx4ptg8htZA6Fhy\nSzXicgojPVq70aRuGP4pi2bBSu3WIWrJpQBWSFePf8JIUMNP5no5AF2TnfIX\nVQVF6sKZwAWz9eGCQwxdKr0v1WftjrMYc9QW/AmmP32OQVYzJNzmu6+1e0RQ\nq9kRPMu5U4FBjA1IFfKjMROL0Ui2T9FezM8t/nBourcRN4WPTiwSm/y86Moh\nx7bv5/cYVAHzm+VfiX6GoGsB5Oha+wX9sp06bAKcZwk98a/7a6QWsHdDVpUb\n1G36y3istPGlRAUwFo9yzjifv2S5KvunzEEVr05AgRodjiXTDVou+0zVasMX\n7MjVawMSF9jAqyTht2AbAasNnzkMRDffF4je+XJuupXXtezRcrOKCcpUl5Ql\nQ+z3215TL/b0/MzU5iopQLiqp+B+0q0fDJK6dm1OlzU49x1zWDxCH66fZixu\nDKe+FH7OVHCgLkl7MuwCiSE4xO7QdRcO2BhOFApeYjLRnZIqz0B9omHrYSQ+\nccn4\r\n=Sl91\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","gitHead":"4d445c543b7e9932f23c415e4c814758895e30f4","scripts":{"test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix","prebuild":"rimraf dist"},"_npmUser":{"name":"igneel64","email":"p.perlepes@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.13.1+x64 (darwin)","description":"<p align=\"center\">   <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">     <img src=\"https://images.clerk.dev/static/clerk.svg\" height=\"50\">   </a>   <br /> </p>","directories":{},"_nodeVersion":"16.13.1","dependencies":{"query-string":"^7.0.1","camelcase-keys":"^7.0.1","snakecase-keys":"^5.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"got":"^11.0.0","jest":"^27.4.5","nock":"^13.2.1","rimraf":"^3.0.2","ts-jest":"^27.1.2","node-fetch":"^2.6.0","typescript":"^4.5.2","@types/jest":"^27.0.3","@types/node":"^16.11.12","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.2.3"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_0.1.0_1642690964088_0.44971174903431876","host":"s3://npm-registry-packages"}},"0.1.1":{"name":"@clerk/backend-core","version":"0.1.1","license":"MIT","_id":"@clerk/backend-core@0.1.1","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://github.com/clerkinc/javascript/tree/main/packages/backend-core","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"157401a89c7eb69b440712c6c3d1d770f102b7e2","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-0.1.1.tgz","fileCount":403,"integrity":"sha512-h3hRuXrWcaoo55Vh/T358e9cPIlhRdEvy/4JL/YJKH2qpktRwaZchuOtcN55LfV4zkyQyttdoW6Q1ySGR+cBuw==","signatures":[{"sig":"MEUCIQDiz4UTBde5z+5Dyu145ls4Aklq1fYmOKOq+OR8Lq/QggIgfFa+uwk/oOBZyzdRvDEojnb0Ayg8lCXtxcgMoPcD/nU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":482699,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh6YWzCRA9TVsSAnZWagAA4ToP/0RvEN8vNcw5vOge+FFj\nZCXIwUzgrjbzxnUmd8Ed7DKPWDyqf2gYwX+YohDRzzTBNqbA+X86FGdxexMM\ndZQBSFHZu9+643WJZNcvfa7GgddwMULe6tBd9NXItBh4A6Q7DdLNpfjhQ6v5\nrJxqSG55MqR1XXsIYaRYYKWNwoSci0TJbvXH6XieE3R6fDiGHvJ67q2J+Top\na1PI1D1DmbgVa8/ahzHEKYIxdjLEyo83md9OSNg+KFEXEvkuqUsQY0Z6s+FM\n7XTPDjFvII4VejC2etPNV3X0yMSIdFnDIXZ7tAjiR+BlJXPi+OX40Xe0YPFB\nbPxur02WRvOQkyRbTbmNDdd8qTb1Rw1dRuV2gB0LbyQo15hUOmn+kXn/1zt0\nhwIe7MTM7JS8a8jlwU9v8BlIExGM55SMQVvXAo8/aQnChRy+4Zso7B3KZUM4\nqQRKJMvJf7Y0SHvEeHpkEr+/5HHtsbx25OEnGSCF98FkoBjyfFCBOsTVZG/A\n1BRlIXdmfW2e/6gVqT7NasDqU/B7zdKJ1QmXdGmE1K8cA5O8p3uBMAgE6t12\nekQW3dyAfNmMcluztPiIqYiIJFyy4ow8mvcYHGVNsATQrmbCWIUdRDFN8GGk\ngQfBVr5gVxq7ipPUmc8XeSYc1lqe7iiAghtU0tQcsxsSDlrjTedabIhslmML\n7X2u\r\n=bndc\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","gitHead":"517a69ce336c77c68b8664b0d7fdd020a4ad50da","scripts":{"test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix","prebuild":"rimraf dist"},"_npmUser":{"name":"chanioxaris","email":"haris@clerk.dev"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.13.2+x64 (darwin)","description":"<p align=\"center\">   <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">     <img src=\"https://images.clerk.dev/static/clerk.svg\" height=\"50\">   </a>   <br /> </p>","directories":{},"_nodeVersion":"16.13.2","dependencies":{"query-string":"^7.0.1","camelcase-keys":"^7.0.1","snakecase-keys":"^5.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"got":"^11.0.0","jest":"^27.4.5","nock":"^13.2.1","rimraf":"^3.0.2","ts-jest":"^27.1.2","node-fetch":"^2.6.0","typescript":"^4.5.2","@types/jest":"^27.0.3","@types/node":"^16.11.12","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.2.3"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_0.1.1_1642694067408_0.05264768926054342","host":"s3://npm-registry-packages"}},"0.2.0":{"name":"@clerk/backend-core","version":"0.2.0","license":"MIT","_id":"@clerk/backend-core@0.2.0","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"478393a77303206527ac9f216d399185b75ccf34","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-0.2.0.tgz","fileCount":410,"integrity":"sha512-9uaz1rSIpOvGZeb6kqs4+XwcWjMHDr5TsEj+9VpG6Fm6AXpsrB+i2EaLImge+/PkgfrpJzMo+QaU7jrkLlsdYQ==","signatures":[{"sig":"MEQCIHdaN+Q/zQWjfbN8FbGQCRP7GBuUMnh35wRuNHXA67XYAiBt23BHqSVWhburUMCdyIH1PMbE7PKIu5qtbbViWVoUAg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":491442,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh78urCRA9TVsSAnZWagAACWAP/Ao/lc9ko02W3oRp7gOR\n8FSwR9pKBpPg/EtSJSWvU43UoDZXbQ+sxI2dJQtbj++dy8F1dfW8PC+j8ED9\nFQO2bL4bIh1gJvSIurc6Hq7T3c3aiZzNPnaEofNehBeJpNhNyS/KI0yP42Qx\numfPSEOsa5yieZNcyhvi8Zj2ZPsGvKrEAxNFXxqLg5VBaLhtvTvFWFWyY3co\nA3Lk9MdHM3lmkyiFls4Ve/l2Xf6tnyZPpDdlc4KJlwdpQ4NNXJMwdJYD4gm/\nm1uRsNhSLFfNfKyoenenD7tZY3+wNRLq1b5YYEz1gzTfClNHmKS6j8fS7W2w\nK5m/u7gty4j/V5TuE3TGLVDgMLc8NRrSrgv6VLPVhCzDeS51XwdHJ8azrhW5\n5vZPpLBiu6ckRdF6SVFg/nWoS+g50uI+RiTUY2FsXS22ufEI/0jpQj5I8A1o\n5l1LcGcjfOfpBG6RkA6P21F1MDjGcbRQ6c1hmNcVQUdYQ/gB2zyCwCU/nyX0\nh91uxR8khFI8PZwTt2d81gGUagkmaSMSH+VmqRF78t62iPozWZoxegULifyM\n6qLi5Zmq2fsNVyvKDPlYJnHvsPYAGpFN2ESRM4nqWsyIZQOzvwyRHjmYJtrm\nlKMvFPYzb2wYaRwvrVn8tv8/z0OIdtjVm361MeDmyhA/lQw7jV0h1VhoQtDn\ngT36\r\n=u8kX\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","gitHead":"368a688034b36e6b91bceafce35be7811e58dc43","scripts":{"test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix","prebuild":"rimraf dist"},"_npmUser":{"name":"sokratis","email":"sokratis.vidros@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.13.0+x64 (darwin)","description":"<p align=\"center\">   <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">     <img src=\"https://images.clerk.dev/static/clerk.svg\" height=\"50\">   </a>   <br /> </p>","directories":{},"_nodeVersion":"16.13.0","dependencies":{"query-string":"^7.0.1","camelcase-keys":"^7.0.1","snakecase-keys":"^5.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"got":"^11.0.0","jest":"^27.4.5","nock":"^13.2.1","rimraf":"^3.0.2","ts-jest":"^27.1.2","node-fetch":"^2.6.0","typescript":"^4.5.2","@types/jest":"^27.0.3","@types/node":"^16.11.12","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.2.3"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_0.2.0_1643105194694_0.3309908599808351","host":"s3://npm-registry-packages"}},"0.2.1":{"name":"@clerk/backend-core","version":"0.2.1","license":"MIT","_id":"@clerk/backend-core@0.2.1","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"d7cc6d7a09e6c7ae8aab493b8f879a0440c63c98","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-0.2.1.tgz","fileCount":410,"integrity":"sha512-i2yBSEkVCTcC17rj/H3wXHB15OpRtuyS8RfdvN3eu9vSnvfw/TZpRB9yItkoT6jkC287lIuhccXcb+5h4wvypA==","signatures":[{"sig":"MEUCIQD5m3a+fNI5xXUoFTmqmQO1XDgix8ToPpNl3oB+hJ0sBwIgdlzDj134PC6rhKRyEpknbxySJBWrBdFQVdmZ8hMVAfc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":493792,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh8TIxCRA9TVsSAnZWagAABNcP/3ZBB4xJx9PhQacNa5nT\nwB9/WTTr9bG5zmbgl65q0OsWuftYVRPGFjGrkNTEvBXt8a2/kiKz8dAKv1ns\nZBEDKO3EHqDnsCX+HYQzkxapzXsTDJ/4mGenRlOMTQAretzQ16S+HkVmNiTC\nh5XMRWYTkM1RZpWtBI0J60hwgeLuVGJE7d3V2hmnVDe7o9HAROlq57jdZ2AH\nKxZDHUfZaR80ix2X40SrpZob1DpZI33rOjNffXgIqDzmU35OuGxm87MI65Uk\nvbV04Vh13SA9SA8MFkeOu0GT5fXY74FH+pTJc2ZvT1fZZ3FkeDsakgQtlG9V\nS0V/K8TXdBxXgIcVKEW3l4RJJATb4wprGuPnVpDObnMpfxaRUKpmY1Arb9HL\n/PSS7G9ULYqhnnhpFdi+Uoa1LqTn8UFUu3XVwhEAF2doo/BHzeun+b+gB2yT\n8LE2aqd2ju67fGsqjQW8GHUBDAIS+bw1lBFn8Wxxm5qpvKCxTysIes5ieHMH\nbyvh92s33UvvWzf+eoEKvvXFOSHe9vwM/semOMdV6FiDhFUhc/rYE6yLNShn\n2cCPTjpIKe1FQjB+SDZ3ZM83nraCsolCR/NADHGg7KMELtaXMAPkDeNGZdBE\njpxN3GLzlL+FWOE7ZgGJEg7ZkQs2/ghdtkP7pBeEIb78ObUUZBOS48oTz1/V\nDQSL\r\n=hyBV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","gitHead":"d3a513d24badaeb45e29cf5ec9793c2b309d9673","scripts":{"test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix","prebuild":"rimraf dist"},"_npmUser":{"name":"igneel64","email":"p.perlepes@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.13.1+x64 (darwin)","description":"<p align=\"center\">   <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">     <img src=\"https://images.clerk.dev/static/clerk.svg\" height=\"50\">   </a>   <br /> </p>","directories":{},"_nodeVersion":"16.13.1","dependencies":{"query-string":"^7.0.1","camelcase-keys":"^7.0.1","snakecase-keys":"^5.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"got":"^11.0.0","jest":"^27.4.5","nock":"^13.2.1","rimraf":"^3.0.2","ts-jest":"^27.1.2","node-fetch":"^2.6.0","typescript":"^4.5.2","@types/jest":"^27.0.3","@types/node":"^16.11.12","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.2.3"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_0.2.1_1643196977400_0.7539165995362631","host":"s3://npm-registry-packages"}},"0.3.0-alpha.0":{"name":"@clerk/backend-core","version":"0.3.0-alpha.0","license":"MIT","_id":"@clerk/backend-core@0.3.0-alpha.0","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"14bcae25d476a6f8b1421f1300c310a26054a64e","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-0.3.0-alpha.0.tgz","fileCount":410,"integrity":"sha512-grg0L9r7hoL8erTMmsj2s0KnYfRm6d1475AqD2s6fDpSgOlc7FPmc/CxXsJkYHWumrs5D6mJGlHIK/Al8SG4gw==","signatures":[{"sig":"MEYCIQC7FowMx3VpFGC90koftvete9sMsF6Ypw3qVfHfviz12QIhAPTc26+6Iy6tHtPyrrORK3OJ7PD76ELcS82w0ZmlBg+D","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":496140,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh87E6CRA9TVsSAnZWagAAG/0QAIlu1XDhYEqgkJ6EDiyF\nEHsFSbTuhAuhjlSCzuMGTuViA2sc7zzV0sQ8bzCdmVwTCJIdIHxMkkrHzU4k\nZxvyfD76WQWRn55zn4cTHO2AAKrZEu41WScCA8SPzesoNbGFbw8fbddKF8d3\n4gfLSsua+kUB6PKcil6GN1dG+CBygeCJG7AYDBCE9l7huuZzEYW+Ooq5RE1v\nu101ihgxXcRn/F6PLO2U88WxkehhNLLJ/+i7Cb3NfWXzxqggja4+vYgXs4eR\nFiB5Kb30g/McM+ajDYSYNVtl3zs4j/EveUUDLrXzB2ZtFH3jurbokMF7R2F8\n5LNNioFh+20NVPJqGgiYTeDW+48o3TNIw72tgdT5rzZIEBT+d5uzbnLo2ZB7\n1NtCLh1XPaBWKSu1jD5SEYM58zSvsroomzBsjUkckMxAh3Ur0TW249jW5d32\nj4NaRa/lijbpFX6cz+oUKYTYZ9jLOfD72JeMSltb2YUhX85uzC+qlmq0I1xr\nwC0lZ3b9qiEH79oDu7BGA6lt1RaLnjsOFtfNVzWlv8ChX8ks4NmqzKpiZCrY\nUneHHIzXfPbVTBFfy7ntE6WL3MeMtCpobx7MqAAptq7TZcVd+vPMgCw4GzjB\nWX8L3ZzvNd8z/lxnXM2R9I84OhSD/1Mey9yVAWF52Zr4FQFDTREvGdj4zYLi\nZK6/\r\n=Kd1m\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/clerk.svg\" height=\"50\">\n  </a>\n  <br />\n</p>\n\n# Clerk Backend Core SDK\n\n_Core Clerk API resources and authentication utilities for JavaScript environments._\n\n```diff\n! This package provides low-level utilities and is mostly used as the base for other Clerk SDKs.\n```\n\n## Usage\n\n```sh\nnpm install @clerk/backend-core\n# or\nyarn add @clerk/backend-core\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\nwithout being platform/environment specific.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendAPI](./src/api/ClerkBackendAPI.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendAPI` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (\n  algorithm: Algorithm,\n  key: CryptoKey,\n  signature: Uint8Array,\n  data: Uint8Array\n) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\n\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendAPI](./src/api/ClerkBackendAPI.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://docs.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendAPI.ts#17) implementation.\n","gitHead":"e1c09f349fe1334a728e843becf221b91a412343","scripts":{"test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix","prebuild":"rimraf dist"},"_npmUser":{"name":"chanioxaris","email":"haris@clerk.dev"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.13.2+x64 (darwin)","description":"<p align=\"center\">   <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">     <img src=\"https://images.clerk.dev/static/clerk.svg\" height=\"50\">   </a>   <br /> </p>","directories":{},"_nodeVersion":"16.13.2","dependencies":{"query-string":"^7.0.1","camelcase-keys":"^7.0.1","snakecase-keys":"^5.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"got":"^11.0.0","jest":"^27.4.5","nock":"^13.2.1","rimraf":"^3.0.2","ts-jest":"^27.1.2","node-fetch":"^2.6.0","typescript":"^4.5.2","@types/jest":"^27.0.3","@types/node":"^16.11.12","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.2.3"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_0.3.0-alpha.0_1643360569962_0.07839508437421294","host":"s3://npm-registry-packages"}},"0.2.2":{"name":"@clerk/backend-core","version":"0.2.2","license":"MIT","_id":"@clerk/backend-core@0.2.2","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"62cae6c529c5f3e7adf218322295d0385f74ef2a","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-0.2.2.tgz","fileCount":410,"integrity":"sha512-VBEdkCblKIWAZsK8of4fUSHxzFwmMGIVYeJlC34DFnOKz/EERY6UfKiMRRZPAuMrw1tVfDEVnmWGXBOGBLiSwA==","signatures":[{"sig":"MEQCIEwqnoCCWRsu0//gtfeGX0FiT11gLRjdx/N5P0Pf2X7mAiAciXlV3ebAf0EnuKVqqLdip4vRsjarBR4U8fdofW7xhQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":494345,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh87fDCRA9TVsSAnZWagAA+o0QAJ3nz8ZZaEC8KG4vrBav\nEbGeV7VdUV3gpGumb+A5d1l06v5QyifBNYYaUtxrhHKywemQxqIhmgnVdvYn\n9lc78rHPt7LwXDT0dLo6COT/jXvQl0jABuiVGVr1yCYHoGf85ZpFt408T6zJ\nr/Oq+FaQV3TEdzdMMH8eUTEPXe1r8ZHKo2uEwHFTUdSMfPQF8/ub1mbVZtzm\nhTdSXxBo/GSyhqOVGKxvl0QL+oAdSv73wA+IYyIoKg2dONvrDMaV77G2mp+I\nA6lE+wQIPbmIglNCkwTDfnwj5BGw+tjoEjJDYJly+4jpsuVioD/3a6proH58\nBV6IQPnGtw4dpjoGSEUO6Aqd4ceiP9w8NLhmVpQU4ofShES41JuqnSHTfS64\nuFWeXaXnic3WVI8brzeur7ZHKDwYQ5sDAZAzdd0Oy3e78OOXgPVlIeUoe9y4\nGhR5l9CfLjQ0AmmCngmiVSOZKdVNzY2FC8JYh4hctW3rYAowENHd1A8Efpdq\nr3fGF9qe0hOqGhllttVwWOewpd7HLUxrseyxAPH1x2bPJ8mWX/i/4dBPmxYJ\nB9w84h23D/p7W9nK7Zk9r9WryYoJiNFt/Mb6K8tFqnxYaPtOvlrMyADwi9j2\nvQpjNBxJxScXKh8yyKPjVThherIuUl4eNSuX+bOisEJXnYCwkSHLc6og/cPn\nWWrh\r\n=B+gI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","gitHead":"eea2fc7e06dba90d74ed3785d2f4e54a58d20429","scripts":{"test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix","prebuild":"rimraf dist"},"_npmUser":{"name":"igneel64","email":"p.perlepes@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.13.1+x64 (darwin)","description":"<p align=\"center\">   <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">     <img src=\"https://images.clerk.dev/static/clerk.svg\" height=\"50\">   </a>   <br /> </p>","directories":{},"_nodeVersion":"16.13.1","dependencies":{"query-string":"^7.0.1","camelcase-keys":"^7.0.1","snakecase-keys":"^5.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"got":"^11.0.0","jest":"^27.4.5","nock":"^13.2.1","rimraf":"^3.0.2","ts-jest":"^27.1.2","node-fetch":"^2.6.0","typescript":"^4.5.2","@types/jest":"^27.0.3","@types/node":"^16.11.12","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.2.3"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_0.2.2_1643362243243_0.1840381233249917","host":"s3://npm-registry-packages"}},"0.3.0":{"name":"@clerk/backend-core","version":"0.3.0","license":"MIT","_id":"@clerk/backend-core@0.3.0","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"cc19ba06f43b3506deed3536d38d59e25e348d06","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-0.3.0.tgz","fileCount":417,"integrity":"sha512-pI8ZukByOOmClQLld2Knh/f94u4BshUpac22k+ljMuRdlEDLPMnlr2F+tcv0uloy7u2Wf5Drk3CdZgNXPyVA2g==","signatures":[{"sig":"MEYCIQDqEkpthUD0J2nJYcCdTZY2Lt/xWr+WAMcWGRxg8YdaFgIhAMV4RbPWkFKqtMRSdH0nXax6GXoVYSI7jtmVWg6tKK5q","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":509449,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh+lGoCRA9TVsSAnZWagAAPFMQAKDHh6iQ5GqWwqcqe1qy\na5mOA7pb2cBp9z40LRwFPea62zHFJ40tjZKW7FEEr+InZjEaWZ+aw5NTeu2z\n1A6BUWKIZj2Qq/qzzEmcYSo/+VdMCj7l18pc6QwjfH5iUy4ZfPqURbfnThm2\n006/mxSsxsp9xwQBkWc1ZrYMTsZvvRaEbouRcsHy3lu0oWDcFC4hTz7of22f\nh4xNdaOzl5S7sP0wNO+0xiN4uQYKmozbpWk6rOuhyK1YTJ7SrUw9PaneftrK\nqHVrob/IifPFxJS3EQ4Dwbg6UoverfAKn/lvI+Sqw3hvWRANUxHe8r+OTQ9c\nz60/r69TCYFey62TYd96hF5thpa35dvC/aMX/HK4oFeByK0vPhkIPAUb86S5\nFYBeyna8tInaYx/8rccedlGlwoTsdeomWDxX1MMKqhVuR0FzqW1oLdXrZpoi\nToJLcTN6oAkEmcL7hnjifO8zkUcu05Qy/SKpB4h7bdemRDNgCbpnALGftUow\n6CF9SnMyG5E58TKOz3iuZOdSIzp671aEV/eZeQWZK+dcgbjLqV2BE7mN/Nlb\niFxogHOSWV39VsRLgswMbRiFiebnTreiyWj2sS6HZZk9BuKGpDl/nfueB2VC\nFwjv692llarb2RbKleNPW7+5LB8k8FpKpkzAsMA4RFkZivQuxbF6UF2BH2Yn\neAVd\r\n=N86g\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","gitHead":"bbdc6709a781a437e6e151d11cd707c21e4599c6","scripts":{"test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix","prebuild":"rimraf dist"},"_npmUser":{"name":"chanioxaris","email":"haris@clerk.dev"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.13.2+x64 (darwin)","description":"<p align=\"center\">   <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">     <img src=\"https://images.clerk.dev/static/clerk.svg\" height=\"50\">   </a>   <br /> </p>","directories":{},"_nodeVersion":"16.13.2","dependencies":{"query-string":"^7.0.1","camelcase-keys":"^7.0.1","snakecase-keys":"^5.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"got":"^11.0.0","jest":"^27.4.5","nock":"^13.2.1","rimraf":"^3.0.2","ts-jest":"^27.1.2","node-fetch":"^2.6.0","typescript":"^4.5.2","@types/jest":"^27.0.3","@types/node":"^16.11.12","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.2.3"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_0.3.0_1643794855970_0.5167049438971973","host":"s3://npm-registry-packages"}},"0.4.0":{"name":"@clerk/backend-core","version":"0.4.0","license":"MIT","_id":"@clerk/backend-core@0.4.0","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"162feb77bade44198bfc1adb99f3c930861ef7be","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-0.4.0.tgz","fileCount":417,"integrity":"sha512-CNN/HIccKKY8VyXNWt1XYUfv7FOQyNV46rSGwh3pdpf3/ykQOWHBUWuRR1PCd9uB9ZqH5zNgukUxnY/0J1h4Ig==","signatures":[{"sig":"MEUCIHRYQjFnkFiuK+nkgUDxT+38Mekj8Czj7eS24KbLOPUPAiEAsDrg9x+pxYCX+OKmFbj8C6l6RvzfSqbbHZdMLYBgcMw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":509938,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh+8LICRA9TVsSAnZWagAAErAQAIr4/M493DeUUlyeYVkA\no/IZSfb0Uz+rDlXWbneMn27Pu/RZq7yb3DO9/r8QmwlKfmW9yvd82qqbcf7S\nzyNzM8zUf6xmD4w1r2//dgmXr5IaRiPGvRxZKbwHWD1gKVrrhuap+Y9Lasqz\nlFj+1tTjrkVcFcMxEoAKUzTNwAn2VcjNkbaTOlAE8PvvIR62XuZK6J9uB795\nJjJnwDvIlXWWQ/1HBkCED8Ds0V8MdrAfgbK1DnuvF3q3IT72Nq+XCXJXrsn2\nJx2Ks67h56zVvequCYQ01HuAMW0sR5+lBPBfz4QcuxVdHdNFeMB/apkMYa3P\n0yd4XEahIAI7QdRYnyQMOZC/6yIDvdWFkkSVesLAZwP/1h+S4sbz1Tg9Os9B\nEVqCcy2T8XRxHn8GyqX0fyIa+nnySgfDBvfWLNT+KkfWDKjCfmgReqzOP6k4\nivRM3RMQzBCt0AWB2b7rXHmk9lUq7HJqeeYRFB0zu7iIeKljZEDpLyIln9jz\nd/yVw18KF3l86Vb5rg+qm9fp31Zuptz3tLXju29fGKwdhSUIB+JaOIBA4dh3\nxrK2/XO/K+tOKQpG8rxcH/rwomQPDnvRxS6zCrpXqql0VT+ueg7tB5v6wyJ7\nUbL81j6+PEmMopyzXxBzpfrs91r8HlYHFBCqIncjxNc2Ad656wVU9EBKfCbZ\nAlUB\r\n=LNlF\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","gitHead":"aefd4139edae92e41c47520f7a0d3d4417c13c6b","scripts":{"test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix","prebuild":"rimraf dist"},"_npmUser":{"name":"chanioxaris","email":"haris@clerk.dev"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.13.2+x64 (darwin)","description":"<p align=\"center\">   <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">     <img src=\"https://images.clerk.dev/static/clerk.svg\" height=\"50\">   </a>   <br /> </p>","directories":{},"_nodeVersion":"16.13.2","dependencies":{"query-string":"^7.0.1","camelcase-keys":"^7.0.1","snakecase-keys":"^5.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"got":"^11.0.0","jest":"^27.4.5","nock":"^13.2.1","rimraf":"^3.0.2","ts-jest":"^27.1.2","node-fetch":"^2.6.0","typescript":"^4.5.2","@types/jest":"^27.0.3","@types/node":"^16.11.12","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.2.3"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_0.4.0_1643889352090_0.06109736570239188","host":"s3://npm-registry-packages"}},"0.4.1-staging.0":{"name":"@clerk/backend-core","version":"0.4.1-staging.0","license":"MIT","_id":"@clerk/backend-core@0.4.1-staging.0","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"5a82fcb39fb1e172132a95f74e04e5d8d9dd5399","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-0.4.1-staging.0.tgz","fileCount":417,"integrity":"sha512-xenIbSzkNnMjy87t1bI34+Jc6CCq08jrF6iBxRSW+r8JlvjtWlvSVDhH7y8Hum5Str4/qACVyp2KQ39f4nX+5A==","signatures":[{"sig":"MEUCIQD4o0oVjEGQbkgxHishP6JEdClKjgu/RI9g/DO9RwD9YQIgZZ/a7So0Sfnec/20qNruPMjgRi+ue06LHBZPK73g15c=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":510289,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJiBlIgCRA9TVsSAnZWagAA8G0QAIIo3GaLIgFsqPbB+ApC\nQeBEWsImkR3/xP7QfFPVHNBUAaPsmXpjRVcx6ocZERRga0XRrymfSQ9PpFhS\nq59qG9zdy2G4P9967IIJUbqEE/d+ek0qvn6hnxDR1uPXpIagEpy9xAcxtLES\nd6jv+kZB00rufDLUAymDIuJzGXT8ZBhjf+5hbOj1gy/Hl7hzIqMQJ59jLIWD\n9NW9hvik0S4vrrA2Tbjv0+rgf3lJkLccBE4KnOiKKH2ysi86jYcGRJPyXl5P\n6usUwUbCNQNiPPENqgfnoB1xZq9em//Y1ixtaNccTFmUjIY1ueerK8ok16mL\nHs6LnyS4VPyOQ44Vp17OFyLUNezbfn6YdvuUWbf9WxXeBINRVkB8aJnVyFz3\nhcS3lKUqqXrCDoTNnf2O5zsg0vNd+kRlw+1TvqB7epxy/HgMcvGVaLE4Qta9\nRXoEYyfIFV2hbE3wFKiPLl/+UqirVb/wOvIt964GhxV0BfV8ZaXykfw3XjOl\n0zqw1QUzFOlt5WlWvIPeurnjglNUcvK7J47X4nk1kZpI2Z5C/ehUzOLdbMrY\nzTb46BzSquv6HKCbM8yX2ZOBjmGULY+bn2sEKrtBkKJxeRHCoYKe8RL3qq5Q\nbzeGppSlLYgtOGGTAR8K5VjVu1HzerIjmyOHRKBR/jJl6W9qpXNqM1/Ytzhx\nUZx0\r\n=sN5K\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/clerk.svg\" height=\"50\">\n  </a>\n  <br />\n</p>\n\n# Clerk Backend Core SDK\n\n_Core Clerk API resources and authentication utilities for JavaScript environments._\n\n```diff\n! This package provides low-level utilities and is mostly used as the base for other Clerk SDKs.\n```\n\n## Usage\n\n```sh\nnpm install @clerk/backend-core\n# or\nyarn add @clerk/backend-core\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\nwithout being platform/environment specific.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendAPI](./src/api/ClerkBackendAPI.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendAPI` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (\n  algorithm: Algorithm,\n  key: CryptoKey,\n  signature: Uint8Array,\n  data: Uint8Array\n) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\n\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com']\n\nexamplePlatformBase.verifySessionToken(token> { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendAPI](./src/api/ClerkBackendAPI.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://docs.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendAPI.ts#17) implementation.\n","gitHead":"31563a57cce5e8ae3173923e7a8d3289bddf9928","scripts":{"test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"sokratis","email":"sokratis.vidros@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.13.0+x64 (darwin)","description":"<p align=\"center\">   <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">     <img src=\"https://images.clerk.dev/static/clerk.svg\" height=\"50\">   </a>   <br /> </p>","directories":{},"_nodeVersion":"16.13.0","dependencies":{"query-string":"^7.0.1","camelcase-keys":"^7.0.1","snakecase-keys":"^5.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"got":"^11.0.0","jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","node-fetch":"^2.6.0","typescript":"4.5.5","@types/jest":"^27.4.0","@types/node":"^16.11.12","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.2.3"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_0.4.1-staging.0_1644581408256_0.6053721298527697","host":"s3://npm-registry-packages"}},"0.4.1":{"name":"@clerk/backend-core","version":"0.4.1","license":"MIT","_id":"@clerk/backend-core@0.4.1","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"94d5fbbaf43d4d68db52e67ed6bd6e7fc0104fef","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-0.4.1.tgz","fileCount":417,"integrity":"sha512-hHQCTfXLW2QzGzWlyPSjxmk4xHloXDAiT6fpWGy6mhaE36rAscPCDMcWdPnVz4Z09CfZNunqhjURbghqgULU5Q==","signatures":[{"sig":"MEQCIDRmmyXVXoblY+Cp+dhaSZC4G3UuZin49C/tLeeYU0umAiBbWnRod3KjKodhsdJMPtj4lLUqE9yv1OXpzLUS6MV1qw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":510660,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJiCjFzCRA9TVsSAnZWagAAPx0QAJLTJSyroS9U/7FuV/18\nGXz4wCUt2UyuqKh8s5DqKZshmYNl+0jX7s88zsx1OdKeF4+tZn2+rCz+ibz+\nS7LGQ2zHRB3NGqzRw++SlT0bJeYw8hCkuMTkdyl9N26gJOcwVp+wK2AMXWsB\nvxbR5tE18u/BOfqq3/jUWWBtsWSA4efOln4St9nliemxxzSla0ecwYlQ/sdi\ngp2xdLNRpYzEsNPtYfb+uEpO8KFc7dvCl044ofAgfx6AaG0EtEOTjLRByRzS\ndPVHarz39YvA3Vcp9jd1ITlMAUZp7z8kwvl5zxqB7ilHVIG1ON/B03KthcC8\n6e5RBpxJdYnR1Fpi6hYWq661br/XKpP9ZeTz7Bt1yhFAo5a5RVfosn3+DLfq\nDs9r5SXcI+KMnjQ/es9uA7dLO2RjuU0Iv8CcdmOYiCi1NnvboDLUo7t2dd1I\nangLcrOdnlo+SB/matPwbksJg26+tnBOPXqDjGCnnNAILYKA0qz2PGoIn7Sk\nrJUGDRB7HxtIHisPcV2zoXtkHLCj7iTfCvhhnnOGH657m+uC8db7uR30ObZj\n94I6kQtyUaxy4rEiRhY7ZWbNvB2L3wNQKSPo1YtM5dQT9Avnqpkv+3WuKPwf\nog2Y9Y/zcEQhumqgeFLHczKPtmxnUw5H1CRLF/KDx0EjlrSKx8qrbBpBz+Va\nu96r\r\n=RYez\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","gitHead":"24430df0b2b9f1ee10c45ac70bfbed822f17dbbc","scripts":{"test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"sokratis","email":"sokratis.vidros@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.13.0+x64 (darwin)","description":"<p align=\"center\">   <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">     <img src=\"https://images.clerk.dev/static/clerk.svg\" height=\"50\">   </a>   <br /> </p>","directories":{},"_nodeVersion":"16.13.0","dependencies":{"query-string":"^7.0.1","camelcase-keys":"^7.0.1","snakecase-keys":"^5.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"got":"^11.0.0","jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","node-fetch":"^2.6.0","typescript":"4.5.5","@types/jest":"^27.4.0","@types/node":"^16.11.12","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.2.3"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_0.4.1_1644835187011_0.09949517290972354","host":"s3://npm-registry-packages"}},"0.4.2":{"name":"@clerk/backend-core","version":"0.4.2","license":"MIT","_id":"@clerk/backend-core@0.4.2","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"890035d83e24a7731859c19f810490dde408ccdb","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-0.4.2.tgz","fileCount":418,"integrity":"sha512-UjGT+7ogmsHLCZxP65RZuZcneBjYVaJVEY1Y4KPmSX81ugcbJWGjQaQws7JAZyBfddBQOwz5z1a9Appq3SB20A==","signatures":[{"sig":"MEYCIQDZXIqji1DXtS2rr0PZ1ffN4cbOZ7RTRTNBQ15wnw4SWAIhAJaSFKoIKXaSzv7OQxGQCMdUBBBiJ5dabVmo7b3iDcbE","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":515057,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJiDNahCRA9TVsSAnZWagAAgGMQAIvDKq0K5xs+DPuRjdMG\nmz+8I+bb98ydh5gA5R+nRmmBtnYZVp5h/tP//OUHn9KVYUCl6alK16ycQTM0\nmLdxGAukXeQOnmfSfFX5x13CP76fl6zDQR0pKwylgdCNtmOTIOgSLZZsFk2q\ndHdugSCEQQK7xkVn5enjaxWtmgW6ko4YI52LGXt4084snJsmtcVY9scwn5jT\ngoX28tI+68IIv5nTwUdV95YEnQPw2D8s3zv9Kg1afKgVYXKwc8Oc7lg+Vyye\nEcJT6epyVjjw2Dcv4IFLKDYyaFjov5VJWo18Umt92nII0WNZZ13Wcxn2XIlP\n4IrY8KDbqIUMDBtfI+Vc/bEPV3f4rH4DwrFG4z7daOhll17b1noxFJzO7yH5\nUDwViSjNhfMgW5DonqHLeqJo91PjARTVytIQMZEGZ39oc5s4CEYTvngsiaqK\njW1o7OzdlnwM8nwMEX5sM4xvXdXAcAhII+s1Qcxc1eyibSJYCE0R1yWOux51\nUwA3QpLhlhSkH2ubKBagFnV2KYk1jBLxyZJX+uxy7G9sFefVR1G9A4bbiiC/\n9H4DQD8lLC1NT+m5RjcW9DOaDrn1fqx5JpNn4ny/JTPTPUaqhBwa4C5Vvd2C\nbY+jSZwKyuBMZYQjotFgmvaFaagIQc6Kzwyk32Kxdex/fAbdv2aKAukv5KLP\n0Zv9\r\n=guN/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","types":"./dist/cjs/index.d.ts","module":"dist/mjs/index.js","gitHead":"3890b6f3f9afc14619654b89dd62b46068543bdf","scripts":{"test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"sokratis","email":"sokratis.vidros@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"8.5.0","description":"<p align=\"center\">   <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">     <img src=\"https://images.clerk.dev/static/clerk.svg\" height=\"50\">   </a>   <br /> </p>","directories":{},"_nodeVersion":"16.13.0","dependencies":{"query-string":"^7.0.1","camelcase-keys":"^7.0.1","snakecase-keys":"^5.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"got":"^11.0.0","jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","node-fetch":"^2.6.0","typescript":"4.5.5","@types/jest":"^27.4.0","@types/node":"^16.11.12","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.2.3"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_0.4.2_1645008545557_0.6200561615810165","host":"s3://npm-registry-packages"}},"0.4.3":{"name":"@clerk/backend-core","version":"0.4.3","license":"MIT","_id":"@clerk/backend-core@0.4.3","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"c4ce7168033c0d6b736101acc58b9ce9f17e7630","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-0.4.3.tgz","fileCount":418,"integrity":"sha512-If9scF9gFpYfEu7EYvlhJ6J6LwqktuWXNKm79WurhbqC91VQ9oISu0kK6s8y9QL6PJ8ZjVX+RitSFmdbKoGElA==","signatures":[{"sig":"MEUCIQCVePs0tDErJNPCNp0NP8NIhqXACVI8FCSDCW37xVM+MAIgDbTu4JAgZ4Cc511Rt/sUP4+JrjqGwV9bNCqcu7pqodU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":515375,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJiDNt8CRA9TVsSAnZWagAA7doP/inBqAuKPlqKQCLZZAkR\nUSYhtIA4DRD5vN8TKPSrSuGcPQxVEFkFb4KvyQuhIsZGwkaNqvsvQ5nceQeC\nYskjzu5v3MKRueFqiLDU89mIp1Fjl8PavAR0kc5tMEJKv371G4mbCv1/qETs\nfeeHMxsuQ8Wz89rTIfeBu8OaUVDne7ce6L56Ie+IjlrR9u23A5FRdkCwybdx\nx1ND6nA0R7VBer4MeQWutTrtX91u4aPKFwgtwU1Knpxzw9tbrzd8wcQ+h3MC\n7xI1MtF7kd/5ephwqgrU8K5r1jHJ6uPXLT8U908Zg2NmGWMrHoVDrQG4GlIp\nYgwY84z2weTxr2u+UxvZDNSRougrP0Ugdq+qKCX8Npr9WFE9BPacD/Bgq/6U\nmc17jJVSpmJLzGPQZMkU1NIs4nFOD9Xthe912luZ6qeKI/6SJgL6lNS98riq\nb1DKeQAybfIOVeyeNQ8MzgeCBZkN1u1omy2wv1pAHyN5/1ITtelSwCTZ+3LH\n4UqML1gHw+9U0uPIVFcgO9EG0yqnaUUTBEYBdoAQZ5K53LCuOqAesc1JaB+X\n+y/7teleoDOeD6ZlR7YM3i9wK257RFIXcqSbKuHTyz2uLXRVZVppzTow3/0H\nHhaQYyyCGamNgg1HPHkpcSOtarD9GiIt2yjh1C/edLXFH29lFudUpNGzswT8\ntBml\r\n=seHV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","types":"./dist/cjs/index.d.ts","module":"dist/mjs/index.js","gitHead":"e6733a6aa307096602fa631c37cf0144937f7522","scripts":{"test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"igneel64","email":"p.perlepes@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"8.5.0","description":"<p align=\"center\">   <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">     <img src=\"https://images.clerk.dev/static/clerk.svg\" height=\"50\">   </a>   <br /> </p>","directories":{},"_nodeVersion":"16.13.2","dependencies":{"tslib":"^2.3.1","query-string":"^7.0.1","camelcase-keys":"^7.0.1","snakecase-keys":"^5.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"got":"^11.0.0","jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","node-fetch":"^2.6.0","typescript":"4.5.5","@types/jest":"^27.4.0","@types/node":"^16.11.12","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.2.3"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_0.4.3_1645009788143_0.21022312315613179","host":"s3://npm-registry-packages"}},"0.4.4-staging.0":{"name":"@clerk/backend-core","version":"0.4.4-staging.0","license":"MIT","_id":"@clerk/backend-core@0.4.4-staging.0","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"36c04cf2eb122560c7d6d32a2d3632542bba415e","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-0.4.4-staging.0.tgz","fileCount":418,"integrity":"sha512-9dLRsXGPdZR8w/dmvxgz55hJlrwTrV4lIKUao9wW0xSfLqzf4o8p4ZUBa6YYdO2BmI6GfSCq+7q1mdiCU17ibw==","signatures":[{"sig":"MEUCIQDbv2HUuZOfCfUza60q0x52LamWV3Z6U1/aRzxepPjgFQIgdBgxNr3o2EFEKgcIzap++LLSz0PaX5IluX6TI4+4xA0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":515778,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiDhroACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp67g//coSDGtzGh/CnCkSA+UwOXYtcp3ZUrSoBKl6/4pTyME4BC8pA\r\nIL87fSJKNtBVXFHWciKWNC5yFSeXtyH3Mez719v3EgL8DD+WTp7vhhCtBHup\r\nNXvSsuphTgySavZpNUC+MpQ1PU28KThUvEchiKXDjksQW5DfCZ+sc+Hggbtx\r\n7gAIcTr2sJeXZlADUbXwws6hYxbN8dn+b9v2UR1VY85zjVpi6rng7BEyGlCA\r\n8hZgeZm40lAJZJZ+BVH7uDQgBcCL/QKG+fkuNqQnosfFytrG3iLG4O754NrN\r\n4g1L1jYllAWdSG3cqQm8gm+kZ3C3hG0n0yRW+Z4CHxK3aXlmkv5juPz2p362\r\ncXs83M/NVHsSPR/IbtL205zXPhh2u4MFDaJfFxYqZrABYb2MGc6cVmKxKHSA\r\nrp/FLblJMfIS/+VnRCfC8cUU65+PzQTNF4F+k98vDFSpTS9qB8jfqY7dz/l6\r\nFJNyriGTHd8dt8jhdHoLHA2NbQTf1Ve045yQ5jtKo8TANd7iWuL3Z/Bh+lzu\r\nikphIDCiGsfxdaMGgrEeleLHTHtdWhalr0i6Qv78jGWt0qiAPlQ220NnpOuT\r\nRnOgw/DNNjTaa7o3jVpp5gnclzLheM7ji8tn0FDQo+BvxBAHzUM5UlyLwNcK\r\nkLXleK09sT0cz6KoQNbgLuvK+85WbxIn7Jg=\r\n=Q2jZ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/clerk.svg\" height=\"50\">\n  </a>\n  <br />\n</p>\n\n# Clerk Backend Core SDK\n\n_Clerk Backend API core resources and authentication utilities for JavaScript environments._\n\n```diff\n! This package provides low-level utilities and is mostly used as the base for other Clerk SDKs.\n```\n\n## Usage\n\n```sh\nnpm install @clerk/backend-core\n# or\nyarn add @clerk/backend-core\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\nwithout being platform/environment specific.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendAPI](./src/api/ClerkBackendAPI.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendAPI` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (\n  algorithm: Algorithm,\n  key: CryptoKey,\n  signature: Uint8Array,\n  data: Uint8Array,\n) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\n\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendAPI](./src/api/ClerkBackendAPI.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://docs.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendAPI.ts#17) implementation.\n","gitHead":"59dd5a56447328ae6d84f19aff0bb94cd15bb5ab","scripts":{"test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"sokratis","email":"sokratis.vidros@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.13.0+x64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.13.0","dependencies":{"tslib":"^2.3.1","query-string":"^7.0.1","camelcase-keys":"^7.0.1","snakecase-keys":"^5.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"got":"^11.0.0","jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","node-fetch":"^2.6.0","typescript":"4.5.5","@types/jest":"^27.4.0","@types/node":"^16.11.12","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.2.3"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_0.4.4-staging.0_1645091560610_0.048845206866972246","host":"s3://npm-registry-packages"}},"0.4.4":{"name":"@clerk/backend-core","version":"0.4.4","license":"MIT","_id":"@clerk/backend-core@0.4.4","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"7d3bf7020d25f0f67e72813b622ec403e3ecfa04","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-0.4.4.tgz","fileCount":418,"integrity":"sha512-+KPN73tX5bI9nlha1y+ohGloMRbtSmqkiDzAIkJAFH8eyBO8Eb9N4qvH0IbOS5dPOTm6T/vXBEe1fH5HPQ+C0w==","signatures":[{"sig":"MEQCIA/9QHO9rhqMnLUaImAyd3ATwi9dd7VWzbDTt7rDKyaYAiAbFF2yi7Dpu8uieFFRmLIYJ/n6YtPZM5AR3pIbC7KtkA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":515971,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiF5fpACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr+0A/+MCo6mSHQsVRA1+cTLU8Y29A7eze4aq7qY6/P6gZ+J/02zUVo\r\n/pBqPc8RUgnx6YCtjLH26YftKNgs2EkGYqVMRcQMxhKkMXzxHE7jf2AGovWn\r\n7Le0hGzo4nSXoFTHTcgeLa0+QcNGorl/PNxhmZPo2hRheFIv6YfuCW0WuNR1\r\n1GQQWHnaAfJVSh5fy54MVI/9C3IoTF9wdYf4ZVxC0GjJacXX9eQNe3+4jBKj\r\nIwWmXFdlVd6uL2cvx87aBJAozzWwjfUlXiuD49dULGiWfbMppLnBwk4xc3zH\r\nR2ohnbTyT1PWEmX099hBVxMADGKGq65GeDDG6iAgczEagVJc3pQ8DzO1tkIG\r\nR9jVqhy/6PjWqqJR5JrGZwcojHdHfqfo42gP8etHbnVaV02VDwzopL8WeIQe\r\n6AsdA2QVdeTM/Vo6OBn6Sbg2CLfpoFa7n2yPcOc4ywFNZQpRWPN7j7pPKlwr\r\nnPjRI7HXnkLL8G/QbUgSqqVWdJ55mQlEKNNb8pNf3I67Nv6GTbiACor3BbEk\r\n9BoLLC4KfCrkUp/WQ4I0aTwATiXJ4T4wYIobYunxERrkHyA4NQ105hOy5bis\r\nI8YvgwGNI5Q/LFtnbvBV7U+gcnMD0bmW/WtamkcNZdc14nNBflaanFo29VWh\r\nZhfcl98QAeQHo1/NepFghNzsDIJH+En3iRY=\r\n=QNHy\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","gitHead":"6ce56200e8ae341bd76029687665b9b38b32dce4","scripts":{"test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"sokratis","email":"sokratis.vidros@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.13.0+x64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.13.0","dependencies":{"tslib":"^2.3.1","query-string":"^7.0.1","camelcase-keys":"^7.0.1","snakecase-keys":"^5.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"got":"^11.0.0","jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","node-fetch":"^2.6.0","typescript":"4.5.5","@types/jest":"^27.4.0","@types/node":"^16.11.12","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.2.3"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_0.4.4_1645713385064_0.23839974173128597","host":"s3://npm-registry-packages"}},"0.5.0":{"name":"@clerk/backend-core","version":"0.5.0","license":"MIT","_id":"@clerk/backend-core@0.5.0","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"de3e4684befd6800055e9ff41528fed48c799c55","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-0.5.0.tgz","fileCount":439,"integrity":"sha512-NQbN7Fjs6Btey21IjxX9fYI5MDw+fTMWAS006KZiBmxcRXiZpLHw1xyrMYOHXWTJ6dP0FrXDHWvym9eLTKYqYg==","signatures":[{"sig":"MEUCIQCIiDbMYFd9nbxEGDkqnWtizXyq5B2hJ43LCIj4e5nHaAIgOG4B7q6skYt4KjlNNqcPMCqqk/Z6nkIzneuZPkaQsmc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":530850,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiIjdUACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpquxAAh2huZIhe/gc1c1mufUmVUb8c0AYvuBO15p7YOlPIf0xpGXYT\r\n5sO+RvAW7znHdeMhShQPJPRjCcxrfyG8cPBpvID9NZzefwglgmbjuZA29mTT\r\nxA0p5KoYQWpK6YJcy01RC/KL01D2nmXug0y3pO20OnYTTaQ7zTRq98I+2+p+\r\ney0g6rwRaFDdAfpFw73oVIrfCMkyjFcFEz3P3EdqkVx/fiEUMnxqMpIUYO0G\r\n/7GO+YRmBR2aOMlpZh5c8FCK0QvaO3Ko02LxEFS8GYYCyi2vmV2FjVKzKAc0\r\ngmLBS9IOgA63C5SDEErlUCnUdnzCCqGttXgx6KkyTiUNn29bUwbOQJbRswqz\r\nrUg3cdOJ8u4ve6EOGjLhbBI95kViBEHxXruPPnB1vwOl1QhAgtGqf4bFcN/2\r\n22vI2BfZr8brMa0ZGiPB0qeenWzaihcpdiiVSSqXyFCkMt8xoVu/StZCSPZf\r\n9ml33ZR8xjZgvRQxHHSU2Y67nNLny9lQ4R9IVuOGQY0kPImp219idRnnnUF8\r\nXPP6WvRWRXq36oBfedzxAJZXi2Ylf1r4yIDR5V+J/jgUlau+RdPlVz0lKB6M\r\nKDpFFrDKuM46GLnk+hGPxSxdc9rr08174NUyAgBqmqvSiq1VSCosdIIbHPzG\r\nTfaT49lXUdcY2s7f8K/7bUSIWFF3Pfjdfz4=\r\n=xb5f\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","gitHead":"4a9d27a97c622538107ddf79ab07904b812039e2","scripts":{"test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"igneel64","email":"p.perlepes@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.13.2+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.13.2","dependencies":{"tslib":"^2.3.1","query-string":"^7.0.1","camelcase-keys":"^7.0.1","snakecase-keys":"^5.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"got":"^11.0.0","jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","node-fetch":"^2.6.0","typescript":"4.5.5","@types/jest":"^27.4.0","@types/node":"^16.11.12","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.2.3"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_0.5.0_1646409556370_0.7661113161424724","host":"s3://npm-registry-packages"}},"0.4.5-staging.0":{"name":"@clerk/backend-core","version":"0.4.5-staging.0","license":"MIT","_id":"@clerk/backend-core@0.4.5-staging.0","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"a50826a3816f709055cfe5038ca40afcabc3eb2a","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-0.4.5-staging.0.tgz","fileCount":439,"integrity":"sha512-2/noiic0juho5Z0dJv7pzmj5CAeKblVxERDIFGDPTe5y6s3biQrBcPaaJ4TddgX/hmuxLeC3B5xgAUZjPCrmKw==","signatures":[{"sig":"MEYCIQCh0LNgSvYVsH6RQqZ6y9bULxKC7V7SDuIpq36RSUhiigIhAMwG3hIGYIHiMI2IVjV8c/tX94gM6OazDBKK8qUf77gp","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":530577,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiIjwtACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoluA//alrgG5y1mceCkx5ZB7van5p0Jad79c9Gq/wl67y7bQtHiUYq\r\nuwK0baal7TrmppHI+nZyF231/Oba2PcBAcDcmQOpcplfSTXTR3tzL2DxkL7S\r\nFKAKK/B6wKzhnu23yTzKdXWuqV07DGf969Ky9JxBn0s09jWnkHLq7ef5Pa+i\r\naqFsHf6jrHbw5KlJcfMoCgolHEHE/CHFR17lTTHCOTDHFDN0b0Xjv/Ka7/O4\r\nbr+bLrHVuqkNnWxU2M5nffsNZkhoHVtC+mY0pqCEG1YaFqH6a/aqJn2Tj2KU\r\nBYrw4GQKC7MJlYVFyY4sNLuerJs1WZ/FlT+rjtxXaD+q/qjC5mSVQBLO3nlU\r\niJu8SkVcq+/K/1N0tl+9rJiQskLiCVk+E2/ziZ0A0ZUVwpJkLtNizUzsRLYb\r\nUrbeHNyhtCi+JHvMGYO37OsA3WrKIgTkYRsoSTLusuyQAULGuHRhnjt2+J0O\r\nWicYpolHXFmBnHUgbHWEZ1gh1Wwa3qxhhSAfYXSXrU/qhPKZnRk81C9rSPSI\r\nrNfXGdIWUw2oZZ83DQv9JQVuAAzbYK3YF6Veoiid2fQOS/krcXIP9aAtVJ+q\r\ntwGe7eDvME+QNdSpry30ZJIExekDxr3dc3/GfLlDMjYsSfOtis2Qy8Z6r3kF\r\njSrPg2QVAArwhvK9oZUpN6bxWInuPJEqLbc=\r\n=tya5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/clerk.svg\" height=\"50\">\n  </a>\n  <br />\n</p>\n\n# Clerk Backend Core SDK\n\n_Clerk Backend API core resources and authentication utilities for JavaScript environments._\n\n```diff\n! This package provides low-level utilities and is mostly used as the base for other Clerk SDKs.\n```\n\n## Usage\n\n```sh\nnpm install @clerk/backend-core\n# or\nyarn add @clerk/backend-core\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\nwithout being platform/environment specific.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendAPI](./src/api/ClerkBackendAPI.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendAPI` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (\n  algorithm: Algorithm,\n  key: CryptoKey,\n  signature: Uint8Array,\n  data: Uint8Array,\n) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\n\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendAPI](./src/api/ClerkBackendAPI.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://docs.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendAPI.ts#17) implementation.\n","gitHead":"a67aad38691f3fec3a24a067c0aa0d0ba5f8ed66","scripts":{"test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"igneel64","email":"p.perlepes@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.13.2+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.13.2","dependencies":{"tslib":"^2.3.1","query-string":"^7.0.1","camelcase-keys":"^7.0.1","snakecase-keys":"^5.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"got":"^11.0.0","jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","node-fetch":"^2.6.0","typescript":"4.5.5","@types/jest":"^27.4.0","@types/node":"^16.11.12","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.2.3"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_0.4.5-staging.0_1646410797757_0.21239996707763775","host":"s3://npm-registry-packages"}},"0.5.1":{"name":"@clerk/backend-core","version":"0.5.1","license":"MIT","_id":"@clerk/backend-core@0.5.1","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"4e01daf1af962daae466c011bdded972e104e6cd","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-0.5.1.tgz","fileCount":439,"integrity":"sha512-+V/GbiLiFWkziXdMhooCXDEd3a+rDzDcjFo3LP3VNGUNxOW7mHBFxoVeWrjiBceQh8zhscrbUSRV+pmXq85Xdw==","signatures":[{"sig":"MEYCIQDQYNbiSxIStouKVJJ4cv1SvAhY/5q79AbUCzqFjEclbwIhAPhedJFGTWJvxM7lRCZ3JVXuFIMpDy7CdSGUTx7GIcQE","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":531670,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiIk5sACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmriEg/5AY6A+dgtpgdTwfRAnnSZlDVTq/Fuf9bXXLZ+VHPvljO63L1S\r\nFXjygaGon6L4Mzbb8eVAuUS2XdUm1ShbCmEn6DxgqFysPZtgJ40uhSbb3BIb\r\nDKoBwQtYf5OfkKZtHvpPGQxEpLxF42ks8Hna2Wqy6nddV3VcyNm6Auih8V4O\r\n6KgOjP5nq/+Wwj7teHmy0vpy9EPvgTHz/p8y1nQ6F25OOMkgVNfOjuGk3z/Q\r\n2GgC6BpJI9UiX8axV4AVb1O4ljZJKDlz9++a//VroWxt6mcW86MrzxdAZJC4\r\nBwCdSvpOXhP4USWYN+//4enYUOjlrK2HzYpcMPv50nxal9oVoQFjLY898nla\r\nC6WMSiq6ESYMtdzpyJWIIaP5Gd8qsdxDOO/+5PS2ZQngFhpqi4+EkA1XxBr9\r\njvB12DYgLcaV4OCyckAwr8UxPdJcDJZIX0zs3WWBM8Q2GuvNeFnF2Wyqlkht\r\nHA3Bwl8ek5E/IgOueAGWR6FFykFjefi5Jwc84g0rtTzB7CoNcCH0z0uOZ6uV\r\nzIOo9QAeZ3Wl49s5ThVYcjP694t0LnBcfk7gyFaFbPmFRAUnfFlBG5PqQei3\r\nMRlZHsm2usLZVrXgnf9+IBoodXfgY82tVQ67PUzWJHqgP8EZ8BWtjtnaQ6zK\r\ndwQVuCUJ1PuT7e0mx98zGYRYy9vVf7jrw88=\r\n=xYwX\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","gitHead":"96bc6c6385fb1ab9abf79b9f90029d1738d6892d","scripts":{"test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"igneel64","email":"p.perlepes@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.13.2+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.13.2","dependencies":{"tslib":"^2.3.1","query-string":"^7.0.1","camelcase-keys":"^7.0.1","snakecase-keys":"^5.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"got":"^11.0.0","jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","node-fetch":"^2.6.0","typescript":"4.5.5","@types/jest":"^27.4.0","@types/node":"^16.11.12","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.2.3"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_0.5.1_1646415468326_0.5696758039434224","host":"s3://npm-registry-packages"}},"0.5.2-staging.0":{"name":"@clerk/backend-core","version":"0.5.2-staging.0","license":"MIT","_id":"@clerk/backend-core@0.5.2-staging.0","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"fd6e54fe763ce49153bbe43c2991b1ec3ab93969","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-0.5.2-staging.0.tgz","fileCount":421,"integrity":"sha512-Nh0GF4aPXL2Cjz7/dgPKW2FGMmVDIQHvUNfESgJb9CKBs1dN8eD7j6RYiymPYK9onD1qz+RNNB+EbzfmTV5p4A==","signatures":[{"sig":"MEUCIBhiQqdUsBolgx3zzwKh9Xr3W7mK183pGY3pBH89q2IoAiEA7Jp54l8esDcV4S38bw8YFm8eme909P7FnYd5tiB4Tw0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":522446,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiJ1YxACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqrXA/6Arrjbb/DJC6OtgtL1RlHXu9QLvGlMRNBdiCNEHd7/PMxmttT\r\n4KIoif8xuIlWJDywuZPFR/S6C9P27Zx3lRB+edQLQUnCv9ymGTkAY6FMbysa\r\neDhJvaCMZI4RkSvhKKmU3hImB79OGPYJH9xlgylVP2YzfjiDM25BhaCQOOcG\r\n6FX0Ofuvho0TmUlc1z+gz4fM7ysD7j/Wtzf74vCphN5lzk0qs4VjMfEU9OYu\r\nblmwpGJcerT4Ju69DEVXqc4XY3ab8S6ZcoWcF8jZArsqD+vP7Lk+/Onz4tw+\r\nsvQxn+16OYu54Ro4att7azIfWo2J1JQuznzfzsAzWtvjsnKTc/oULvP+pkFz\r\niS+gvy1NxFC0mLyLifPWElUFb3yqcVTTOHpi89E0M2+rGVQCqS7DZRam48+T\r\nqo32iY3hZhjRzyGrmUW+TiChzgrYiy1WOJLazT8CWLVmIKa2YJweJGjGq0w4\r\nyFyAQ4ynJmREvml5JwkqvLpkc4Oer8f6xmU3z2x3RZmlW0kE2/xTC9RqbHfU\r\n0WiDZWJ5LNXJiAgVAkwv2ll9aC27aARL2aBmnxrWszMeIwoYG4aRmSD2aq7F\r\nWhnk3JJyQi8kI0IqCbySJCjSikA7CR+ohYgG9+HxSSZ7E1t5XULc+1e3iw/Q\r\n+Fb2zbr1g5NOHRsX+sa5LG4Yeqvj85KIlzE=\r\n=30GB\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/clerk.svg\" height=\"50\">\n  </a>\n  <br />\n</p>\n\n# Clerk Backend Core SDK\n\n_Clerk Backend API core resources and authentication utilities for JavaScript environments._\n\n```diff\n! This package provides low-level utilities and is mostly used as the base for other Clerk SDKs.\n```\n\n## Usage\n\n```sh\nnpm install @clerk/backend-core\n# or\nyarn add @clerk/backend-core\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\nwithout being platform/environment specific.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendAPI](./src/api/ClerkBackendAPI.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendAPI` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (\n  algorithm: Algorithm,\n  key: CryptoKey,\n  signature: Uint8Array,\n  data: Uint8Array,\n) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\n\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendAPI](./src/api/ClerkBackendAPI.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://docs.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendAPI.ts#17) implementation.\n","gitHead":"c4fa5677902521862e449cdfc44ae816cfb95469","scripts":{"test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"sokratis","email":"sokratis.vidros@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.13.0+x64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.13.0","dependencies":{"tslib":"^2.3.1","query-string":"^7.0.1","camelcase-keys":"^7.0.1","snakecase-keys":"^5.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"got":"^11.0.0","jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","node-fetch":"^2.6.0","typescript":"4.5.5","@types/jest":"^27.4.0","@types/node":"^16.11.12","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.2.3"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_0.5.2-staging.0_1646745137634_0.7893773687532653","host":"s3://npm-registry-packages"}},"0.5.2":{"name":"@clerk/backend-core","version":"0.5.2","license":"MIT","_id":"@clerk/backend-core@0.5.2","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"c9e88b84c22347173ed05139446de58f435d3e91","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-0.5.2.tgz","fileCount":439,"integrity":"sha512-ucPmpI9vIxXr8RyjOnsaKqQ2OcHt0l6nuQHm03qu36xfll14CDHwSqSxcZ9kjJuJBBlj3DjR+TS9PsBTzn9Ieg==","signatures":[{"sig":"MEUCIQCxiBr97XPfdtUZmhwgjUuwGP+wE7IO+6Ozg39frCpXKAIgcuHPOIn8w8eJKYXZQRFbx98/rQFDgN8OOSIuswBVfWc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":539124,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiKH+hACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqTQxAAnH9SJ9f54cy7IJqS6Ii0saaIlsL4/6qQ2h1wuSjrNcIb27HJ\r\ngS0FmQTVnIq+jZPf2DGHYkR17RF54GzDeSVNEXlCelnbHgKp98VHMOHhIqDM\r\necPcr55JlqnR1XC1CuiqQXwe4KNPI+S3+ZlDN4SIlWYVJvrdj+9nKE3tRkHG\r\n86Bgvyj9+F+YMRSnRdhFyoyWtC9YBYSMWDtuA0gCG6IpAPJYtk8J+RWKMgHd\r\nib//29RtNX5VMcL+/qYWtemhC3v6lmq57zONi+FuHyN/8+dvxiZ4ThhMpMDj\r\n4J0ZGD267lyLUU6qQtf4EDnaKpfiaBEhzedJvoIZK62hvSZ3DNd8pJ1630+L\r\nLwLloBEk0QaTV7bVHhnRd15chPnxP+w/sqxjhU4iuzCxOc+bR92Cw3XqwO6C\r\nWxtOoSIsdBkeWAz1cXQeaWU6Xtsi3sgL0CJ1Zr8/5t7byHiaVokE+Htr52RE\r\nZ3RN0mM2GEqPmj2jap3erW9lqgSFgM2OC5XNSbInYZgF1k1nNM2CZ4jtdkHA\r\nQCPOcA5xTAa826pmIPvlP0nXUzCW/4QJfcAvFHPpxE65UexdB2sNECBvlXMI\r\nE3W2Pvmw/zqGYMrO407GMzmgtQg7yDYnwerJCBBTTnKnvQHFce2Otpo0DR69\r\nEkkPEQI1vr/dHhe1joDdgWpaWVb7N+8eOzo=\r\n=Wuek\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","gitHead":"b2baaf7dab2f823048fd557619b4c7de63e28357","scripts":{"test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"sokratis","email":"sokratis.vidros@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.13.0+x64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.13.0","dependencies":{"tslib":"^2.3.1","query-string":"^7.0.1","camelcase-keys":"^7.0.1","snakecase-keys":"^5.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"got":"^11.0.0","jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","node-fetch":"^2.6.0","typescript":"4.5.5","@types/jest":"^27.4.0","@types/node":"^16.11.12","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.2.3"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_0.5.2_1646821281212_0.9633036232099808","host":"s3://npm-registry-packages"}},"0.6.0-staging.0":{"name":"@clerk/backend-core","version":"0.6.0-staging.0","license":"MIT","_id":"@clerk/backend-core@0.6.0-staging.0","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"cc044974c959cdad199630363580a28974aaf7f5","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-0.6.0-staging.0.tgz","fileCount":446,"integrity":"sha512-O54lwS3uxmwMXpXPJzd9yCnxTZk8adLDp62lx0qJDl3nm4m9quFIjS/uAIroFFX07QfXXdZR7nWWSKF4m+QNNg==","signatures":[{"sig":"MEQCIBW7/Cdh8nVjySt1p2Ru0hVZCdPUkZVqWPLz07ABYK7/AiA0JoBbWjFRzEPhO4tCP+I1envY4ZgZsaSDpjDL0pPk7g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":551671,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiKqbXACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrthhAAnK8Zu62S6z8gzYKq/u0equdT2FXj81rlCfapOANWUXPtrEVG\r\nbmsylNio0KEsmRjJHsR1kVNf48q9r759RQHtz0FGmT2IeGc/sKJ7BhqFHpj7\r\nEA4uGK2+gEJjqkHARVm0JcIRlyRN53t3ac+zfpZlx7zlURXYo8Njs4XkuVi1\r\ntEb+GTbfZpxPMMEIM1FWgBJMcR/7mnjbWEpC5wVmDlvGQ9ZJX4RSYuXfLlRO\r\neebDBzJ/Chpqvuuam7e/x63DHpVI8FpmR8ghGlTITGapTk+ga1YdZRU34iR9\r\nIVPTCOLqIcyK4rNHIbn5XTvz+XPhsU4TZUADX6Boh51d2utOW+pl9EfiRipr\r\n4qtkAUexLRjEs578zf1vMHxGrx4nzeB9SWGm9nu+sk++kZUdZOcoXXHHCaxL\r\nqsiJQVt9TZ2eLXOWhmZbsZ+ocD2mUdHW982cnCfxohJY+P2k9P/fIpj7VZLg\r\n0BkTLMVQnFyb9T2wkrFi9exjfHA/oNiJWYyAh+3yQqib94nrXSQKnq4mdmBY\r\n5rU330pJWk2kRUTV6Z/YQuiBu3CahdccKgRKSX+TJWvH1lIFffXCtLKybklc\r\nry5l2uHrm7V4mFYymrf/GJu/mxOFF1alnuJWrZYnC1Ae6XZZTOJkSiN3mMqK\r\nS/qViLi3/5gzNBBwedNWFQ3lv5XnVrDcVYk=\r\n=bBUL\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/clerk.svg\" height=\"50\">\n  </a>\n  <br />\n</p>\n\n# Clerk Backend Core SDK\n\n_Clerk Backend API core resources and authentication utilities for JavaScript environments._\n\n```diff\n! This package provides low-level utilities and is mostly used as the base for other Clerk SDKs.\n```\n\n## Usage\n\n```sh\nnpm install @clerk/backend-core\n# or\nyarn add @clerk/backend-core\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\nwithout being platform/environment specific.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendAPI](./src/api/ClerkBackendAPI.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendAPI` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (\n  algorithm: Algorithm,\n  key: CryptoKey,\n  signature: Uint8Array,\n  data: Uint8Array,\n) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\n\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendAPI](./src/api/ClerkBackendAPI.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://docs.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendAPI.ts#17) implementation.\n","gitHead":"512055698ef62a9c760afb092aac0ca33a8e5408","scripts":{"test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.14.0+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.14.0","dependencies":{"tslib":"^2.3.1","query-string":"^7.0.1","camelcase-keys":"^7.0.1","snakecase-keys":"^5.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"got":"^11.0.0","jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","node-fetch":"^2.6.0","typescript":"^4.6.2","@types/jest":"^27.4.0","@types/node":"^16.11.12","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.3.2"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_0.6.0-staging.0_1646962390887_0.26237577131929246","host":"s3://npm-registry-packages"}},"0.6.0":{"name":"@clerk/backend-core","version":"0.6.0","license":"MIT","_id":"@clerk/backend-core@0.6.0","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"712172fd42a12f036dec09b97e8eb443cd040d08","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-0.6.0.tgz","fileCount":446,"integrity":"sha512-wVg8OOd23VTB1OnOhFzAGsgZeXs8CjLU9sWs6iJ0QM/xFZ3NK2Nx9/2NTZ3eS6l0kfPtJASPf3f8LMSu5tAH1g==","signatures":[{"sig":"MEQCIEZdP1e+cDXFBlm0kpJtHHnGuzCURtO4RB8fsxHIq1uJAiAmD/M4brxjMQqYFbbg50V/oj+CqX20BSPa5da7zRvfaQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":551621,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiKyhSACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrCgQ/+N/RfW5lo91Ddm8ALMRchujN9di/8DazOHLm3n6ikhk3wxDhR\r\nBv9QBPNccXjeOi4PANWwR2gPGfkVw206UBc6sbTT6ZMGT4aGDXQikltTE4mu\r\nm6c+0H8/RgTAAH2ievINlFTGHSIHO3JcUdPMbdywk7GDuAYGVUwEdVQAOaAc\r\nHOgMows2jb14xUo9ZVnYt2ZnYJ3omfoBXMKOQOeAT8z/tUi/6UkC8YX+Viph\r\nTkq9OsIha90JkyHKwM2PlnCYNJfr2NcdAAoir5nrZmLb/I5BE5H9cMVDSJtj\r\nPfdDUQJ+gJIxY21QJVaBWb174ZdFcO7x5o16KET3GScX8QAAZUhDv0cdYWH+\r\nEL7hk/hJDIttyDwYApgwoeQ6VPD3MkUWScahC82Vxc16r+nPzuKCTBMUG4tr\r\njaPoUECJ9/XzJnEIDp1j24gCdke1e7QN/uqho71+U2vUPOLUGdSaIMnBN4Ox\r\ni5dpXFxmx1mR4Jp406Oj9Cvqif0XWADL6MFDhCJIIZMsNoIFVJTMomUCSqXn\r\nzijit94Fl1i1EjydzWw6wQbGR5Fdax/yfYbqHeb5SdyVjZYlj9iQu1X49yTP\r\nbEuKiXG0qBzcHrcvp7DYir0WXvG109KGwZdo7rgxR93G6P9qm0Fxytkd3ucU\r\nuWu6nJOeop2pf/O/2pbOnEJsxwW2tWhAPtg=\r\n=iFvm\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","gitHead":"282f2f0f17faa5fd7ae417238a201770ca37816a","scripts":{"test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"igneel64","email":"p.perlepes@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.13.2+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.13.2","dependencies":{"tslib":"^2.3.1","query-string":"^7.0.1","camelcase-keys":"^7.0.1","snakecase-keys":"^5.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"got":"^11.0.0","jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","node-fetch":"^2.6.0","typescript":"4.5.5","@types/jest":"^27.4.0","@types/node":"^16.11.12","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.2.3"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_0.6.0_1646995538393_0.4118619626008895","host":"s3://npm-registry-packages"}},"0.6.1":{"name":"@clerk/backend-core","version":"0.6.1","license":"MIT","_id":"@clerk/backend-core@0.6.1","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"62a26faecf701563d47f8ed6c2ce03b63a625aa3","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-0.6.1.tgz","fileCount":446,"integrity":"sha512-jSea8uOpU2orza5siOEvwcnlrLyX8g0VnCDbOhuJxh9DxJtfWuMTywcGkswiAZvQMUyeayGDVZ4jIMOBAN63eQ==","signatures":[{"sig":"MEQCIGPz5UqIFkiCaANkW2+7gR4g6X4bv58pgrXbhr5Mmd5/AiADfPrMPElqc4Yi9GJfO/hpuQhA3LP7YMM8u0TPzKBPmg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":552302,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiLxP1ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqhJw//RQHY+z6v8Lo/0rlo5DbWlFjbV+3F+Vq2jASc53CZqjztSgwk\r\n+pF8NrmjHT1K3If/bbfEg+TFUG6q60L4ziLc1VXh4TC0XBiBbQN2ar7kXyCX\r\nZ0vhrTl46X2MiU2iIhpKfa+nZ0+Jx0rnpw/wPbtUuF0T7I/SknDEyecOMDxO\r\n0rvLhred5ZQVx6dvltVWILlwxtDfWgS6MSrhUfUn7UkwW9ej+k5X4/DnBg6N\r\nVmhpgj+uaAaVpu8aeqxWbLPITeRUFCrc79bil52004Ad7huplddxvpZhyhp5\r\njKDnmKincUgsqaqsy8CBcd69+mMt+T/Pev1ERRKjKyHFmjUVpS9f7OTiWWHk\r\n+VQRXD0mdTXhvtgKWCrDnO2rqokYGt9D1jVtAlaKRzkUKDXzChwzG10F/DwA\r\ns/jGurbU2sh+HO52yhZDr5yfyJ0bGNE7BpPfqcN+b0iYm/G+9lhYDL9ymakX\r\nt7hoOzvMiI9o/Vx8bsPC8Mti2hojHoB8WXaN0uWU8ChEVAnx4BRvqfvFroKE\r\nnRZWGhUTwCthD8B3okf0rCy1LWUwGzF83TczbE+hCXOI/NERu+R6OPkqQ22q\r\nxeJDHJ7qxJTrTE28UKV0Wa0mGlNtu2H/KFnQZ9rDR+K87dRCBvgNdwi5kM79\r\ngKLYf1QZggEHNAKde35kFKan8U9KIIxI/9k=\r\n=pnCr\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","gitHead":"1f9b5f73935f785706b1186bfedd85e2b240331e","scripts":{"test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"sokratis","email":"sokratis.vidros@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.13.0+x64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.13.0","dependencies":{"tslib":"^2.3.1","query-string":"^7.0.1","camelcase-keys":"^7.0.1","snakecase-keys":"^5.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"got":"^11.0.0","jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","node-fetch":"^2.6.0","typescript":"4.5.5","@types/jest":"^27.4.0","@types/node":"^16.11.12","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.2.3"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_0.6.1_1647252469505_0.9123311861510144","host":"s3://npm-registry-packages"}},"0.6.4-alpha.0":{"name":"@clerk/backend-core","version":"0.6.4-alpha.0","license":"MIT","_id":"@clerk/backend-core@0.6.4-alpha.0","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"61050d451d75fb58ed706bd5c79a8193d8bcf37b","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-0.6.4-alpha.0.tgz","fileCount":453,"integrity":"sha512-qJdvoh3/WCN6irdPj2+pk8BbHWCmh53CTNCSGUAVuzo3zoxFnPjDWiJaDG00F37CUVyk5+wIFVOpyk6tRzYyfA==","signatures":[{"sig":"MEQCIFhNO+GeY2q4CobHn91jRVHm+aEKX6tvVgTYv6pCBA5DAiAbonZYKp0zAHqGkCVHx/U2KirshLdulVX2U0QsSuWAhg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":559637,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiNTjgACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqo+Q//VJ0gniVO7vk8Z1OWtL6BtSUF57OiAuCjW9JzIXNz4KTkdg1a\r\negLi/hlEBy7hkwTJ5b05e4TqWPbhHsy3IQG8idiBZK3OoPN7KEeIX+HrMZYP\r\nlP0Km5V4oT94sIVeesJLfcpyPhpFbw5R1ObyYHbCYmtg4t/LL93kwmkwOcsQ\r\n7/nFn0+PXk+rQ2lTnyqxQ8vpmPpSJb+cLVz8GjYDzDr5ESrwXQ0DDvsjMS46\r\nMEFOBurwQul9H2ytQANen6/dBu9tknl+CQMXUhRF8ct4RP6wYInBnNzpUJgq\r\n5T9rtt6nEtHUG5QZeUdIpaLR2X+5LRZvWkdqfAagKbntW6HKHTE31VTbqk+U\r\n3ex8QdHlfAeThTG9zap2DyBlohzBJH2wr8fJlVJMYv6ZfMLAoR+5ywCqcd1E\r\nvjjHy18/uBNXSwVm9NeWJtZ3+J3JhIUdDZjV6Au5+eNd9o4lJv6l3lKvXGol\r\njWSI8SoOLoJnTc/ltJ9LCBuNNPNE+uJylovpVCpr7VejBEhxnDWJdDjYdOoD\r\nXziS3aLAkKaQ0H+TTqI0LJKAo4WVNcLlM3o7tsF98C65N9W7Omviu5flgjdo\r\n34CP8VqCqFaI4aU4oqHfq3LqgAW/Zk+XW5oMgN1dypMF0C3RMEY4T/k76L7o\r\n4JiSGmFTDW7xo+HsYhmM2p2ZkLoUyl7UuSc=\r\n=5PsM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/clerk.svg\" height=\"50\">\n  </a>\n  <br />\n</p>\n\n# Clerk Backend Core SDK\n\n_Clerk Backend API core resources and authentication utilities for JavaScript environments._\n\n```diff\n! This package provides low-level utilities and is mostly used as the base for other Clerk SDKs.\n```\n\n## Usage\n\n```sh\nnpm install @clerk/backend-core\n# or\nyarn add @clerk/backend-core\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\nwithout being platform/environment specific.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendAPI](./src/api/ClerkBackendAPI.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendAPI` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (\n  algorithm: Algorithm,\n  key: CryptoKey,\n  signature: Uint8Array,\n  data: Uint8Array,\n) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\n\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendAPI](./src/api/ClerkBackendAPI.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://docs.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendAPI.ts#17) implementation.\n","gitHead":"c452dd2bbf65275752616dc1c61eb6612025a26c","scripts":{"test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.14.2+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.14.2","dependencies":{"tslib":"^2.3.1","query-string":"^7.0.1","camelcase-keys":"^7.0.1","snakecase-keys":"^5.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"got":"^11.0.0","jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","node-fetch":"^2.6.0","typescript":"^4.6.2","@types/jest":"^27.4.0","@types/node":"^16.11.12","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.3.2"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_0.6.4-alpha.0_1647655135884_0.593000750871638","host":"s3://npm-registry-packages"}},"0.6.4-alpha.1":{"name":"@clerk/backend-core","version":"0.6.4-alpha.1","license":"MIT","_id":"@clerk/backend-core@0.6.4-alpha.1","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"16d72cb7ee242f9bc37851365caa8880584e3954","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-0.6.4-alpha.1.tgz","fileCount":460,"integrity":"sha512-KsdhOuREL0EaGhSFO6PjBRvVr9SjT+YQaGa42woI9asND4mhT4u2JjzlLwC80qnPbSHk73TIElj8Wd0Va9wgKQ==","signatures":[{"sig":"MEUCIEYDZT4XjVICCMPb3JR3+phghqD5SzEaFw3HQDsXx/LyAiEA/ZR1rRqbxo5aILSuPVFkbE7K+zdH/Nw0JXFB/oenaMk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":566671,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiNm8jACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqJrRAAiPkJVdIlmeS6U6WHbRwRMFigZj95t9CeyaC7TdFQDO3649YP\r\n6FB60el6gGdEM2H6dSdm64H5P5v5ak6DbqiFyg5Q4LhZG/f1ZZZGrs2zg4l9\r\nZGp6XgEZIKvGr6Nb5bcuLWcWzToRzKxe7891iWOCCPm731xE1y50ZZhEDzYU\r\n13ecgvOoFGNWR44lTN6qY0bbmerA4nwyTcl9tiGsnKw+0YR9o23+zbQNFWPV\r\nezrqXNeEdALCtJKEXwcqjQ15+2GF/GDgQ8vTQaY5GijpXn9lGEZ1mFnyZNmf\r\npPgn+avuS4Mc0hhUHj6+I1HSA2qF0EN3G3Aam+7ADFYZllwkQJSStovwaXVe\r\noxgNOVw83qFV3EVJbEF+ItaEPZ64OiB7HxXeJNNzMWntChCa8ugtJJTa1tbq\r\nuJkwMQ1uyXW1PG7BvVTbwf7KdU7oycPHbE9vxWOqX94TqfxXZdGhNuFYod0H\r\nwXi0BLiDYskYiPlrqEcFjI6W9fKb4eqVaSWrvEYFKTZWkinSCPkQ26w9+9tz\r\nUHZNcC2YiM5BoH6TA1MedvY+3F3NmEzYMsFyD0A5ksdQknOdpfKuuckNYUhf\r\nwgDGXbALR941EZexqrOKXi7usEp3nAFpXw/0T7har23spHVhdKyDUqYWUMhf\r\nPMu93mLGAA5ytKegHSsQeY4370oI47ocku8=\r\n=MwT6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/clerk.svg\" height=\"50\">\n  </a>\n  <br />\n</p>\n\n# Clerk Backend Core SDK\n\n_Clerk Backend API core resources and authentication utilities for JavaScript environments._\n\n```diff\n! This package provides low-level utilities and is mostly used as the base for other Clerk SDKs.\n```\n\n## Usage\n\n```sh\nnpm install @clerk/backend-core\n# or\nyarn add @clerk/backend-core\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\nwithout being platform/environment specific.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendAPI](./src/api/ClerkBackendAPI.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendAPI` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (\n  algorithm: Algorithm,\n  key: CryptoKey,\n  signature: Uint8Array,\n  data: Uint8Array,\n) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\n\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendAPI](./src/api/ClerkBackendAPI.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://docs.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendAPI.ts#17) implementation.\n","gitHead":"e455eb2271fc2ac8d6a2e260b17a8b05accc8805","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.14.2+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.14.2","dependencies":{"tslib":"^2.3.1","@clerk/types":"^2.0.1-alpha.1","query-string":"^7.0.1","camelcase-keys":"^7.0.1","snakecase-keys":"^5.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"got":"^11.0.0","jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","node-fetch":"^2.6.0","typescript":"^4.6.2","@types/jest":"^27.4.0","@types/node":"^16.11.12","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.3.2"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_0.6.4-alpha.1_1647734563569_0.900578036020721","host":"s3://npm-registry-packages"}},"0.7.0-alpha.0":{"name":"@clerk/backend-core","version":"0.7.0-alpha.0","license":"MIT","_id":"@clerk/backend-core@0.7.0-alpha.0","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"980d2ff9b6375d36c02d03f35ee192a2b1c0db7a","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-0.7.0-alpha.0.tgz","fileCount":460,"integrity":"sha512-wnkDgTIyL29AZFjeb/7UFD7FYpUb8TabRO19ymPwtgYEXq24h0raYicoSySH0A72phcy/Lq7uWBm2SfrsqH9nw==","signatures":[{"sig":"MEYCIQCFH7khMcky/NP6UKcmNB5V72mxwziLNRYU6JrA2bTGfgIhAMQmKftrBcl5ITN7EeHINDyRsmvt/C36worYrzCqYLLJ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":565533,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiOZYVACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrGNA/+PIbAiA+aAMs48DiOads9sIdcZeqDkHPEh70wm/joW5G54coF\r\ntQ0ur2FAWJ07/CGQGEHgeFDZra1ARyewXT6IL8wvsadPVM4jH50XHo34421K\r\nLPRhFIbSnvRC2wGKHI6VzopXa6YcLPmGVOSrQrFjhhLntbrrVEXUKFEvSS5D\r\nJSWrOS/vGLyLRSZxGRHzqPm+lN+5QLyWiElQlQnDh76Wf2K4p6s9mxD179cw\r\naYHB3ktK/UC1TDaIgKyikAfQL047pAiaMAMgLCvSAyE7HOpjmdNzdBrYuzAd\r\nph85UKOeisqfizPubxxs5g1iIwyxB9hrwE12L1Lka+TS7xDyvzt1l/Cql5NK\r\nYuld47u2aa4IlRb1lCDPaqSIQ5Z0C32X8a1VxUNyzvHzyARY5foNCEipNVKU\r\nngsF/PbhctgGz73kVkub2gEapnoJgQTgkPeb17tDdAHxnbOV6RG0vpgGddES\r\nJZKA940VR7j3B8bVZDhRY7mZfAzLHJMQ5kyvXcZ7GKD8svIYyF9TZyrgq/Kr\r\nQwHFvtAgQS49ssgf5vR72JO/L/OI2ungCBr+0nzM+i5ealmDZLLkmTINfCvX\r\nfHskBYl8IojB2Oo8AM0qMx7+OR5Mpk6+bHlCOkZEqXZWRRJsKqQXyy+FGzzO\r\n/RJcr06fOcjjIEAqLEPhqVrCEQtby/zVRCA=\r\n=Paw0\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/clerk.svg\" height=\"50\">\n  </a>\n  <br />\n</p>\n\n# Clerk Backend Core SDK\n\n_Clerk Backend API core resources and authentication utilities for JavaScript environments._\n\n```diff\n! This package provides low-level utilities and is mostly used as the base for other Clerk SDKs.\n```\n\n## Usage\n\n```sh\nnpm install @clerk/backend-core\n# or\nyarn add @clerk/backend-core\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\nwithout being platform/environment specific.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendAPI](./src/api/ClerkBackendAPI.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendAPI` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\n\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendAPI](./src/api/ClerkBackendAPI.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://docs.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendAPI.ts#17) implementation.\n","gitHead":"afd03b019ab74e0a81c8325d474cbd03f52f5ce8","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.14.2+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.14.2","dependencies":{"tslib":"^2.3.1","@clerk/types":"^2.0.1-alpha.2","query-string":"^7.0.1","camelcase-keys":"^7.0.1","snakecase-keys":"^5.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"got":"^11.0.0","jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","node-fetch":"^2.6.0","typescript":"^4.6.2","@types/jest":"^27.4.0","@types/node":"^16.11.12","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.3.2"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_0.7.0-alpha.0_1647941141465_0.6388260779863317","host":"s3://npm-registry-packages"}},"0.7.0":{"name":"@clerk/backend-core","version":"0.7.0","license":"MIT","_id":"@clerk/backend-core@0.7.0","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"7b7ca59b401a0422120e178f897e8bbc520f5148","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-0.7.0.tgz","fileCount":458,"integrity":"sha512-lTUm8mig9w2KPDDpVFfMKeb/8VI5Ogc+gJY9ZnxgNsIHAYY1Ioz3PO4C2D30s0DHvxw1rKRomAXrPa6jbQnUjg==","signatures":[{"sig":"MEUCIH5k3mJdzWt4C5piRWFith/PtRnKp2RjXRg7KeSENC3nAiEAgbVptDKUWnVFnXl45c5NfUa/4RmgzZDmja7kklt9M/4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":561357,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiOa3BACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmohKw//aSourxTZegPEUIOlYAWs0wTaR+kOljJr4vgj8EUvGtNI3Oq2\r\nKkqGX/47vn4qdpIOyovjYqC86bICRasJO2HEc9ROEh1V6rAEnxoONSOVIaEZ\r\nML0cP7TtSpDFkr8mbDc0ChG/xkG4vPty6xl11jjJAFZW/8EsHSxbjkIlKNgV\r\nNAi+D9MH49WPsR9cwd+ryQRFP8hW4wS9Ri32Z+nJ2IsnfssiHSxhhqE+lLEV\r\noKdgNkJi9eL0mMft7AJB9GykFsqIaXJCSYHK5+EPQcAw7sQeNhjoKy81oIOG\r\nEcysith6VT8ME+NRl9RLM7cRhHNo0y+vcVpcN/2sxH+gfbVaIKOX1h7f5/N6\r\nfnLsPnGm6MVpUrb1dH+o/WinQYT13SNu6B24++58epRSp89Cti6N1AHEgSXi\r\nruacgcYeiauVJYCSYeLHmh/Ih2lsnJAbup8RCKoWGophLvdCJymt5tPVzOHx\r\nrF3dlrH6DkTlbY+PvxWpi+e+M87+QOFZtT27EA0/6l/sHWEO3gQuqVxRr+Fj\r\nSJW2r3ZmkDrLr90gYmgHqRXpQjFpax4heJp5teolUUqGgfKaz+SqVytjPDvj\r\neJsb38Ac7yQbrIUIECNTev4NGqgbATYvmuikX860DtkDfvVUaPCl4Xn2u3Id\r\nWf9TYz44XF8hYZTCvx21ChjmH4fyV5EJhtc=\r\n=dkw6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","gitHead":"2023ee9188db85447b39e2788fe7e05d3d87ac69","scripts":{"test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"igneel64","email":"p.perlepes@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.13.2+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.13.2","dependencies":{"tslib":"^2.3.1","query-string":"^7.0.1","camelcase-keys":"^7.0.1","snakecase-keys":"^5.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"got":"^11.0.0","jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","node-fetch":"^2.6.0","typescript":"4.5.5","@types/jest":"^27.4.0","@types/node":"^16.11.12","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.2.3"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_0.7.0_1647947201453_0.22827817896125469","host":"s3://npm-registry-packages"}},"0.7.0-alpha.1":{"name":"@clerk/backend-core","version":"0.7.0-alpha.1","license":"MIT","_id":"@clerk/backend-core@0.7.0-alpha.1","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"9863f96e01387d00fc939007b04ddc1b4fb4e3d2","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-0.7.0-alpha.1.tgz","fileCount":460,"integrity":"sha512-AlNGYM4Fe180tttzXGIxr2aN0nvhNtfMRgtuDOofuZG+iHaWSFyu5q1Mp6MH3v9A6xou3CBO3mlLeYBEFcnxaA==","signatures":[{"sig":"MEUCIFEn63b1BlK35bQ4Uci+ym0Q4PdOzg9sHFolkcQ/ST0aAiEAkLPaFc/IIac5ygcA6yg5E/++0CHEeI4xeEXbQ7Zorgg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":566264,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiOdhUACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo6wg//caUp+CZz19nIki6PNYGwW+26N3l40onbJYRl/jK4S8lRFPzf\r\niCHvJuE0bmWNKjPwq3I4X4HHi4eDbTo/LuoNEqU3mU5K8q1kkmm957sHR+rD\r\napbMxlZztdQd5DN8yWRM23vAgYGAn5b9myXP3ZGSIh5RT4QuMK1GHZxxoJKH\r\nfs5M1XZDwcDuLoHLAytyrF8xXaG9k2pd3jtPMD2BQq6vmupP5BdRn0Xk74zA\r\nJSX3qI7Yh8wA8YsB/d+m5n6uNbJiAxXQuKKJYp3Jista82obTHT55HvIXYiY\r\nF3KPPw9vfAYAKoaAyBVOmprCZbfBvfMxNl8V6cmLGaR6dzi0rMWTaIhJYqRR\r\nxlgjg4O5UGx88VtkGXp1CMp8yyfn3R3N6Yr1ZUGJcwho9khNHyeXI55TE82c\r\nYRwi53GsWLca1H5fuEYIgZSV/1MbCOSZxt0MklMPZRjAqlNs904vz/CUjE7M\r\nRYD2F5IGLR8ESHrEg2V19G22qMKMioxVHS1A/1Ei00PvjZtZ34THvwySKLol\r\nGNaUIm/PziE+nZJSmH6Oma75jGKTAwVGKbGYvkg9jFKQ1rOalV5LMCrLCpdy\r\nJlmUD9PNwars6eSuhzfwK0gL6VVAMCG00ygjjtKvaWER7QaP4k01L7Oq3rCh\r\nM/S5+VNmhLPMS9bw/cBPcZubMcLmXj98cuQ=\r\n=m3o2\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/clerk.svg\" height=\"50\">\n  </a>\n  <br />\n</p>\n\n# Clerk Backend Core SDK\n\n_Clerk Backend API core resources and authentication utilities for JavaScript environments._\n\n```diff\n! This package provides low-level utilities and is mostly used as the base for other Clerk SDKs.\n```\n\n## Usage\n\n```sh\nnpm install @clerk/backend-core\n# or\nyarn add @clerk/backend-core\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\nwithout being platform/environment specific.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendAPI](./src/api/ClerkBackendAPI.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendAPI` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\n\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendAPI](./src/api/ClerkBackendAPI.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://docs.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendAPI.ts#17) implementation.\n","gitHead":"05c0dcbbfddd8df949a2bd8df460feab9efcd065","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"sokratis","email":"sokratis.vidros@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.13.0+x64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.13.0","dependencies":{"tslib":"^2.3.1","@clerk/types":"^2.0.1-alpha.3","query-string":"^7.0.1","camelcase-keys":"^7.0.1","snakecase-keys":"^5.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"got":"^11.0.0","jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","node-fetch":"^2.6.0","typescript":"^4.6.2","@types/jest":"^27.4.0","@types/node":"^16.11.12","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.3.2"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_0.7.0-alpha.1_1647958099955_0.6838039109921892","host":"s3://npm-registry-packages"}},"0.8.0-alpha.0":{"name":"@clerk/backend-core","version":"0.8.0-alpha.0","license":"MIT","_id":"@clerk/backend-core@0.8.0-alpha.0","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"f31d659ee867c4916376c8ff7f61e4068c34e960","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-0.8.0-alpha.0.tgz","fileCount":460,"integrity":"sha512-iCALzEyIegOyOS56B3rQhfIR/QPnqRVLq5/Ph2vgvzyCQrRWqBRhl6uV/lnN7w/MlF/amJUfDDa8DgPOMyt1EQ==","signatures":[{"sig":"MEQCIGdBFS5Vz0PHJJbHAx8vLfcZw2tNTk4JaNuNaa4mHKplAiBPGXXXv8vhI8vHThrYIeJNwxVqOWC+Jywzvpu582H7BQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":566476,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiOewRACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqudxAAna4ZAuChNi57KMWEXdLv7cAezN3x4rruknaO1q+uDjd0sUiw\r\n+bp3kJgNs+S2CzwWKqoVgBLq6ls15YX6wCUsVcqimCfx/eq/Z7BZK8ZHmptt\r\nl0gOcNgcuIPxekO4HjVJYWom+EUAXwHjf7mRBc5SkxhUtFxoYNhZnN2S3J1/\r\n9EFNK067azpTf0feQEFZwuaz9vhn4CJEn7KQmwnqMLtJNOI95L2wQHAmkQ22\r\nvGRSzzmvzwxgoYeM4AdAdL4eYAApTsKaXVrnH0IdKTQQwZWZcD7Z7aB3tfve\r\nEQFYYQ/PN4oiNukKs8YIK9xIwAvynko5+558jaYLTRnON9+CTUNU3eskMqfh\r\nq/ovm4gBlD0CChI6MKBGfrZqFLz3DU//E2rNiqRxBPH3SBSzvyM0+gD3fu9A\r\nyZRIHaPRCvl0c8DdmajT432O3V2bz5WOFxCtENnz2RMAHimlU2/AJkrOMVS+\r\n4BNHIx91ADU5a5PtAKJGAc8ejZNfiarsIpfCRK2pkM6v7h4T7K5gc50shbR8\r\nnBVrDfnE/eHN0Yhce7EucWjl8QgcsTgNbJDsYNOsrYzmGGhCHNZ706w2jjHR\r\n5M999sjGa4leEmrMnkiOGkZu5SZVYdTWrRyuUaOsAIX/60dBS6MqOwpE+lz0\r\nXBwTMZdziKtZngs/n7aoNYkaF7II1AHCvic=\r\n=S0uH\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/clerk.svg\" height=\"50\">\n  </a>\n  <br />\n</p>\n\n# Clerk Backend Core SDK\n\n_Clerk Backend API core resources and authentication utilities for JavaScript environments._\n\n```diff\n! This package provides low-level utilities and is mostly used as the base for other Clerk SDKs.\n```\n\n## Usage\n\n```sh\nnpm install @clerk/backend-core\n# or\nyarn add @clerk/backend-core\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\nwithout being platform/environment specific.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendAPI](./src/api/ClerkBackendAPI.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendAPI` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\n\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendAPI](./src/api/ClerkBackendAPI.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://docs.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendAPI.ts#17) implementation.\n","gitHead":"82f7984a239ef1ed45afb515707d81adbe2f8d2b","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.14.2+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.14.2","dependencies":{"tslib":"^2.3.1","@clerk/types":"^2.0.1-alpha.3","query-string":"^7.0.1","camelcase-keys":"^7.0.1","snakecase-keys":"^5.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"got":"^11.0.0","jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","node-fetch":"^2.6.0","typescript":"^4.6.2","@types/jest":"^27.4.0","@types/node":"^16.11.12","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.3.2"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_0.8.0-alpha.0_1647963152534_0.839046540204498","host":"s3://npm-registry-packages"}},"0.8.0-alpha.1":{"name":"@clerk/backend-core","version":"0.8.0-alpha.1","license":"MIT","_id":"@clerk/backend-core@0.8.0-alpha.1","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"c33c675d87f7ed30269e6a60b9cb34d7989d0cfe","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-0.8.0-alpha.1.tgz","fileCount":460,"integrity":"sha512-OrNrYZk1HMFaXSAoi0xbd2gZRKchjt8AKafBGyhshyUWB/0O0GqEo06horSR1m0BUFGPKbenWEltzknhEiRvHA==","signatures":[{"sig":"MEYCIQDABvjv3/1SGinWabN3fK+c/y/uoA3y5kyh1RPHXC42bwIhAMUTz+aLGiNkVjFZ46sxlyoOY/nDgV3Qv8gLopiW1R6G","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":567057,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiOz2GACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqNkhAAnFAe7p6NRQbjSmRuE5Mavgf9w7lOJfEOWCjYbREtRW7GXsKe\r\nQViZSyZlJUm/jjavrYd6OSe6+8bETBULhA/j8Q/Lis4+5Ss52t08WAnzwb+t\r\n5XeRuVBE9x+OhlpOlBrak1ygbtPWdFoE3FoBOXEWNJiILQfi0j+LewyxmMm0\r\nnAajRMJIlcw177szkhm8OpaV1CZU5D9b+tzDbLSZb0GbpluZeJpb5ddn6r8l\r\n+Z6GRzODNnK7d4zelsV2XBRVzEb/3F7g1V6se3HfNr2OYgXV6R5KW2h4jzOq\r\nRdYQuZK74R0fiQ6jNaqI3wbb5ru+bZ/xehgIsppWPJLKad1KfpCMt5cb1xpZ\r\nHqWqpo9cBDnQWuhq4xnz4OJZzV/1Fmxp8O4XC4fyuHNdNltludmQETAJsvIS\r\nMir+iXKrZgcICx42mJxiqf+jTQkOiLE5DC9hZJky1OS0b10m2yqVhku7Kxxb\r\n37MneSe12P4ldKAqc1K89tK690Jdg6MMXFc/+NxaLFpRbs5p1j1E1QFI2Je7\r\nIGymCreeS/CwjLrLuid2xfnBpywN8LEFO2WmLbdCf/glqO6IGJpXv9QrwMBR\r\n4X06iA9qIc4y3PaQg+P7jy81URPg9reiCIZL7o+9CbbAROjPUSE4Dugdt2yr\r\n1Kd2TVG1BJMB39nW688j+jfwqXOHVpHs0lI=\r\n=EYS9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/clerk.svg\" height=\"50\">\n  </a>\n  <br />\n</p>\n\n# Clerk Backend Core SDK\n\n_Clerk Backend API core resources and authentication utilities for JavaScript environments._\n\n```diff\n! This package provides low-level utilities and is mostly used as the base for other Clerk SDKs.\n```\n\n## Usage\n\n```sh\nnpm install @clerk/backend-core\n# or\nyarn add @clerk/backend-core\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\nwithout being platform/environment specific.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendAPI](./src/api/ClerkBackendAPI.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendAPI` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\n\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendAPI](./src/api/ClerkBackendAPI.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://docs.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendAPI.ts#17) implementation.\n","gitHead":"5409a61872a6907d67bd93675045c94ee7d35a64","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.14.2+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.14.2","dependencies":{"tslib":"^2.3.1","@clerk/types":"^2.1.0-alpha.0","query-string":"^7.0.1","camelcase-keys":"^7.0.1","snakecase-keys":"^5.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"got":"^11.0.0","jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","node-fetch":"^2.6.0","typescript":"^4.6.2","@types/jest":"^27.4.0","@types/node":"^16.11.12","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.3.2"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_0.8.0-alpha.1_1648049542443_0.8586479657226966","host":"s3://npm-registry-packages"}},"1.0.1-alpha.0":{"name":"@clerk/backend-core","version":"1.0.1-alpha.0","license":"MIT","_id":"@clerk/backend-core@1.0.1-alpha.0","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"25424616464f39aa24f2a2b468b63b46fa56b099","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-1.0.1-alpha.0.tgz","fileCount":461,"integrity":"sha512-PU8N4yAKAQlVsT2X8X+QzomdDzXKzP462qjSixPNaTW/p04wT5dxgBR9TmXzPwHKVQhbUPFKZzMkJBCa+WFDFQ==","signatures":[{"sig":"MEUCIQDE7xVDq5lGH7kaEi0HjpYF61V9Ztwo1UPfudiyEdidVwIgEB+FUH3/FFdmEON2C+gCpwIJdMzm3wMFR9lFF0SaWFg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":573339,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiO66+ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqFtg//VU4MkSWhD5pb6lsNSxhuqXzueGW1t4a39co/7XJ2uqrlVQcN\r\naoF3vv7gIBP9Z0RVJa70fqkwqodgonTXZQVzh9LUPS/an20J+Ke/4b8wXyRD\r\nk5L0M1e25pcJt8hucwMOY2bmYJjAzvpsuV2Ot7OTOlIBn8x2hezKH5hEKJFc\r\nKO4IkCjWqdwmCXzjnYHAdGKdhzBO4Pn181XS6tlth4UunOovfp5U6CNR/C8B\r\nDPdWQ2+YLm3cPcNYiSSykZe9t3/0Y5Hc8ab9yeGR+M4dpE42Pi+wIgnBturj\r\nEHlfwiC4louQFEA/FLI1FL+82L3FvZ76DHC/E4ZzVyADM0a86b1q0QhlrkVV\r\n2ESm1SgkAYYUdxh9ePYgWeZ0h0E8NpL6at0xQr2M/wjd0OsiW9zIeCn8npj1\r\n6C0ymFkcglHFLbbx9AycztfWUy1IpaWrfxPB/S3KawnXEpkWv+b5/zXdyf+t\r\nrau0EafuQ4lJm4sqy7AP1TP9TtrwUCe1gJgNA5CXAWB4aNw/kgwA8vtrs8zM\r\nH2UIbwkXtiXwrVKFw+zjXxWC+GMgRr1bH970n821VtYevdNuykZhXbbiVuJv\r\n04k84CrIGFkxJaWbW/fxsC3BKgMQvkrylxCV80KMVfmMjHPCXom+6t7jKZOO\r\nvmNUUHgVrsCEOsKOJTjbFhp6VPFbVyP1NeI=\r\n=e9L+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/clerk.svg\" height=\"50\">\n  </a>\n  <br />\n</p>\n\n# Clerk Backend Core SDK\n\n_Clerk Backend API core resources and authentication utilities for JavaScript environments._\n\n```diff\n! This package provides low-level utilities and is mostly used as the base for other Clerk SDKs.\n```\n\n## Usage\n\n```sh\nnpm install @clerk/backend-core\n# or\nyarn add @clerk/backend-core\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\nwithout being platform/environment specific.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendAPI](./src/api/ClerkBackendAPI.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendAPI` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\n\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendAPI](./src/api/ClerkBackendAPI.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://docs.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendAPI.ts#17) implementation.\n","gitHead":"ac871c42455fe7c0ccef8d487c8352d654ea7f29","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.14.2+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.14.2","dependencies":{"tslib":"^2.3.1","@clerk/types":"^2.1.1-alpha.0","query-string":"^7.0.1","camelcase-keys":"^7.0.1","snakecase-keys":"^5.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"got":"^11.0.0","jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","node-fetch":"^2.6.0","typescript":"^4.6.2","@types/jest":"^27.4.0","@types/node":"^16.11.12","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.3.2"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_1.0.1-alpha.0_1648078525927_0.4467406754901668","host":"s3://npm-registry-packages"}},"1.0.2-staging.0":{"name":"@clerk/backend-core","version":"1.0.2-staging.0","license":"MIT","_id":"@clerk/backend-core@1.0.2-staging.0","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"c670c0d3d84e43541433877d90f85b94b3f90ce1","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-1.0.2-staging.0.tgz","fileCount":461,"integrity":"sha512-Hv9iO3WizrFlGLvoTiHbwMxhC5QJ6DsI1WMg/m21ZWUM9ROwMiTGZWtiUdM4u+bMZZa7biY2lbCzyz91ofrgRw==","signatures":[{"sig":"MEYCIQCRYFsJ+PhVGVN/YKSWfUztHK3pfDsCFgnvemu6zLuOzwIhAKUjUQvAkW6FYfdPLtjwH0NxWUhjdtmqeGfsNyQwHkJK","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":573343,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiPDZsACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqY3RAAifD/3YzxcAvbuoMt3A0mRs4p43/L0nBfh6dMp6wuhEtL8/tN\r\nU7K+pGaVm6CKE0UvmQgYs52mrMmCxY9etQ4yg5GdntIMdfbqIZZuQc7ruar8\r\n7IQ7P6mhrAMZ0AIwSSzZ+3p0P8PSbygD5SAF1ts2D1fGebV/GTNi4TpbuOHf\r\nq1wxWi/t6DHJp3CZQjhsW+a9ipLE0blj6rDaXRi9ey0ikzatXU3C7v+q7+IU\r\nVOLPTBoT40oh27KbEmLXzjGJ2KGy3ptwfOPaYAL+dfyIZXK8Vo1I/SCvjcVi\r\nKp0rnphNnJNArUT/yoEsDAqiNDI+zAbtoYx5l1d/oqnaHfeuGdINzl6o9DwQ\r\nU6a7q/yrVR0zwORxhoR93IEvWFDX9zFYHMASszvEeTWvJvEQOKjOVA0SfHaC\r\nNVyGNtkoEaQeXONss2+BcZ2aU0nTQh4QmqsXakkna4NSn3h5n0mCpb2gDEmF\r\n+fb3wghX5dRGNHYusRYZTt6OxgulXCjOU5Nm2chS+/YpWb1RvXuly85ISUSf\r\nxFn5LkacfyTmoJEPH/GP4xY+MA9sxfCz6b/dkr90CyH0V+F294JMxYscDdRa\r\nfad7b6lqYSQNbwSlcGf/ZouedtrPbZHDecNjAwmKeGmxrlJM2bTZ7XLOBqq/\r\njGQoXSjWQzueIz0e3A/I2pwnR12xu5g/4pM=\r\n=DYgp\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/clerk.svg\" height=\"50\">\n  </a>\n  <br />\n</p>\n\n# Clerk Backend Core SDK\n\n_Clerk Backend API core resources and authentication utilities for JavaScript environments._\n\n```diff\n! This package provides low-level utilities and is mostly used as the base for other Clerk SDKs.\n```\n\n## Usage\n\n```sh\nnpm install @clerk/backend-core\n# or\nyarn add @clerk/backend-core\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\nwithout being platform/environment specific.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendAPI](./src/api/ClerkBackendAPI.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendAPI` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\n\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendAPI](./src/api/ClerkBackendAPI.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://docs.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendAPI.ts#17) implementation.\n","gitHead":"72c180f54f7fd15c7f050f91bcfebc3a626aa1cf","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"sokratis","email":"sokratis.vidros@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.13.0+x64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.13.0","dependencies":{"tslib":"^2.3.1","@clerk/types":"^2.1.2-staging.0","query-string":"^7.0.1","camelcase-keys":"^7.0.1","snakecase-keys":"^5.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"got":"^11.0.0","jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","node-fetch":"^2.6.0","typescript":"^4.6.2","@types/jest":"^27.4.0","@types/node":"^16.11.12","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.3.2"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_1.0.2-staging.0_1648113260289_0.22738795671277368","host":"s3://npm-registry-packages"}},"1.1.0-staging.0":{"name":"@clerk/backend-core","version":"1.1.0-staging.0","license":"MIT","_id":"@clerk/backend-core@1.1.0-staging.0","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"544a3b9bc76126cba0806f2ec5e6559ddd3688c6","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-1.1.0-staging.0.tgz","fileCount":461,"integrity":"sha512-HNBMVziqhKRZ9RRwxQqoQfpKZVUO33pZTK36ctlEGpEFyq9r0uZ4Og5dXLjKibSC3PdcDvOmAEPtjule/Olp/w==","signatures":[{"sig":"MEUCIECDU0WLjLKnWoxWAXBZBcUifneTILhPki0oWFcw5t7wAiEAssRQJ1XBEvpyXMAdPg/H4vYfXp/HXJDETEmvXdUBDaA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":573520,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiPO6wACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmoozg//d2E49k+0UtkLAzuPk48NQ13okYW0azItQ5jxZ21DeBldVmpx\r\nXuhP9DZHTCw22tcv1ErHeRsQyYSkDhfaT2RlvNtQkdlywmd4CNj1qfTWWZok\r\nLIriW0QD5fULEnqqDX5NGpVmyGMCC2XAGmJiMXAHSoWdiiIO78E8TDCQWWyh\r\n/c0WupoNQNMdCilaeHfVKj16WuO7rbEXUpb5RFx30gJS0k7z/BLccb4qBV5s\r\nMng41I8hcRn+Q+7pHvGeAuX6m6CyjDgrd7+/izZ7RMSAUWkkeHnr3LOOZGQN\r\n7nXuI7f+lcvKYj0V3e8+1X51ehU1H38Vv8Fso2oId3erbWz+Y+CAJcB7FI4P\r\no+dKzwk1cmhDMM+rS1MABagvCK1Jv8/DwL7lgJDeXT4Wbg0rG5CS/BMn7KkZ\r\nKvvLptPCHqSrddeI2TgY3kCcFg1arQIRBgKwYxQ7Ayh1Q8zwzdzRXozK3wvY\r\nU51a77GbYKnEp9njCSf+ELbUnf87kKmiREommxjA8pHdPIJxU/dY+WwTHjlJ\r\nxrjR1CjL+F36s+DNd2esDAtKdCATPmw5xakhrRjlboWIy9kiR6F1mtTMlqQj\r\n0r+JUXy8BFWhDjKMwLxmH8Z/YuUr1IwBbyKxRIVrc1U/kYCxW2+GCKyJbOJs\r\n76cJurYqNYpVlrukJ2cIKicof4rJP3Pm5R0=\r\n=2qtq\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/clerk.svg\" height=\"50\">\n  </a>\n  <br />\n</p>\n\n# Clerk Backend Core SDK\n\n_Clerk Backend API core resources and authentication utilities for JavaScript environments._\n\n```diff\n! This package provides low-level utilities and is mostly used as the base for other Clerk SDKs.\n```\n\n## Usage\n\n```sh\nnpm install @clerk/backend-core\n# or\nyarn add @clerk/backend-core\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\nwithout being platform/environment specific.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendAPI](./src/api/ClerkBackendAPI.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendAPI` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\n\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendAPI](./src/api/ClerkBackendAPI.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://docs.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendAPI.ts#17) implementation.\n","gitHead":"6f249d73f5cd775eb74f53309e47f43fc8223880","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.14.2+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.14.2","dependencies":{"tslib":"^2.3.1","@clerk/types":"^2.2.0-staging.0","query-string":"^7.0.1","camelcase-keys":"^7.0.1","snakecase-keys":"^5.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"got":"^11.0.0","jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","node-fetch":"^2.6.0","typescript":"^4.6.2","@types/jest":"^27.4.0","@types/node":"^16.11.12","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.3.2"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_1.1.0-staging.0_1648160432826_0.45404043348888523","host":"s3://npm-registry-packages"}},"1.1.0-alpha.0":{"name":"@clerk/backend-core","version":"1.1.0-alpha.0","license":"MIT","_id":"@clerk/backend-core@1.1.0-alpha.0","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"dfc070a589ed1ee55dae813bb1bf80f3acc2f46c","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-1.1.0-alpha.0.tgz","fileCount":461,"integrity":"sha512-IwqMsrL0AzT0ob5xV/TF1euNr+qvLfNlrfoFSUOq/cmqLHno5zOKN1mSmMP04P6VNdLDNXXjHDK5lXb/C9BcdQ==","signatures":[{"sig":"MEQCIH6GTz6mnAlYatDXUFLbmfkbojnDeuX9Rp2RDn+Rdno0AiAd7H3eD8oB4IgtQBG70agb3+wPXCILXjY0SeUMFg9orw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":573516,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiPO96ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqTXw/+LmoPMno3tAHFLC49891VqiibO5PFZMlCK9z4U0MkHIePozlP\r\nbR1WxkRFOTPRurZExoZl0W3ub+29IYcwaP1FsMqhZk7Sib/P96qxBJv/eQH6\r\nIghNI6MtumUwHwdvTUSyB5CRclw3zMFwChn4XiKve1GVNrEsGQ+r8MF+TKJ+\r\n+RS08m+qXFFizYvi27RTfYBJLSG4tA8HOyWdlEJF57M2NEN07lwFk6O/Z4rh\r\nfAkanxF2j8DDVoXaxwA9vouCJJty+k7diClHVP+l/4Rwq3Wmctlaqsm9Rvbm\r\nT6xN4ltvXbpiSbYebYTCR8WQuo0ECMkfDqTIH1/0kGa+HxxPzALmxhPL77ex\r\nfCbLxnCY02gMbgqfxwIlWHuVG7949Ax7fubpTDdo/chLlKaCLCx0QvkUJFkh\r\n4YGkyMT2Jw4P8L57FlbZPTC1SJAShzZOH/fTZ59wIejfGuYJY45d1tt8L+Cr\r\n098J3Jfg9BcK9H6Iw1NxLV9YRgTpHOc9hgcHy5nMwXauT4ic8G5G58+oCmtG\r\nFqGQ7tCQ9ioIRnrPzhnA8jVsk9bv4nXRA8hkzbFsthROr0JRzhHC1IffsM4X\r\ny1P5FMzZqrZvOaMv8lcjFaKtWHYZ3KsbfOu09VTJdEVNrdZfnNulPTDkvy/i\r\nP7OGlqdFbQPBcSgRu/XfUvqrFdjg/JATIM4=\r\n=Br0Z\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/clerk.svg\" height=\"50\">\n  </a>\n  <br />\n</p>\n\n# Clerk Backend Core SDK\n\n_Clerk Backend API core resources and authentication utilities for JavaScript environments._\n\n```diff\n! This package provides low-level utilities and is mostly used as the base for other Clerk SDKs.\n```\n\n## Usage\n\n```sh\nnpm install @clerk/backend-core\n# or\nyarn add @clerk/backend-core\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\nwithout being platform/environment specific.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendAPI](./src/api/ClerkBackendAPI.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendAPI` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\n\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendAPI](./src/api/ClerkBackendAPI.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://docs.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendAPI.ts#17) implementation.\n","gitHead":"238fb1ae76dd35d5d5602e6cc2296821e5c4df43","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.14.2+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.14.2","dependencies":{"tslib":"^2.3.1","@clerk/types":"^2.2.0-alpha.0","query-string":"^7.0.1","camelcase-keys":"^7.0.1","snakecase-keys":"^5.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"got":"^11.0.0","jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","node-fetch":"^2.6.0","typescript":"^4.6.2","@types/jest":"^27.4.0","@types/node":"^16.11.12","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.3.2"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_1.1.0-alpha.0_1648160634688_0.9180864437313383","host":"s3://npm-registry-packages"}},"1.1.0":{"name":"@clerk/backend-core","version":"1.1.0","license":"MIT","_id":"@clerk/backend-core@1.1.0","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"31f4c03286d3174a8fa4ce41e6dc772f6ea6ce23","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-1.1.0.tgz","fileCount":461,"integrity":"sha512-sMXYIDC6sEjmuGWTuVR+uHSP6ff3DL0yLFp2xYaKQjeOM+xtRL2gOIleQ2wnb1NxRgRETKDlt01LXZiuDHXAQQ==","signatures":[{"sig":"MEUCIDxCOkDxLvsdyI2LgzRmk3X6IuqukTPCXqPlufYV+xhdAiEAoCVXiI4uzTGxBM53VF7QuNpgsmRH6otYsgaMlAyE3C4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":573696,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiPQb4ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrSBQ/+IDQr3CNCA/BezGvxSuwVJ0PxE97LhzLVV2tRmJ2NI/Q6z4EV\r\n2UVLL+BUPFprgRz7rtnAKBhnMWWT0A2UBrU7AntWAvYUofwRkZq9lAgY18Mq\r\nNnQOp+S/Bv7x7soGeJLXkLO9gZ/jTdByKHOLdtkXyTZB0n8Te7ENq/sJgMqG\r\n5dePHLCN1ml/t20QnXzoiDuYddlWy+oj/So1AOawC5VERX7xkNClE0Qu6BRy\r\nEjTPhAB9rx1wcKoAxHgFY5YelQOt+MtV1ob2FJ3MLAdljPjweYU9JODPtrOp\r\nm4sgkPAlo8VamovWLvkPmHRMaCjL38w7Hm2kByhzWE5s+/RtnIGjmBIKPblt\r\n3Haw/rVp1k/1OdeiUXeEh8wIO5IcQ97v1HjXWBjAKYlPlnESZSGUxsiR72sK\r\n+Si7Rcj1dW6XRgfLxizAIyfxOVOsIxNwiYzx9328Lb97HLtPa4EQAD/9q5l5\r\n/mjMvC/QfhY3eGlzpYaRTQg3IpjuNUFTQjFnEeN2+CfBaTOz2YpVo95EfxH3\r\n0KtLFkvaj4fu8NoPIzMwSO4JNcsmhpyEuGvZKuZ2Hw5ue+B1gZvme2ToA8YT\r\nrlwQuXMamXM0SeabhwlXOigQItNI0LK5/YtZ7SB1qBPs67nnEQ8Gzhg+UKLU\r\nUGHpxXJudxy0uzRtR/Di0qJ6A3GP2XzGxlc=\r\n=d5Q7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","gitHead":"c55ec419ca457423883d18581f1b6adfe3528717","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.14.2+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.14.2","dependencies":{"tslib":"^2.3.1","@clerk/types":"^2.2.0","query-string":"^7.0.1","camelcase-keys":"^7.0.1","snakecase-keys":"^5.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"got":"^11.0.0","jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","node-fetch":"^2.6.0","typescript":"^4.6.2","@types/jest":"^27.4.0","@types/node":"^16.11.12","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.3.2"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_1.1.0_1648166647751_0.3309227225100084","host":"s3://npm-registry-packages"}},"1.1.1-staging.0":{"name":"@clerk/backend-core","version":"1.1.1-staging.0","license":"MIT","_id":"@clerk/backend-core@1.1.1-staging.0","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"062b07111499a976390b6f4b190dfd0a799253ae","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-1.1.1-staging.0.tgz","fileCount":461,"integrity":"sha512-UC42vDhkBksI6CR6ztAeO8tN5o5tMkryrQ8ALHNpx59C5cbpdpFb1vTjtseBg2nwRVRgPzPa88VjPfQXXqUuJw==","signatures":[{"sig":"MEYCIQCowQcSiWqW3cfJhpzqNMERZ3PCrbzrCxomootfap0yDwIhAM9DgZasGTRgTZhPVZrFEDMVyIZidFHorf5XAskO/kAT","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":573897,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiQcITACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp9Cw//R+7h13vGSsqHLAMvx9FIuftR/dyVJXt5hHH/b09/JLutCs58\r\nDL8T3+l+L81IEkS/UNep/IbvFOq6hwxHYgLiuMBllWLoVkCwd+WdiR3RvI39\r\ngdhTB3nU8IuTTr02dv5HjKX/oc3sWW6DYmhbGFEO77J7fKq81DWu1K2nr9gV\r\nD/P+NDIAmllvdUUcgt9vg0y3bWDKz76FnPUV7j5Yptgu0fxJJwfW1ErI4qDS\r\nfo1VjxNLeRxFP7FieDKPJqdc5lRmPSyHO1gWOVZfI0sQMwyDiN0LazOAeJ9U\r\nt6ECJ4uVZN5QotagUTOl7oIUNhrMdUrjMDLR/TrPzoe2xQQFEcQrmDmmXSUC\r\nXRPzU4oSPrUerTannIAvqV48Wb1qHIQX+Nahed9DVVsn8+KIKVyFJ0PzbQHx\r\nHuYh3tUipOdPtkm6DbaH2pxuMyakpnB+oEtMc4YJmDdhcLI5virLumijfJwu\r\nRgz3RQ8iLQncWOjCEXpJXK5kLboIQ6IZp4Ga8wW9iQolROWaMGHB5tqBYB1E\r\ncRTx4kfpl7bi/ZzH87ZOGgNrNtExSSkDU6/TKrbwzZZP4jdkIBFd/Be72FVz\r\ni+DFdgdmBW83tILNUk29UHZWv1x2EhvMvr1PQBWoqVGiKHupLqHeaOkgQIhH\r\nbzd1v2sly0/ftmqZk63H92B7wXlwlCCO4W0=\r\n=ZPnv\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/clerk.svg\" height=\"50\">\n  </a>\n  <br />\n</p>\n\n# Clerk Backend Core SDK\n\n_Clerk Backend API core resources and authentication utilities for JavaScript environments._\n\n```diff\n! This package provides low-level utilities and is mostly used as the base for other Clerk SDKs.\n```\n\n## Usage\n\n```sh\nnpm install @clerk/backend-core\n# or\nyarn add @clerk/backend-core\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\nwithout being platform/environment specific.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendAPI](./src/api/ClerkBackendAPI.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendAPI` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\n\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendAPI](./src/api/ClerkBackendAPI.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://docs.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendAPI.ts#17) implementation.\n","gitHead":"5c96f5d6c31d0676a0bcfaf96695aa830e53dc26","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.14.2+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.14.2","dependencies":{"tslib":"^2.3.1","@clerk/types":"^2.2.1-staging.0","query-string":"^7.0.1","camelcase-keys":"^7.0.1","snakecase-keys":"^5.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"got":"^11.0.0","jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","node-fetch":"^2.6.0","typescript":"^4.6.2","@types/jest":"^27.4.0","@types/node":"^16.11.12","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.3.2"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_1.1.1-staging.0_1648476691265_0.7921764730541465","host":"s3://npm-registry-packages"}},"1.1.1":{"name":"@clerk/backend-core","version":"1.1.1","license":"MIT","_id":"@clerk/backend-core@1.1.1","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"661f6c51bf40dc1203e4eff237dd9cace1524dd0","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-1.1.1.tgz","fileCount":461,"integrity":"sha512-VCv8YxEoWGOvMbGSZU0OaSHs/cxAaUxsrd+o9qQEs8hxQtCaDjmTZxEvZroTyM/3PLvd7OXu2z11rMExzVTNBQ==","signatures":[{"sig":"MEQCIErRDcoOn27feMuvKmThY8UO6eZkjAHHl/X3NuNtZcqfAiA8/uoKkvbutMPYPA6t2/4UXMQviOukiW0kmMnW31yCSQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":574076,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiQdAoACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqDCA/9GoZkdM/fC7+hLlRwoJLRvn9Nvc1+W+qpRsmaYHZbzwVGjzA5\r\ne74gETyD9Ol/05d4Z6GKImN8EdUI3qnSRsmZzRt4R85CdCQtZulBtPMH2cdt\r\n4htXRAVUvarNPEkv0Why7EO2IZkumusSCmcbhzfkc4elT/LSo/+W/B7kUwGn\r\nt+9Hk7C0GBW14wNiSs8hyI5BmnyEzxskJaDe4qXwsZ8NO7oHTdhUgWrDrYLj\r\nU/tYIm8al8X9mkfjjAsBFmjs/NwBL5m3EP4zN2fneGTRnNalDV7YYaxHUW1Z\r\n0QLssVTBWW2gn3dW7DlNHFDkA9Lory8CmPuUE4fpGtnObbsJ1lAU3RcUg+KS\r\n4ZIhgf3KKiezxgk3yWGNVxWPRIxujT6mLfwv7bT+OkpzrVsdVgShb65cc+p3\r\nFUvMuS24btZ1TKnPvGtkaHEvZ8AHKky7cWMPIZB1aHAcwohct2imlmURWzZn\r\n8vZMp6dFS0s0a45or0v6l44S5koq3rNdXlTeE6Q4Zs7VjStfCBTr3FDAw3Mz\r\nUWHPslUMqAIs0KTN0t3jVuXDY+Y1CO0ALWlqaMMXsVFeDhRLQddkhkSAlyYi\r\n7pYXGa89u0V8nCOMUEJYjubW5nEjbt3mACjxJQWl1wBzlvRmJtnCytRZ27cM\r\npa1KBMueitLQn7NfGabx4oiWwQJdGpdzcks=\r\n=u9kR\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","gitHead":"52431beabca9a40d362f792e7fb8137132d62c16","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.14.2+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.14.2","dependencies":{"tslib":"^2.3.1","@clerk/types":"^2.2.1","query-string":"^7.0.1","camelcase-keys":"^7.0.1","snakecase-keys":"^5.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"got":"^11.0.0","jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","node-fetch":"^2.6.0","typescript":"^4.6.2","@types/jest":"^27.4.0","@types/node":"^16.11.12","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.3.2"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_1.1.1_1648480296571_0.2590735554074346","host":"s3://npm-registry-packages"}},"1.1.2-staging.0":{"name":"@clerk/backend-core","version":"1.1.2-staging.0","license":"MIT","_id":"@clerk/backend-core@1.1.2-staging.0","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"79f35d2382da9ac8687d2fe2853f30421aa672ad","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-1.1.2-staging.0.tgz","fileCount":488,"integrity":"sha512-Uo5jBRUMc4dJMsO/C8xlg6IvuqwH44uQpb3RycAGXEBEQhFvtH1asDvrRz0hm/lc7iGASRSfs6r5yVVnIFoj6Q==","signatures":[{"sig":"MEUCIH9tleVuROfUhw0f6uT8RaZlMrXffjMfBzNdxoq9B4+MAiEA4dUNu9qHZaxyjvGF01jBaiCRoc8VzrjbmINRGlIdptY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":584016,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiQwplACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq3vxAAlUknldcx51NPE4fV04DsdrljwpCeET+dHEa4DQHmhwxxCX3G\r\nIP7Vxsx+LEOLX71vIlIwLo1sRcFern1U2OYP+5mTCXAIOXt3r7ogzgzlth0r\r\nxwruWfhOvkdvVtMa+teuQGmFfeR15iz31RGjFtuQ/clU48TWlR0iK2/qMSSB\r\nRkgaCproSUKqDGeeaEaUhf5RCH3a6zvyl8kXFOij+77Ji9wDLS6VFnoULa5z\r\n4WsUtmaropz2EPZF8bsXakrqLcdDgWB442OaHJ6+TeF2cy8rFEfy0WPePp7y\r\nUv4lr1iM+LKi7VezGuuK0jzsgNyEqeUZI0VU0LSp3mETGlVRdBTiTLVsbMz6\r\nqukUmKw0ZpgpwG1leErPyYJK0AvQiBMFY7G5PEnxRc6iIGGsL3Gke9lluQRR\r\nHhlfNc1Na3eGy2MKA9hyzHgVMQCw8NR9WUzlNUDD+Qu7JLo5yea4acNZ1mUn\r\nyNGRC87qBOsvdUiLtvDYVq1XQVRhqtwNIbcFhURkYIuUdkbkajp751B2RgcE\r\nZ7by6yCZrzh2aRjkmH8tBjYgm6ibGDEro9YQBS36Fp5+zOHYyaUbhhimWn8D\r\njJsoI24UdrLRy2AZnG/oZvJulB3WwfYRyIOZJV3jcRjSEei0rTprMJwpM8UJ\r\nrltyVKWNgxx9EuuSUoXFn2y7zPU1U1KjQSg=\r\n=YboH\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/clerk.svg\" height=\"50\">\n  </a>\n  <br />\n</p>\n\n# Clerk Backend Core SDK\n\n_Clerk Backend API core resources and authentication utilities for JavaScript environments._\n\n```diff\n! This package provides low-level utilities and is mostly used as the base for other Clerk SDKs.\n```\n\n## Usage\n\n```sh\nnpm install @clerk/backend-core\n# or\nyarn add @clerk/backend-core\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\nwithout being platform/environment specific.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendAPI](./src/api/ClerkBackendAPI.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendAPI` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\n\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendAPI](./src/api/ClerkBackendAPI.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://docs.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendAPI.ts#17) implementation.\n","gitHead":"281e13f71ca9bbed1eb88d50fc89bf5f16c2e480","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"igneel64","email":"p.perlepes@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.13.2+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.13.2","dependencies":{"tslib":"^2.3.1","@clerk/types":"^2.2.1","query-string":"^7.0.1","camelcase-keys":"^7.0.1","snakecase-keys":"^5.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"got":"^11.0.0","jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","node-fetch":"^2.6.0","typescript":"^4.6.2","@types/jest":"^27.4.0","@types/node":"^16.11.12","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.3.2"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_1.1.2-staging.0_1648560741249_0.13479978091133127","host":"s3://npm-registry-packages"}},"1.1.2":{"name":"@clerk/backend-core","version":"1.1.2","license":"MIT","_id":"@clerk/backend-core@1.1.2","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"a944d074ef82401dfbf481a66bc87a1413bf563e","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-1.1.2.tgz","fileCount":488,"integrity":"sha512-5ibSBjYxsnMMiU6cxTgmbbKWXExQJZTu44PLLBzw9/+/l+NISg7Rf3DFnqtqTgL8Yi/WHwG87vThCTAWb08CNA==","signatures":[{"sig":"MEYCIQCWUvCUgzc/ef0PM1pp82tFmpaFxRx3HJ+y4vRyAA+sHAIhAPmm751DkQgbsfQ3aoXWv1F+jlVwbPpyF9pMSTTViWOz","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":582175,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiQymzACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo+nw//Q/BU4CJYesukteL/5JNKUryKFZHsn6EpW5j4OZJDkgq5I5HR\r\nmneh30D8+yzCO16GfBC9cBzgcqF+omqhNXpJgt6g+c2PgRHXYI8RC4XlpFvr\r\niPED7msqZyekFV/FTBq9asRPvfetMMTsDIiEgJWJa6QATZfh0qAMUV9JrbQM\r\n053v6CIVUVPd3o0HzwqxafExWwkzkom30fMD8N6RH8GMmeSpkkRy8K8rgaoC\r\nQic16/AKIjTfXy1Z1KwXQiwb30LOZi3RaNNUqPXeUJohdtS25ZkmVHwZ6koC\r\nQOoc/drf3EFMVLwwp2IiROx8QG7ISLDT5+dryy8C9/q2gBRd7o3B1Q07yqYS\r\n7m69yWOMjwzduOb9mNorA1DlsVzwlL1lqViv2ihYN3SFfvqeAYsKEUl6lTAY\r\n0+Of1X3H7jgqb91e0nq5fVxElw5l96/eCeOcKYgBcV84RYPJSPz7YhMk1eM1\r\nwc6CZsGm6AWjJ+xV7ZPCCWpJdj5r3NP0nXZYVK7nN7C/f81XHTxPjoqgn2i8\r\nn4k8X6AeANIcA7rS6N5cu6j+QM2/PV7Shcd2eOQ7SNy6TL58CDl2yvbkv48y\r\nJ0w9mimUKmQOCsYEjrL2ZY5V+uIrH1lA/z9sixEisX57ilSDFmFy78oZTi06\r\noEacaWXvgQ+VD26maVlQQbqKsMFJ79rXmdk=\r\n=YAny\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","gitHead":"7a6fc4d62a02234d42e53dc21a1745ae4f347c34","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"igneel64","email":"p.perlepes@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.13.2+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.13.2","dependencies":{"tslib":"^2.3.1","@clerk/types":"^2.2.1","query-string":"^7.0.1","camelcase-keys":"^7.0.1","snakecase-keys":"^5.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"got":"^11.0.0","jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","node-fetch":"^2.6.0","typescript":"^4.6.2","@types/jest":"^27.4.0","@types/node":"^16.11.12","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.3.2"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_1.1.2_1648568754998_0.22910126781206408","host":"s3://npm-registry-packages"}},"1.2.0-staging.0":{"name":"@clerk/backend-core","version":"1.2.0-staging.0","license":"MIT","_id":"@clerk/backend-core@1.2.0-staging.0","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"62da3d813cfd15edc292152f34cfcf8e47ab6eb7","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-1.2.0-staging.0.tgz","fileCount":502,"integrity":"sha512-HYNJOxzUB1EDsLnS4LZreOCWq1nRdzNGvYghujIMFKhv+RCmqcd9PtaJLN0HlO20neDdBAlGUsIyOW5NG9g9lw==","signatures":[{"sig":"MEQCIDmh7fNUAd1/0v91rV6aNnVzE4g/YURxEzgqhCyy/pRxAiBUT44OuSjaPT8M4olGYsgrBfrYphpgryt3cjZDMy2RfA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":642920,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiSrOmACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqtoA/+O0hXAJJcR0pKq/90NkF9V/rAyH6CtXEkHjEEfoEPsSsVj193\r\ntSxWgKXeI2lCGfwvHi5Nku/xX3uzM97yI8gAR8MCST+mDSSA9PXwzkyFB6Hk\r\nPgOrA9fKugzEMbhf4KbHsRhcYFBe6dIXzWq/UYMZZcGVOublL24dk9EjvqPG\r\nmKfbNHLVCYBUxwdeA+pKljDvIHq/mtTEmuOECunLDkuldLP4fKBCl69Z89kp\r\nGP25CWDPWmfu2C4dY8fRpdUmRr0Ki8balHdggRPZ0B/0l9Jhcq/nYi+90bwX\r\nviv2y/b6vEGuzpHLZvwa6SiJxCrmOwLA/fzNnf7sdvJI81Gv4BvjC4UPaUx+\r\n0iu8FD3qGxRU3DSQ0ozK7mte6m40YkLyPxroaVB0g8nJ6atMkOVayyyQtYme\r\n43dLEZ1udBaqbftdCofx0k9hiizfuMDxJ+P26df4NlDNlqFo1/Yqcn2/Z26d\r\nBEwlsYLYVEkN0EkffdJWC3Tr6nEL8TPeiUkDkKj2oWXyEpoXA8PrAMclYP0o\r\nUeVBrouIhiF7FGofDYUJrLb60VUy+AyAdoftXog6tsLvdaV92MGeIQWWUoBd\r\nvTYGwyWRofTPLT21QhoUnuEd17HouEgSCEmPATBO2SI3cCMbmST/9DlLcSPm\r\n1KVAs1zS/ChSilncoD2A9RmTQ3nq3fNyoCA=\r\n=dHHP\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/clerk.svg\" height=\"50\">\n  </a>\n  <br />\n</p>\n\n# Clerk Backend Core SDK\n\n_Clerk Backend API core resources and authentication utilities for JavaScript environments._\n\n```diff\n! This package provides low-level utilities and is mostly used as the base for other Clerk SDKs.\n```\n\n## Usage\n\n```sh\nnpm install @clerk/backend-core\n# or\nyarn add @clerk/backend-core\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\nwithout being platform/environment specific.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendAPI](./src/api/ClerkBackendAPI.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendAPI` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\n\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendAPI](./src/api/ClerkBackendAPI.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://docs.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendAPI.ts#17) implementation.\n","gitHead":"c00bf993a1ec4f8b71068cf1787fe4dd7519921d","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"sokratis","email":"sokratis.vidros@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.13.0+x64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.13.0","dependencies":{"tslib":"^2.3.1","@clerk/types":"^2.3.0-staging.0","query-string":"^7.0.1","camelcase-keys":"^7.0.1","snakecase-keys":"^5.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"got":"^11.0.0","jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","node-fetch":"^2.6.0","typescript":"^4.6.2","@types/jest":"^27.4.0","@types/node":"^16.11.12","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.3.2"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_1.2.0-staging.0_1649062822611_0.974329321190103","host":"s3://npm-registry-packages"}},"1.2.0":{"name":"@clerk/backend-core","version":"1.2.0","license":"MIT","_id":"@clerk/backend-core@1.2.0","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"f7bd3ea08e3139fa5d7c677c76cebe210f171574","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-1.2.0.tgz","fileCount":502,"integrity":"sha512-repjf2LUvh1VJDwt2KuThtHSjVbvbGlVc7O7iGr4++tRQNeSkjEwDPn/Emq3/3T+O64a5E7fnrT+RlKoYC/nXg==","signatures":[{"sig":"MEUCIQCzaf5quBNcu5xYf2VQEcl1D39Xv8/s1rwJD5SiW82coQIgdaXyamXhaHZZmYaUL49EKPcD/sEUPrSwlo9O6maWsyo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":643098,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiSv6qACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmoa4w/+IOXe2qekqg9XzAr0w72X+zlpYmaUW3TYolV40bETqY11j3ri\r\nzi7BMDiurX/oN06wqn5XVxZnPPceFTbHXPbU5lFrx8XvVx2ZWnd1kmQY0bz3\r\nRMHUTiCbj339QyshG+zBWBo8+xbjuuCKdiICzP1DfDZDeAR4kINKk78wtUNq\r\np48ewwYNue3dSFM5d/DcXs/xODivwnRzDtHJzbaVtaTTpZGkWpkVCw39pMjJ\r\n5EXw15k4GrOc5gtOBzMGS728cmbpy29KMKjcQ8QNKdyMO93uLCAmdwpVFMzH\r\nt3f7Rcegj9pLeMC9ReD2Ni9UqSMepSzy3z7UlT4ch3rQF3Tf9nqD4lzVfrvu\r\nN+l6HS/H8BaJ74UUHz+2l+QmPzl/UAHh2hp9Xt+cKFJ0GW3KKCpsLDLLMEqv\r\n6Jwr32jwvtSQCyrRdfy8z5y7t1A6hPzn6uFBpTr0hWfROZ8ewEHLrPKOe7rf\r\nHhqMCNXsYlmuvKiky9vpNtMcolejcOODGziTqT4us2c6hTVvxbmGaiCvbkSs\r\nFqo6glNv1EAXU2uXozcjoaiLliKi9iD4mb27/sv6yTmQIDNoGwy4bmfcU+4J\r\nccUxgbMHdPlGRI2SZHTorH9/XK7ClVLvaj1HoWcGnNt981hagYTsvMGo4MZR\r\n+jkJtaery8b4p5x22LmNzYyjLZPIsD+J2RA=\r\n=sam2\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","gitHead":"50943efe2131bc1053dbb104dc2f8329bf648aef","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"sokratis","email":"sokratis.vidros@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.13.0+x64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.13.0","dependencies":{"tslib":"^2.3.1","@clerk/types":"^2.3.0","query-string":"^7.0.1","camelcase-keys":"^7.0.1","snakecase-keys":"^5.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"got":"^11.0.0","jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","node-fetch":"^2.6.0","typescript":"^4.6.2","@types/jest":"^27.4.0","@types/node":"^16.11.12","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.3.2"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_1.2.0_1649082026432_0.40421417967458484","host":"s3://npm-registry-packages"}},"1.2.1-staging.0":{"name":"@clerk/backend-core","version":"1.2.1-staging.0","license":"MIT","_id":"@clerk/backend-core@1.2.1-staging.0","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"b27f465257576ebfb78e69d4305b08cc9f209dcd","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-1.2.1-staging.0.tgz","fileCount":502,"integrity":"sha512-gMugTe8pzMf4HxrkzRegAyC2ILKPjmBAKiwJIkvjALmGZDIr3Mj2yf3iYI866jawMFXfZmReRNuF4Q9HEBSqdg==","signatures":[{"sig":"MEUCIQDqxWnjlGDudznvB2/J/X4iAAcvqCCG3nHVkaCBmu+aHgIgDB/szLH6Z8Xsd2L/N5CdrIJKqcuGBekPo7OnngCdJRE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":643118,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiTFljACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqDhA/9FH9pbwChxjzek1YfJvdDawZY6dv5ErSob2CCRaIko4Um7Jik\r\nnG3If1z+y/o5pg01t2xkOvNRQQ2VvsakfGYg23+yS+LYI0DjGHcNUCbIYFMF\r\nYYk7IPpzpP97HY3dMf3j9tbXlzSG9E4Z4xARE7d/w1rMQ5nLqDFbo64RRhA9\r\njNKwkTmGdMwY3wuQwT3CW78aB2SotLQsDOTX5XlwLqb/RAgYZCn09TV5XFfu\r\nf4khWKCDYtaJiVMgEbSf7ZcjUmwJAfBOqgLu1KpS3jl2IyFQPVrGG073tnEI\r\nzHRpuNDNKmsBCxKOABTwPxnv30YMXOcaXhe4KfMkwtIg8Wi7DWA+x9Q0MHFc\r\nVyg7EMLjdpA3C4tDp8CqrwwCJEQ4Jhf/vXSvurPneUscQpzjVNsYMEaV8X5g\r\nA35f/ioSyPsVRRWhGgpMrbolHWrRa/kqZoZpuTjnuYP1XvFZZzcq0Vmdzfuc\r\nsHWmwX5D8M1jsPFUj4wgYRtQQq3hmX2CjZggmgw1ZOn4EotaAJnDrUJgOiax\r\nvlElzAKK/2rk2ad+NG8KKwR9V50i6u9kpuPNi2N6XMqhTlvdLzKQu8U4vIwx\r\n3K6A1CLPGTDJE6V+VRVm/W16A9oE/cV+V02t0YbTBh6ZOo6r7vTES2BwUyi+\r\neCF1Jd+B7+nv49UV3KkBLZaTrujtDoGMAxc=\r\n=+ZUp\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/clerk.svg\" height=\"50\">\n  </a>\n  <br />\n</p>\n\n# Clerk Backend Core SDK\n\n_Clerk Backend API core resources and authentication utilities for JavaScript environments._\n\n```diff\n! This package provides low-level utilities and is mostly used as the base for other Clerk SDKs.\n```\n\n## Usage\n\n```sh\nnpm install @clerk/backend-core\n# or\nyarn add @clerk/backend-core\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\nwithout being platform/environment specific.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendAPI](./src/api/ClerkBackendAPI.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendAPI` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\n\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendAPI](./src/api/ClerkBackendAPI.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://docs.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendAPI.ts#17) implementation.\n","gitHead":"0da63e290907d2e21e051709cc93bfe25a268db0","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.14.2+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.14.2","dependencies":{"tslib":"^2.3.1","@clerk/types":"^2.4.0-staging.0","query-string":"^7.0.1","camelcase-keys":"^7.0.1","snakecase-keys":"^5.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"got":"^11.0.0","jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","node-fetch":"^2.6.0","typescript":"^4.6.2","@types/jest":"^27.4.0","@types/node":"^16.11.12","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.3.2"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_1.2.1-staging.0_1649170787575_0.7843977701625096","host":"s3://npm-registry-packages"}},"1.2.1-staging.1":{"name":"@clerk/backend-core","version":"1.2.1-staging.1","license":"MIT","_id":"@clerk/backend-core@1.2.1-staging.1","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"bb051765615db61f3f16705f64cddd91d98c2a09","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-1.2.1-staging.1.tgz","fileCount":502,"integrity":"sha512-ojEqKECA78zgVE+642mlbIe/vdgIjOhqT4QiJyzhkdI7oPx1rV5/jhMCNg9MpOl3hxbxa0CINLmpVd+Ccg022w==","signatures":[{"sig":"MEYCIQC5tYo33KUhLGlXAJgS6Aoyp0nkHlT5rUfeKw/ooVfYWAIhAJ1sy/+EGS1LAHnXv9J9ROdXXWTEoYeOo9fv2fxJd3vV","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":643118,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiTHzjACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq3Vg//bnBWjtRR2lCgr5HaXFITcC/5D1rydreOc5eqeEALE7iha+cX\r\n+TumcLqv6hAW2HN31qxZY8dnzsn7i8f2p4Er21fwBsyeTaNny79hh3CnrTnx\r\nZqQVvkKhXDxGHdqKXenkKhdhvq2ZnN+t+m3QZ9ntEFwMa8tYRQlrxV4pA+pY\r\nmjBKq6pnEN7y6bnx6SMF62hgsQ30+TfXti55/MML03v3bGEY9P1Q+dRzRHLG\r\nZa7UNzmpUaSX0ulgU42/d1zL0KfUY8LCL4OOujR3qLr2kqXY6OKhjQ9BVRge\r\nSXKcE8/GPyrwER/DhNqhUPSelEgND7moKEJIHdqaj2UjxLSDLo4nGz7UE/J4\r\ntJL+k8/LGigDN3WFYZCzpXxgliKNcdOIz7acFHCOj3yIS+TBW0Mk9lvgi8bh\r\nxr/pT9rlwNbxpqrasOfMXKDMM9A9cO9QwL6Sm30vivgHVmBDmaDd+d+7ggS0\r\nVYHkfCL5Q14Uq9V7AgI7A7rrhGLJviIqWFlAOjfexogXZMy7xe5/f8zkeAnY\r\n6OrYi0bpeBdjZTng8JpWdG+KiJ6EvPaUOYI9gzEGB913EKticZgnF+syUUiu\r\nfma5yKh5HdXyVieNUyCl3NSmdYPsSBmCe/jszlXeoJ+R50KTbu7uaH2M5Kbh\r\na65PikKaT4iVEERew7z5So+0QOq0VbNwONw=\r\n=pxcU\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/clerk.svg\" height=\"50\">\n  </a>\n  <br />\n</p>\n\n# Clerk Backend Core SDK\n\n_Clerk Backend API core resources and authentication utilities for JavaScript environments._\n\n```diff\n! This package provides low-level utilities and is mostly used as the base for other Clerk SDKs.\n```\n\n## Usage\n\n```sh\nnpm install @clerk/backend-core\n# or\nyarn add @clerk/backend-core\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\nwithout being platform/environment specific.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendAPI](./src/api/ClerkBackendAPI.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendAPI` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\n\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendAPI](./src/api/ClerkBackendAPI.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://docs.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendAPI.ts#17) implementation.\n","gitHead":"7932af82daa434d5f1dfa60b7ae15aa410a204ee","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.14.2+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.14.2","dependencies":{"tslib":"^2.3.1","@clerk/types":"^2.4.0-staging.1","query-string":"^7.0.1","camelcase-keys":"^7.0.1","snakecase-keys":"^5.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"got":"^11.0.0","jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","node-fetch":"^2.6.0","typescript":"^4.6.2","@types/jest":"^27.4.0","@types/node":"^16.11.12","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.3.2"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_1.2.1-staging.1_1649179874750_0.9853801111031142","host":"s3://npm-registry-packages"}},"1.2.1-staging.2":{"name":"@clerk/backend-core","version":"1.2.1-staging.2","license":"MIT","_id":"@clerk/backend-core@1.2.1-staging.2","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"a0d59548b20af79ee03eed5704d800972d957d07","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-1.2.1-staging.2.tgz","fileCount":502,"integrity":"sha512-yLH+4MwnAY1dg+qNeoKSveoXwn6VrBy2gVW5/+bbkJT5dkQXIkUt1+6wmyRuoSwHMePg1bAYHF4+uiZBYHCl1w==","signatures":[{"sig":"MEUCIQCfDkdYBBM1nO/VyYCsWv716A5LChurnXhko7yOC9nDEAIgGLv0+JE3oR/6ominl2IHuPKS6y0IJMzzdCZJ4kOysnc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":643118,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiTKw/ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqZlg/+K6zvtAy41X4wM4PQlwuUMC1xXxD9xfMrZWAG9UJvqNYR9c3M\r\nDTM8Bvc+YzUEp4JG2kREDExiYXqAqCiwKW7z2eIVeYsOVjfl7sJNqeVQGg4E\r\nBCYAueHWoH+KiqToyhewD5Bxe6X2hGPluvo5j4O0Z4t8TALGlsKISDwbeTtB\r\nPsWcMc/tf5tL5t77JWR9pyHKNONsBkA1qZrLTa5v3UavP/uNTvA7sR3ScyZk\r\nLJnGipwrXIKD9MPhoVu4jaFV62lDp/te1dQK12OiYzVhCKPq2YjLxfbYjOL1\r\ncRRIJg8+AkD47Eo1n7M0q2GPF5IytvZ7AjwztTAOOVKrfjfVb7pKh4JvdjgZ\r\n5jzjSISN15IloBGpvJbjhN8UMwyZ3I4lhJD0sltGAF+9dgERoB+rbcjcTACX\r\nBOQf9wb7sCCp8rEJRDHUvCfHvMgnBGSZmgcwqHlUnKcd099Thm8rXtpTK5YX\r\ntxIxcy4LBVZr6dq9M53cZOv+B/GAMsIHULyleRWr1qPhGeC6rks5+7y+ibXe\r\nP4inLjCKfYC3vXPFHVi1GADB/qO/tw6HAjIGFuVdxpwSF8pqqbj681ieRT/6\r\n6nC/aZcje/3C813STMt92i6xGptPPMUZNs4Z9ghNmWUFo5wzNemplRnTGgLm\r\nmBtyb3f/fT83/wBdQyrLDvK/9tP75fXYd8A=\r\n=4I08\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/clerk.svg\" height=\"50\">\n  </a>\n  <br />\n</p>\n\n# Clerk Backend Core SDK\n\n_Clerk Backend API core resources and authentication utilities for JavaScript environments._\n\n```diff\n! This package provides low-level utilities and is mostly used as the base for other Clerk SDKs.\n```\n\n## Usage\n\n```sh\nnpm install @clerk/backend-core\n# or\nyarn add @clerk/backend-core\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\nwithout being platform/environment specific.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendAPI](./src/api/ClerkBackendAPI.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendAPI` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\n\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendAPI](./src/api/ClerkBackendAPI.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://docs.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendAPI.ts#17) implementation.\n","gitHead":"d45d408720656dd3e8f1766e4834778b582cd2fa","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.14.2+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.14.2","dependencies":{"tslib":"^2.3.1","@clerk/types":"^2.4.0-staging.2","query-string":"^7.0.1","camelcase-keys":"^7.0.1","snakecase-keys":"^5.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"got":"^11.0.0","jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","node-fetch":"^2.6.0","typescript":"^4.6.2","@types/jest":"^27.4.0","@types/node":"^16.11.12","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.3.2"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_1.2.1-staging.2_1649191998939_0.4484223631108335","host":"s3://npm-registry-packages"}},"1.2.1":{"name":"@clerk/backend-core","version":"1.2.1","license":"MIT","_id":"@clerk/backend-core@1.2.1","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"f1d2a9da694e5c9207d056cc6634cdbb526658d4","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-1.2.1.tgz","fileCount":502,"integrity":"sha512-YeDUJwVjVl/NELPZtxGqgrS9gZmva2kc1BHysmz3xiAAtw30SxWH3mFPitUlpN//cYExxuJrEGIKrDRlgp/Jyw==","signatures":[{"sig":"MEUCIQD+YUUaBiejLTr2a0uDnjsry6AsFR8V0plSj7jQjf2izwIgAkVkQvrfBlRo5qzpYozYwnMZcpp9hwjEm9M0gYoZ/0k=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":643287,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiTqVAACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqqpA/+KjABnShUonu1x1k2FqRbl+9p1zHMhV5e+PXyEHUVAmpbirV6\r\nBklGcllBSwa28twex9FEGOd2yVLTq/0+fBSlnn+Q3Awbt2W8udGbw4cTn9lE\r\np/0TNKn1UP66bJj4H7ICUWsdw7ekGpGmpEa+2K5LpaN6ZWS0AAMOo+BvTRBT\r\nqee2XE6hupwHV9ggdx3vndq6vE9wUFsRSBh2/vGGSJ2KjCVbYHqUeL3zZwyf\r\n28WcdCHKvusCTFrpPqPEdQwyRycbyUoKliYCZoluzlCgOPsfqdIzPIYi2sGt\r\nTIW4oUtV76HYas079/R1OqvjPd64FfqIVODlvAim/plRoxG+NIPTpgc5+yxp\r\nueoiSbq/8ofRo88Ib9IsxDobZ+z8xMNwLgssHxHYVvTyVaqjDvqoQvH8itWY\r\nY55mxV0DfYpSbUoOZkEUEa0ayuWl2EZTquyqaR2Ai30v5y3Yaj1AEnDTAJjk\r\nTcLA4ieOW0Ps4qyRvlCQKjn4vzcDNdvnCdqbhK0GoavwynsVIsQGeF0ufp88\r\n01rfLzVotY6Ez5rdKLBUHkls/KXgMDn5nEWiRmr0jpXgo4VNmV4NZjNbIY5u\r\nYzWz7v53cxf5MIEO4kO5q+sIoeeHzwrOavdKK/LN3UMXvA04lcNE+w0Dgoda\r\n9drAHX3Guc8acCluC7um/O0XVQyWx92etXI=\r\n=CscU\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","gitHead":"ca9e5f16f520ba2cb2499c6e544f1f91573413ed","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.14.2+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.14.2","dependencies":{"tslib":"^2.3.1","@clerk/types":"^2.4.0","query-string":"^7.0.1","camelcase-keys":"^7.0.1","snakecase-keys":"^5.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"got":"^11.0.0","jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","node-fetch":"^2.6.0","typescript":"^4.6.2","@types/jest":"^27.4.0","@types/node":"^16.11.12","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.3.2"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_1.2.1_1649321279799_0.3237679182033497","host":"s3://npm-registry-packages"}},"1.3.0-staging.0":{"name":"@clerk/backend-core","version":"1.3.0-staging.0","license":"MIT","_id":"@clerk/backend-core@1.3.0-staging.0","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"3cf321f5c02e622fef30538d438f74ea3523fe01","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-1.3.0-staging.0.tgz","fileCount":505,"integrity":"sha512-eJsJW9QnVSWse7lwASq2LbO/Jx1kONho4iVyfUd/ermmfoJmehbH8Cp8iyt9KE2+FaHROqisYflgjlGGEv5t7w==","signatures":[{"sig":"MEUCIQD1ve2hOeF5yUB+A9LIBHVgjt1ACZgzei4FeGvcfIQqnQIgfTjVFSEU8aq9Eh5326eR24dAmRPsgB1CLOB3Qsebf88=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":657469,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiVpjPACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq2Kw/9HvURAVJdLaa6dQLegmtA1aLeW04XbIAcGgdooiekv2Lg18Az\r\na2b4yk4qfriuZ2Mx2NIBJguAQW/0M8x5wSpVJp0VqF0x6Ce8oslxC253OPKO\r\nLkayKrrEANBoioOTvMJdT0dBXqjo1PO9J1cEy3BPIJa7x3PlI3bZlUHFuQoX\r\n5nKKyIUDXz22clt7SSQEfbKDqJX3RQjoxsmK8cZ2I6tpTxYWCj0SXQUzvw8S\r\n0ZExzGX7os1grxC/ri/VoHdmWCZ6IChBMwQeaUka51jTtkLKK6MEFSD8bBe7\r\ngFR30fw9yUMgHvHT0kKwJgH4w+7wLeL5SmOQ4RUihVh50SBMCK87Rrg3gc1e\r\ntj+lsNOT//ejuU41JXY0WryEKMu2jmSzZ6yEY1Nodu4AFwtyD/g7+AKhpHBR\r\nbuiO53ROcvzqwwtpF04EtcDSOUOkC8v6oWhSYZFqDDApbjRaGywZT8mFXwGy\r\nfbwA+39n7qdxc9fMeLO9Wb2NbjtcOqgQeRTA1owgg8WAVzBTaDWYInv6Oofb\r\npaz6fyutX+d1OoxO0Ups/aUtcMYu7WRaoO38wz2tPQjs1uFkMqoC9rXI3y5Q\r\nFIyTG9WD7sqfjsIeRg2xxpK824py9FU/YVvA20OMOT/JcDYRskQzxTQo2Xwp\r\nqby6qF9siIU8oxkahnGTobLdIPJhLc5Zv4o=\r\n=GzaJ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev?utm_source=github&utm_medium=clerk_backend_core\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <img src=\"https://images.clerk.dev/static/clerk.svg\" alt=\"Clerk logo\" height=\"50\">\n  </a>\n  <br />\n</p>\n\n# @clerk/backend-code\n\n<div align=\"center\">\n\n[![Chat on Discord](https://img.shields.io/discord/856971667393609759.svg?logo=discord)](https://discord.com/invite/b5rXHjAg7A)\n[![Clerk documentation](https://img.shields.io/badge/documentation-clerk-green.svg)](https://clerk.dev/docs?utm_source=github&utm_medium=clerk_backend_core)\n[![Follow on Twitter](https://img.shields.io/twitter/follow/ClerkDev?style=social)](https://twitter.com/intent/follow?screen_name=ClerkDev)\n\n[Changelog](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/CHANGELOG.md)\n·\n[Report a Bug](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=bug&template=bug_report.md&title=Bug%3A+)\n·\n[Request a Feature](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=Feature%3A+)\n·\n[Ask a Question](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n\n</div>\n\n---\n\n## Overview\n\nThis package provides Clerk Backend API core resources and low-level authentication utilities for JavaScript environments. It is mostly used as the base for other Clerk SDKs.\n\n## Getting Started\n\n### Installation\n\n```sh\nnpm install @clerk/backend-core\n```\n\n### Build\n\nTo build the package locally with the TypeScript compiler, run:\n\n```sh\nnpm run build\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities, without being platform/environment, specific such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendAPI](./src/api/ClerkBackendAPI.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendAPI` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n## Usage\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendAPI](./src/api/ClerkBackendAPI.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://reference.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendAPI.ts#17) implementation.\n\n## Support\n\nYou can get in touch with us in any of the following ways:\n\n- Join our official community [Discord server](https://discord.com/invite/b5rXHjAg7A)\n- Open a [GitHub support issue](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n- Contact options listed on [our Support page](https://clerk.dev/support?utm_source=github&utm_medium=clerk_backend_core)\n\n## Contributing\n\nWe're open to all community contributions! If you'd like to contribute in any way, please read [our contribution guidelines](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/CONTRIBUTING.md).\n\n## Security\n\n`@clerk/backend-core` follows good practices of security, but 100% security cannot be assured.\n\n`@clerk/backend-core` is provided **\"as is\"** without any **warranty**. Use at your own risk.\n\n_For more information and to report security issues, please refer to our [security documentation](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/SECURITY.md)._\n\n## License\n\nThis project is licensed under the **MIT license**.\n\nSee [LICENSE](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/LICENSE) for more information.\n","gitHead":"41c2cdbd3561d0a1f1e73d001b764aa4accf6fda","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.14.2+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.14.2","dependencies":{"tslib":"^2.3.1","@clerk/types":"^2.5.0-staging.0","query-string":"^7.0.1","camelcase-keys":"^7.0.1","snakecase-keys":"^5.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"got":"^11.0.0","jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","node-fetch":"^2.6.0","typescript":"^4.6.2","@types/jest":"^27.4.0","@types/node":"^16.11.12","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.3.2"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_1.3.0-staging.0_1649842383088_0.1283463307672117","host":"s3://npm-registry-packages"}},"1.3.0":{"name":"@clerk/backend-core","version":"1.3.0","license":"MIT","_id":"@clerk/backend-core@1.3.0","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"8b6adf5a3751c106a54ee30b5842ce5d38a93f1e","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-1.3.0.tgz","fileCount":505,"integrity":"sha512-RTzF//5geKRAWLbtKG0HXc/xPe5dhQSXIqGm3Q61+ydbDIZtbb2EHsZU2NOau22pyw+L86vvlw/UMCadI+38iQ==","signatures":[{"sig":"MEYCIQC+fZiWMAIMzWnQ5qmCiGOOzQT1Er5+AwqQlobrRmK7BwIhALDNDk/9wpBhfuaAe8v6b7SA2n+kTGxZ2xKbA461HL32","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":658631,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiVp0FACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqVDA//flHdRpOOhXBj9szw0wD8MY3pV0iOaf+M9N5kWKLRNBKiL428\r\nYVBdsq8paERw/dUw8YaDv8GbU9rMW2aS94CN+bAPgFaUnNe741YdP6lfBzZ7\r\nj9avEN+2kKY8scL12x8UECmBkNULcG67NlZ9Ej/OesOK3LxIpvCOVnfEmoHc\r\nzUFOhZv4aPk1Yww5jiIOcIx9xYExLt/GP/Z6E/tmaRlcIHbOYBjrRaBLSNw4\r\n5cBaxN50mdzhY6zQBglrVt+ou3eyCAwXEpiNl7mZI36mlHToCN8dw7cwD8pd\r\n/ysMXki4hbg8uPQx2XU9vDCqKm3v2cBZAVtvVsbeTfAxwT+JlNlQwRF9m4Sf\r\nNYQ1XdwHdadADcD9cdLugiqlrNZ3Eq4DORb2kiwkTNR0KF9v09jrtnvEbq8L\r\nwtXhJIBdgGq6KqOPVXXhkBZgUqd7Q5HjDP3VrhngxzCpAcOmCvZiyXAz1P0Y\r\nfbB6mjjOnUuwclOarO3QM8IXGZSGORABmhY8jvAcyA7lS/LQQrEUjTETL9US\r\nFLrqONe6Q3DM4hzi04CarEsAULhrozN6LrbUnPgfyT3Bo+xE1v57TNsJSlBp\r\n6MovL4uBf/d7CwiD/6Ia61i5RwhhW5OiQoWosdl4HE/LaL6E4xXbCmRLOSuz\r\nRmiX+sR7HWeQ1MpmblGK03O8jf4akkR9H+Y=\r\n=YgBU\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","gitHead":"8cbc6e1d782850bbec259fe43cc64f0099693842","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.14.2+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.14.2","dependencies":{"tslib":"^2.3.1","@clerk/types":"^2.5.0","query-string":"^7.0.1","camelcase-keys":"^7.0.1","snakecase-keys":"^5.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"got":"^11.0.0","jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","node-fetch":"^2.6.0","typescript":"^4.6.2","@types/jest":"^27.4.0","@types/node":"^16.11.12","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.3.2"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_1.3.0_1649843461235_0.5317473609519083","host":"s3://npm-registry-packages"}},"1.3.1-staging.0":{"name":"@clerk/backend-core","version":"1.3.1-staging.0","license":"MIT","_id":"@clerk/backend-core@1.3.1-staging.0","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"17102af7019569130e915d745e08c020eef21ede","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-1.3.1-staging.0.tgz","fileCount":505,"integrity":"sha512-IATXZLBe25ML5+naQQ7X3xMU2B1xQc6rcT7hh9AzuSR9RmATlR0cfRPe51s53+Lb+XRprPGum2mN7qYR3EbF7A==","signatures":[{"sig":"MEUCIQDq5wYZXYT6v8Np2dkkD8SUbP5PAxjoEKKgwuKGPiudxAIgQ2+pOt8URBHITKhqP/bemeSOxrMuZhcSVl023KbO5Eo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":658159,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiWS/zACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmpjkg//WTM6U/RFPCOXOdDtmujdcK83TVHzmcQN8Ct+We+BFs2GMBNp\r\n4ZiFEYi3fl3EXeFBbZ5vZ6opE1y1ufry5jXTYHtylOccgJdcsPyL7CV6z21h\r\nFzgPAVd1NRh2QUNa/He/Qpf+Z/rQ+UubmjlC4y6dJIu3PtdoyqhyqspMZ7BD\r\nWJU/7fjR0thEsmZCaz3l5/WQUuWLrjLtu0LM4iU9VhFQlZPnanNr/l2jNiAp\r\nIwIDeYVigxA26nBAPk8S2h6qVkoj6qQiPUvImAuF5DDH6KSPKqthVPQIdk/L\r\niIfMLED7mAHZQgl6Qzv87/aqK2qpMIu+ck3VB8i1T18DIwClrjS8LykS2pZi\r\nlr7Z85icZ9UWa5gClk9pkOchW3h/sb5a/t9iPcfOlGHP4DKmp1uspM99smJB\r\nqlghKliZEgOWQ9lSDkAC8C1UIWuUfmByq427VgNXRWJeqEw8gFEsOJXyBNMW\r\nzXvhDNCRxCZ8RZgBhtyZzHenX29795gyBhjSvqiSvFhGfKWywn/1a9B34LMH\r\nV7BtP6DreWsX1ctdVy2+6NH1X0Fh4ZX8ZdmWolOxZoL8ZIS725p0XYLovO5Y\r\nc5uD066qisnskQ1/2V7/ASoJ2bzNKiJwhz9RnBBn+fI20YtuWm16MDtb5Zyf\r\nA3jS7+0TzPOzdcQfr26U7bIkW44V5/Kbstc=\r\n=SDya\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev?utm_source=github&utm_medium=clerk_backend_core\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <img src=\"https://images.clerk.dev/static/clerk.svg\" alt=\"Clerk logo\" height=\"50\">\n  </a>\n  <br />\n</p>\n\n# @clerk/backend-code\n\n<div align=\"center\">\n\n[![Chat on Discord](https://img.shields.io/discord/856971667393609759.svg?logo=discord)](https://discord.com/invite/b5rXHjAg7A)\n[![Clerk documentation](https://img.shields.io/badge/documentation-clerk-green.svg)](https://clerk.dev/docs?utm_source=github&utm_medium=clerk_backend_core)\n[![Follow on Twitter](https://img.shields.io/twitter/follow/ClerkDev?style=social)](https://twitter.com/intent/follow?screen_name=ClerkDev)\n\n[Changelog](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/CHANGELOG.md)\n·\n[Report a Bug](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=bug&template=bug_report.md&title=Bug%3A+)\n·\n[Request a Feature](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=Feature%3A+)\n·\n[Ask a Question](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n\n</div>\n\n---\n\n## Overview\n\nThis package provides Clerk Backend API core resources and low-level authentication utilities for JavaScript environments. It is mostly used as the base for other Clerk SDKs.\n\n## Getting Started\n\n### Installation\n\n```sh\nnpm install @clerk/backend-core\n```\n\n### Build\n\nTo build the package locally with the TypeScript compiler, run:\n\n```sh\nnpm run build\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities, without being platform/environment, specific such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendAPI](./src/api/ClerkBackendAPI.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendAPI` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n## Usage\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendAPI](./src/api/ClerkBackendAPI.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://reference.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendAPI.ts#17) implementation.\n\n## Support\n\nYou can get in touch with us in any of the following ways:\n\n- Join our official community [Discord server](https://discord.com/invite/b5rXHjAg7A)\n- Open a [GitHub support issue](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n- Contact options listed on [our Support page](https://clerk.dev/support?utm_source=github&utm_medium=clerk_backend_core)\n\n## Contributing\n\nWe're open to all community contributions! If you'd like to contribute in any way, please read [our contribution guidelines](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/CONTRIBUTING.md).\n\n## Security\n\n`@clerk/backend-core` follows good practices of security, but 100% security cannot be assured.\n\n`@clerk/backend-core` is provided **\"as is\"** without any **warranty**. Use at your own risk.\n\n_For more information and to report security issues, please refer to our [security documentation](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/SECURITY.md)._\n\n## License\n\nThis project is licensed under the **MIT license**.\n\nSee [LICENSE](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/LICENSE) for more information.\n","gitHead":"e236edb35a0af7c0e34ccde2660eb8fc350e67a1","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"sokratis","email":"sokratis.vidros@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.13.0+x64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.13.0","dependencies":{"tslib":"^2.3.1","@clerk/types":"^2.6.0-staging.0","query-string":"^7.0.1","camelcase-keys":"^7.0.1","snakecase-keys":"^5.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"got":"^11.0.0","jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","node-fetch":"^2.6.0","typescript":"^4.6.2","@types/jest":"^27.4.0","@types/node":"^16.11.12","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.3.2"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_1.3.1-staging.0_1650012147394_0.15782151915976939","host":"s3://npm-registry-packages"}},"1.3.1":{"name":"@clerk/backend-core","version":"1.3.1","license":"MIT","_id":"@clerk/backend-core@1.3.1","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"ca423b89008d2b8e424df1dee19a2161b15862e9","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-1.3.1.tgz","fileCount":505,"integrity":"sha512-AM37dDnGfj+AteZM5UrD1sDz/HLml0pzAnw+il4zQ09DZ+HLa5/T42sVUKP2P6M2XP1PVfRt5AlIqsvZYCf/pQ==","signatures":[{"sig":"MEYCIQCbhosrHg1xfmWTgLPwavmXSHGwizq0ySGQTM95EWw8hgIhAJ87M0yjZ5ASm70Gpyc8GxGPrCWWUYzvEe25nv/s/c7I","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":658830,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiWT0mACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmothw/+MSs6NEvty4OFjuGx3PV/+yzNSxDrm/odQ2Ori0tkWsawUJ/l\r\nD4LP2oIOn5rPFBvqfvWeOPJeXzmoVcRRjZmLAYY924MJrkQoxABpikS3703Q\r\nKxEogD/j25IWxY4lZ08vKV22NqDNdX9jEkfd7xvsclCNG0MT9W1KskcML6XU\r\nRiS1uPsbxIQnjhQlNXhNqiRXxEluhwj3wakVYLKb2s10foIYFdCoi1ldlwRD\r\nPnwLp6F6A71Aa3cEFRk00vi60pG9/ISymvhvFqzg9VMDU/6pjaYc5rpg6ThD\r\nO1Q2WsB14XKvBEWsZQLBGF6JI9aP9IFwCybYc4n1kOeDEdauxXMYlj7Ya2Is\r\nBsFmTAK8Ut/OyHB54Q9qRYnLbQFNOA0Sqq8JmDtHV4r0iMCXvrqrDQbkF4Z5\r\nZB6hK6b5TSyNKDeYm/jLKIeibLWEIPbTe2MrmSyGWp3tn9W0fOBAjy+Ewyrg\r\npyR+O5oBMP+AM3r8lG6i4y7qRv8gpXIdPjLPQ4snad7byrVYR/pVo6/zVgYm\r\nlIi1br4L7hw05BZMl7ydLkhky9AvQ2SZBcbq+wP6UlrSOxZ/YWH9hx2Ek4LL\r\ni76MBrGsWlxdkROMI81V2rxH9xI+IHusbXmq6gtPL2SHj3t4l1ELpYGOWLRO\r\nDjuak2oIzGJDRfyyNcoCS7Z7Q/6ZzjRv7B8=\r\n=uJcp\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","gitHead":"676110da87d407ce2cdf0ba3f10fbdecc0b81041","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"sokratis","email":"sokratis.vidros@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.13.0+x64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.13.0","dependencies":{"tslib":"^2.3.1","@clerk/types":"^2.6.0","query-string":"^7.0.1","camelcase-keys":"^7.0.1","snakecase-keys":"^5.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"got":"^11.0.0","jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","node-fetch":"^2.6.0","typescript":"^4.6.2","@types/jest":"^27.4.0","@types/node":"^16.11.12","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.3.2"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_1.3.1_1650015525844_0.2727422075012218","host":"s3://npm-registry-packages"}},"1.4.0":{"name":"@clerk/backend-core","version":"1.4.0","license":"MIT","_id":"@clerk/backend-core@1.4.0","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"6cbd80d6d7e8d9ec24a768ed98ae95dac17ef7b1","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-1.4.0.tgz","fileCount":511,"integrity":"sha512-/aqwsvl6NT9Msg/DzVb3E1CqBsNt3nLXY8aIf2VKA7azkW5rVCyS4O+T6GP7d/yiAhZDWCaNhwCmpHuRqKw4og==","signatures":[{"sig":"MEUCIAtth8u5dNEHmYaRyh0ftQ7LqiRmVzHmXPkqugQEljGZAiEA84STWjXv8QSenWdCHKRSZ/uvoDcP1F9Wg6KI737S73k=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":674372,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiWZP5ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrP2A/+PPjfe4YHf/OOXw4F/ZgpHuOXJ0cjiiPSlXTyO57dxshF6vWb\r\nUk4Ok0JU7Y9oziRjmrzbWiV+8wEX75hyE9Q2neskHqf1QaE7k2c7BdON97Z3\r\nqNH/En0RTTzliyLWUhZuZyvegIVgFixVcvWviyKFLzZRjB9xF5MG1ieT3+Bo\r\nrylrUDg5G3jVVa+rLvEAvu2bd+WePhIcu3KACVsuAN1qsEO02KKv7ZLxPJRD\r\nsBkEnHDWGWM2T4RLMsqFuNe2TevT2Mix3uGhFZyYD5Qk+m73F9lUG0aAxWj6\r\nx5cV7f4qvVJtgYUT3894xMU8iYj4ngZ1/W4Yh27w4sYHXgJhj18siOmIt9JC\r\ny4/+0Y/QzUbjXMZHLiFlXmaXSVdaZBr6sVh7MjyGLQeA6RXdsIwB16gUZDvp\r\ngAWUo1IdeD048a+RXKSx0YICtpm0w0LBJ1hLVB+Z0UkWtoSRSNsRuyQCUgKF\r\nRyxNbgaYFYWIWi+K7WKnSQjriRtOzHl5308LdyaXsb9TKr/Y802HaN7UUGBR\r\nUN4lq/KrVD5iMRqhH3DEp4Xbpz08VQit7QI/bCsrmOcklF2hRJ17pPK8TSFM\r\nPjXlCkdtcm0pF9iYXdM78ITSDdmFS9dHTj9D/6tceKc9i28ElIee9F/wOcBv\r\n4w7rGHpd6NWSEE8eq+1Y16XeOXHuOSVkKa0=\r\n=bVic\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","gitHead":"56bef6f6281bad87a47d91c094a459323c6f6d75","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.14.2+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.14.2","dependencies":{"tslib":"^2.3.1","@clerk/types":"^2.6.0","query-string":"^7.0.1","camelcase-keys":"^7.0.1","snakecase-keys":"^5.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"got":"^11.0.0","jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","node-fetch":"^2.6.0","typescript":"^4.6.2","@types/jest":"^27.4.0","@types/node":"^16.11.12","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.3.2"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_1.4.0_1650037752988_0.36449305150901634","host":"s3://npm-registry-packages"}},"1.4.1-alpha.0":{"name":"@clerk/backend-core","version":"1.4.1-alpha.0","license":"MIT","_id":"@clerk/backend-core@1.4.1-alpha.0","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"0bc0837bdab7d196f4b7fadc701a3de92f6de6f8","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-1.4.1-alpha.0.tgz","fileCount":499,"integrity":"sha512-YN+KbhDMqTmxxZlnj4Glr/sh03wx6sOComZhhpPBHXnoFcC0m2m5aFmtc10z3ISWHN5IXEay3CMgcyq2KeiJeg==","signatures":[{"sig":"MEYCIQCfNISjdjb2n8yiaTy/rvOcg2ocH5razSNmWENzKzp2sAIhAL5UbaNCIwkoO+Efy4CPsTV5yLOk4utKjTuththuUnCw","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":660847,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiWflpACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqB6BAAmnlyaPQ0yuCkCh1Q6Z4CJ3uwTXK44dzlSuOmiN6Zztulav8P\r\nUUwU+CPR+OE3o5UOSyLSR/wdVRpIGZItfmbDQM9lJh+SkH7Aan+21wAa9y89\r\nnLCiL5pVdI2lQSgCqO9p88EQgK+Q4fAw0tx1wFmVdyrwrQubG0qJTPhyWg25\r\nmYWugA1PUe4qj89dUb7LJdGoPBkWAGbJXkRBAu007EzTz/9KI3P8rs76nyFu\r\nwBfmykU4n9GF3JvlGUeeB+iYgE/jjH/RZxVKfE3+TkGDLyVDxPvM/jie9R/8\r\n9PhTJRHOplf/AZ2UzVdRPQX2VV/1aL55CR5i/yX8y1Qjvwujc5UViFXpe9zE\r\nM3pIVtrKX0bxYrYF2SMscYC/TxwIkhkipMuUtxtg0kDFVRcqEekPpeRKaz5s\r\n9AAwgB3jhG4aolVSOzbVVGzAl8VewxsAQHjAMWQ7VRMKW11BiR/nkKXjyXnR\r\nRjZouK86Fp+jQzeSo/8qZsuuXQ39ur+UbyahDOu3Qjdo1BsUHRUN1rlrncCK\r\nV2pS1fWBYDT0qfhowZZiahM09e+qtii4WcGwVUzl/HOP7yjzX2QH6wQHv8iU\r\nJDthVbDsKE4nLT4xXzQV+yZlboWfEOgHF9eVPvNbVXCGXw7d+C25r68b5JYe\r\nloE+BuRAMdQHrbWn1FHQK+u66ycj3ZkM/Ew=\r\n=juTm\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev?utm_source=github&utm_medium=clerk_backend_core\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <img src=\"https://images.clerk.dev/static/clerk.svg\" alt=\"Clerk logo\" height=\"50\">\n  </a>\n  <br />\n</p>\n\n# @clerk/backend-code\n\n<div align=\"center\">\n\n[![Chat on Discord](https://img.shields.io/discord/856971667393609759.svg?logo=discord)](https://discord.com/invite/b5rXHjAg7A)\n[![Clerk documentation](https://img.shields.io/badge/documentation-clerk-green.svg)](https://clerk.dev/docs?utm_source=github&utm_medium=clerk_backend_core)\n[![Follow on Twitter](https://img.shields.io/twitter/follow/ClerkDev?style=social)](https://twitter.com/intent/follow?screen_name=ClerkDev)\n\n[Changelog](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/CHANGELOG.md)\n·\n[Report a Bug](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=bug&template=bug_report.md&title=Bug%3A+)\n·\n[Request a Feature](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=Feature%3A+)\n·\n[Ask a Question](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n\n</div>\n\n---\n\n## Overview\n\nThis package provides Clerk Backend API core resources and low-level authentication utilities for JavaScript environments. It is mostly used as the base for other Clerk SDKs.\n\n## Getting Started\n\n### Installation\n\n```sh\nnpm install @clerk/backend-core\n```\n\n### Build\n\nTo build the package locally with the TypeScript compiler, run:\n\n```sh\nnpm run build\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities, without being platform/environment, specific such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendAPI](./src/api/ClerkBackendAPI.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendAPI` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n## Usage\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendAPI](./src/api/ClerkBackendAPI.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://reference.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendAPI.ts#17) implementation.\n\n## Support\n\nYou can get in touch with us in any of the following ways:\n\n- Join our official community [Discord server](https://discord.com/invite/b5rXHjAg7A)\n- Open a [GitHub support issue](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n- Contact options listed on [our Support page](https://clerk.dev/support?utm_source=github&utm_medium=clerk_backend_core)\n\n## Contributing\n\nWe're open to all community contributions! If you'd like to contribute in any way, please read [our contribution guidelines](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/CONTRIBUTING.md).\n\n## Security\n\n`@clerk/backend-core` follows good practices of security, but 100% security cannot be assured.\n\n`@clerk/backend-core` is provided **\"as is\"** without any **warranty**. Use at your own risk.\n\n_For more information and to report security issues, please refer to our [security documentation](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/SECURITY.md)._\n\n## License\n\nThis project is licensed under the **MIT license**.\n\nSee [LICENSE](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/LICENSE) for more information.\n","gitHead":"6512f0329ca090aa79d87994504b9a069bfe48e1","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.14.2+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.14.2","dependencies":{"tslib":"^2.3.1","@clerk/types":"^2.6.1-alpha.0","query-string":"^7.0.1","camelcase-keys":"^7.0.1","snakecase-keys":"^5.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"got":"^11.0.0","jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","node-fetch":"^2.6.0","typescript":"^4.6.2","@types/jest":"^27.4.0","@types/node":"^16.11.12","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.3.2"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_1.4.1-alpha.0_1650063721447_0.8627253753972932","host":"s3://npm-registry-packages"}},"1.5.0":{"name":"@clerk/backend-core","version":"1.5.0","license":"MIT","_id":"@clerk/backend-core@1.5.0","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"6b7083742559bfed11e59a9f6cc722b2a414ec3e","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-1.5.0.tgz","fileCount":508,"integrity":"sha512-WL7+gRqe5qLocC5uk6IuNi8GdcNGoTZkK4TGrEHe/RIr7T201+PMkPGAAV75bjog3ruUTYbsoZRIvmI2hvAt4A==","signatures":[{"sig":"MEUCIQCb3bAh0AoNhn98nYuKjXrm3rYvFC+XQH0/LlszyBnlRQIgSxlcL5aRQkszjKh+K/9haFEPpkQUcG210dX2CyVscCs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":665940,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiXTcrACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqcsxAAghY9t56apnh/ftH8kxWZqbLZHAXH7bUfE28Cari2d+/cbA83\r\ndWQ9og4StcdeCQYHUV5oNa5ejUB+0pGOinHJSQBdYAMv5QM2Ix3+DzRlVQLL\r\ngGHLpCIALD59uxQox1MAsBdcNoeATUzJvKhwdl1+PPDxHGmzai5dsJanRHF+\r\n0Qai+7aqJB0NopV0sqG7J4gMLtSiAkCwYqQk9rLWy9LMzStxqIkKP23rxMQv\r\ndn185wYeGbTiyZhYvnUjNon0lwe6w+JsvJcsSRSqI+5fZm/nuRulpskbI3Ft\r\noyQIex3hriNahDY0pPS0nHgwvzA9SYbp82/cvQ/1K9jY9wnt498Vsc1dELyN\r\nVtuyhiffPRaVMg7mknXYoueyMbli+ZRMc0vd8v4QP1MNWMgJgJLak2JPYKF4\r\nyZQFlyc8ijgkqcb7DKcMdBLKtqXz/ktPT1GAnwTFQQxwzcv08OGSDmPf4YYX\r\nCG9j66yXXF8Out6ifpYu/xE/mlSo2N2r8mX7tyUqCoL+kdMggM93qZDRfN1e\r\nMVyQaZMbcRpC78BSOVrJiTglsBanEXdquapRS/HcXNxy/QGN7PGe47AvTRrc\r\nG+WWAy93Jhgta63XddOAVGNaWKLIHT9EyAWSL1Sjuk78DEOo/YFzNdwMdx32\r\nexpu/kRMjI7cxgqHQXYgNn42ZebPD8RDLMk=\r\n=eOzM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","gitHead":"e4a7ab993a7bf028e9ce1d406cd1de3ce0ab21e5","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"igneel64","email":"p.perlepes@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.13.2+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.13.2","dependencies":{"tslib":"^2.3.1","@clerk/types":"^2.7.0","query-string":"^7.0.1","camelcase-keys":"^7.0.1","snakecase-keys":"^5.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"got":"^11.0.0","jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","node-fetch":"^2.6.0","typescript":"^4.6.2","@types/jest":"^27.4.0","@types/node":"^16.11.12","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.3.2"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_1.5.0_1650276138743_0.6793568492480822","host":"s3://npm-registry-packages"}},"1.5.1-staging.0":{"name":"@clerk/backend-core","version":"1.5.1-staging.0","license":"MIT","_id":"@clerk/backend-core@1.5.1-staging.0","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"31c1f5ba0199c14c22ae31f7794ba7dfe071bf58","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-1.5.1-staging.0.tgz","fileCount":505,"integrity":"sha512-Tjkb0HHvTKEwYteM33dFfclyhv4Y9KmCKpGRKnDbnytUx5oIZus8ZCKzZ/C81SBH0DJ2vJ2XVdmbZWDi0OSn7A==","signatures":[{"sig":"MEUCIGMutpMPqOGj4NHyhf+5H+aX1XV/2lKYA9gwaqLMs0shAiEA8sxjuEZ53LUNP2RhDXAn5gALLWz+pV01CK648NtLNt0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":661623,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiXnBkACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpL/Q//XW8dduP0t/GJriHZnlH4lln3Ny+6lA2S18cwwJJGKOmBsiPP\r\nbqSuP6dWnaBN+CMfTpwWGMEo9xjibXa5/UmRYdc5s4Xru3+6Xp/wmbNcC0TU\r\nmWLz3mUuo5BTa3dtnYLX4GksNc5N+/py/YQeKkYA0s0MQ/N5QvlLeyhe8yYX\r\nDw2eU0PQm20pByPf4HoGsPWTTlqVBiR42hrEpjpCcChHlF1m3HQQvQAGD5qX\r\nAJgm3hjuewIgaaCgbwbibB/Vocaawsse/l4La7Xr4W6XYGXg0PHngavqSu6m\r\nSWubXYcy76LDJaBx3d4sNXf5joN8Br9rvJEoPJ7RH7xiu3EI/1R+2S4/klvO\r\neDhpFhI27+Q4idnK1hhcbhjyc7MqBwOBsc5TJizr4Eq8w6GIBMNRnY1OsPkp\r\nJTGSuvzexJAGOwMJw8pKPjSuH+cddlZfSJwkGMqsYuNlG7rWLDZCsu430Q73\r\npxHMFVVZBNFkUFft79mPe9gugX6z37efO5bVcDfsnJ7eYvjm42B3A/clE/oC\r\nusY3d4pnjufg1wNsJcJ6WdTNtfl3NHpfcLZha0Mx7KYZwi+KxXMVtw74bRhb\r\nModjgg+gzQDE1tNVtUcmbN5S9WBT04MYT8J7xuG0TWWAkSS3e/tKzkJ7LnPV\r\nCE+ZbbdW/lPzu0ovhoDDI2AO6EtMaHcW/Wk=\r\n=XM+q\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev?utm_source=github&utm_medium=clerk_backend_core\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <img src=\"https://images.clerk.dev/static/clerk.svg\" alt=\"Clerk logo\" height=\"50\">\n  </a>\n  <br />\n</p>\n\n# @clerk/backend-code\n\n<div align=\"center\">\n\n[![Chat on Discord](https://img.shields.io/discord/856971667393609759.svg?logo=discord)](https://discord.com/invite/b5rXHjAg7A)\n[![Clerk documentation](https://img.shields.io/badge/documentation-clerk-green.svg)](https://clerk.dev/docs?utm_source=github&utm_medium=clerk_backend_core)\n[![Follow on Twitter](https://img.shields.io/twitter/follow/ClerkDev?style=social)](https://twitter.com/intent/follow?screen_name=ClerkDev)\n\n[Changelog](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/CHANGELOG.md)\n·\n[Report a Bug](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=bug&template=bug_report.md&title=Bug%3A+)\n·\n[Request a Feature](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=Feature%3A+)\n·\n[Ask a Question](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n\n</div>\n\n---\n\n## Overview\n\nThis package provides Clerk Backend API core resources and low-level authentication utilities for JavaScript environments. It is mostly used as the base for other Clerk SDKs.\n\n## Getting Started\n\n### Installation\n\n```sh\nnpm install @clerk/backend-core\n```\n\n### Build\n\nTo build the package locally with the TypeScript compiler, run:\n\n```sh\nnpm run build\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities, without being platform/environment, specific such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendAPI](./src/api/ClerkBackendAPI.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendAPI` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n## Usage\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendAPI](./src/api/ClerkBackendAPI.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://reference.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendAPI.ts#17) implementation.\n\n## Support\n\nYou can get in touch with us in any of the following ways:\n\n- Join our official community [Discord server](https://discord.com/invite/b5rXHjAg7A)\n- Open a [GitHub support issue](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n- Contact options listed on [our Support page](https://clerk.dev/support?utm_source=github&utm_medium=clerk_backend_core)\n\n## Contributing\n\nWe're open to all community contributions! If you'd like to contribute in any way, please read [our contribution guidelines](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/CONTRIBUTING.md).\n\n## Security\n\n`@clerk/backend-core` follows good practices of security, but 100% security cannot be assured.\n\n`@clerk/backend-core` is provided **\"as is\"** without any **warranty**. Use at your own risk.\n\n_For more information and to report security issues, please refer to our [security documentation](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/SECURITY.md)._\n\n## License\n\nThis project is licensed under the **MIT license**.\n\nSee [LICENSE](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/LICENSE) for more information.\n","gitHead":"af096e0c55f15bab78d8463773ff690de3ab4cf1","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"sokratis","email":"sokratis.vidros@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.13.0+x64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.13.0","dependencies":{"tslib":"^2.3.1","@clerk/types":"^2.7.1-staging.0","query-string":"^7.0.1","camelcase-keys":"^7.0.1","snakecase-keys":"^5.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"got":"^11.0.0","jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","node-fetch":"^2.6.0","typescript":"^4.6.2","@types/jest":"^27.4.0","@types/node":"^16.11.12","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.3.2"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_1.5.1-staging.0_1650356323716_0.1597398558485088","host":"s3://npm-registry-packages"}},"1.5.1-staging.1":{"name":"@clerk/backend-core","version":"1.5.1-staging.1","license":"MIT","_id":"@clerk/backend-core@1.5.1-staging.1","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"bd34ce4999bf1552a48474a1fee8c54eba4194bb","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-1.5.1-staging.1.tgz","fileCount":505,"integrity":"sha512-3EG6o26z9zi1JcJXA1x9HIODQnSIE/4l9qX42aGA8El4e32WQdlh51egEpjiqlSTzcFLF1MdPF2vp0xuimwS9g==","signatures":[{"sig":"MEYCIQDRIGMyw4DdAuDLE/5YMXJy+1vG2Wy8NNfBVmmSNFwvsQIhANb/lsxsCuELXKX+T2g3Q6aXPYj9vgjfKHeSZuGGy8Po","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":661842,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiXnVAACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmruoA/5AJM4JjM+PCcoxEoGY8iEsgMPAP6lsgcCnGUynYAcZJXnxoMD\r\nB8PqYC/Mf34QopOmzORJqOGlg8rgfhOReRDSJvIbbcTqAEYc4Hc7fMwwVuVf\r\nulvr1gZYIXgGkoeaDNNX3+/YQt3TYSOwOjgixviMbYfKCOXsqnb3whatRx4O\r\nzgYgQMMgC9INZJEQLfIfw5dOEfNqEgA32Q+IpoWgHMBCjgg6M4Q1GM5LJ7xo\r\n34FH14AmtymeH/YOg1e1ivyTtYt9feyGf4pHeMGOBOoSVIDDdRhtFZBth9/j\r\nhqSkpGrWt6JHEPtfjXSBCBrrspCu2HVie7SQ1WEQRUYy5KmWMuhfKjV9FzGe\r\nwtiQN/6n7m8evwT1Om+9EaMFIkNTWbLW5KTQpCidS9MIun2nrb/d6B3mNyQF\r\nhIlycFGf8a7kbTW0qbtYz/YwnZXgq3sc7Lda96jQkS2DxSU44CI8PxgUlB+C\r\nTEmucngYiPjTpm9ur9a0VSKQx2Dj/pfZXAZSWs+dEcrUdcvk5PAcmJNweAZN\r\nYnXfiXW8ONavDJWRKjMuJ0bpphDRJs0Kx6NCQwlW/HkCo4Y+HFaGn68KMY/l\r\nxd8tQtovwK4+7xUyGwnyfTfElMe1ssIwTF9LTb3jrjQYyLtoDNGbInV2oqlr\r\nivz7d7K3/hf2o5kL+MH+nAvlE/YlnOFxwHk=\r\n=EuhC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev?utm_source=github&utm_medium=clerk_backend_core\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <img src=\"https://images.clerk.dev/static/clerk.svg\" alt=\"Clerk logo\" height=\"50\">\n  </a>\n  <br />\n</p>\n\n# @clerk/backend-code\n\n<div align=\"center\">\n\n[![Chat on Discord](https://img.shields.io/discord/856971667393609759.svg?logo=discord)](https://discord.com/invite/b5rXHjAg7A)\n[![Clerk documentation](https://img.shields.io/badge/documentation-clerk-green.svg)](https://clerk.dev/docs?utm_source=github&utm_medium=clerk_backend_core)\n[![Follow on Twitter](https://img.shields.io/twitter/follow/ClerkDev?style=social)](https://twitter.com/intent/follow?screen_name=ClerkDev)\n\n[Changelog](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/CHANGELOG.md)\n·\n[Report a Bug](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=bug&template=bug_report.md&title=Bug%3A+)\n·\n[Request a Feature](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=Feature%3A+)\n·\n[Ask a Question](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n\n</div>\n\n---\n\n## Overview\n\nThis package provides Clerk Backend API core resources and low-level authentication utilities for JavaScript environments. It is mostly used as the base for other Clerk SDKs.\n\n## Getting Started\n\n### Installation\n\n```sh\nnpm install @clerk/backend-core\n```\n\n### Build\n\nTo build the package locally with the TypeScript compiler, run:\n\n```sh\nnpm run build\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities, without being platform/environment, specific such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendAPI](./src/api/ClerkBackendAPI.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendAPI` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n## Usage\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendAPI](./src/api/ClerkBackendAPI.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://reference.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendAPI.ts#17) implementation.\n\n## Support\n\nYou can get in touch with us in any of the following ways:\n\n- Join our official community [Discord server](https://discord.com/invite/b5rXHjAg7A)\n- Open a [GitHub support issue](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n- Contact options listed on [our Support page](https://clerk.dev/support?utm_source=github&utm_medium=clerk_backend_core)\n\n## Contributing\n\nWe're open to all community contributions! If you'd like to contribute in any way, please read [our contribution guidelines](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/CONTRIBUTING.md).\n\n## Security\n\n`@clerk/backend-core` follows good practices of security, but 100% security cannot be assured.\n\n`@clerk/backend-core` is provided **\"as is\"** without any **warranty**. Use at your own risk.\n\n_For more information and to report security issues, please refer to our [security documentation](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/SECURITY.md)._\n\n## License\n\nThis project is licensed under the **MIT license**.\n\nSee [LICENSE](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/LICENSE) for more information.\n","gitHead":"62f5c7c55f1a2930010f8e84b5a3474f56be7494","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"sokratis","email":"sokratis.vidros@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.13.0+x64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.13.0","dependencies":{"tslib":"^2.3.1","@clerk/types":"^2.7.1-staging.1","query-string":"^7.0.1","camelcase-keys":"^7.0.1","snakecase-keys":"^5.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"got":"^11.0.0","jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","node-fetch":"^2.6.0","typescript":"^4.6.2","@types/jest":"^27.4.0","@types/node":"^16.11.12","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.3.2"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_1.5.1-staging.1_1650357568144_0.42832032193710967","host":"s3://npm-registry-packages"}},"1.5.1":{"name":"@clerk/backend-core","version":"1.5.1","license":"MIT","_id":"@clerk/backend-core@1.5.1","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"e8471d3215d7bc2e7de1b3fc1a5147a037e088ef","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-1.5.1.tgz","fileCount":505,"integrity":"sha512-T39+p5UqtXRdWfbL4Br7JGmxnYJz1hGQ39py/Jd9ZXYjophVYnZeMPwDx2zR0IYfBZdFsJa4bBiSY/FCoSiSdg==","signatures":[{"sig":"MEUCIAkukk3AcU4w+WtbHk0eVmWtLYi/y0kGJB1O0nV1HWz4AiEA5n8S8zsGhVc1/C8NiMKIviqfLjbdWwopCvKtyCe20k8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":665821,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiXpISACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpfCA/+LJCKP3XIN3RhHndYuHM7r0U5vchLl9mOc6EOQzTSAvNu62u2\r\n6gB/plU/tierjoRTvvvr21eLPkY4EFyHwPlSkqJOYNYq44IF2SfOqO/cJXSZ\r\nxClWzN/vkJBIk7PCuNaYDn9UHPM/lodGLJhONlOZmeQsjQifYU5pwFYTl1/Z\r\nBvmNGgiCLLU4gPAKH7j6JvpQVuDfpSWWFmmKMHDUWhDDVnCZQTfI+YSwp9fs\r\n5CmINGe2wFx73zJiI9G+NPwnyxC6WZn5j2/3ZkZhBSigwLAcDuELz8xhtX4B\r\nKxKNv/k8wvOQltnUkKvwlCsq3XwY5lTUQrLPf0IpIha7B/Yx5ZkPiYxU/sgZ\r\nAwrbjoUly1S2pwfL8rVc4OL+TOkKhsnEEcNfb5z3CuEKjAPiwGtuP0plTDV8\r\ngJqAB0gZSltuROLGsXWfSG4SXUKAyZwcSCSz4qlfeebWxIGXnuNqGA7oT4Cr\r\nhs7fnieJb6isfudAjv4uJAju3/A+T7VQUcSPEnu9TLFJpcmzuq69iy+zny0l\r\nux+43CcboZEOfVFD1GOT/Qk4MZwGXB+MAald2uDXme4+6MFhHt4SoT7luLFW\r\nylRn9M526/s7rPIPRRACLVBzvEpPRhWFbqxXI0DHZ7R9zhDwLECnK8rCI2lf\r\nVwORfeTK425ciQ9WTbhswjyO8iqV7yyxL1M=\r\n=prPu\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","gitHead":"34d35ec6e1ca6572e2dd7a49a57444dbc24c0fe9","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"sokratis","email":"sokratis.vidros@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.13.0+x64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.13.0","dependencies":{"tslib":"^2.3.1","@clerk/types":"^2.7.1","query-string":"^7.0.1","camelcase-keys":"^7.0.1","snakecase-keys":"^5.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"got":"^11.0.0","jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","node-fetch":"^2.6.0","typescript":"^4.6.2","@types/jest":"^27.4.0","@types/node":"^16.11.12","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.3.2"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_1.5.1_1650364946045_0.5066098633223659","host":"s3://npm-registry-packages"}},"1.5.2":{"name":"@clerk/backend-core","version":"1.5.2","license":"MIT","_id":"@clerk/backend-core@1.5.2","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"42c90f012497d8d85eeb812bd525dacb6aca1383","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-1.5.2.tgz","fileCount":508,"integrity":"sha512-LkwgD9UeZ5ul2H64lUpRJ9KOVgY05M3RE+dO6Whc9zscOZj0VXWXJMoBqLTAi9voCWx0cVQpljsPIASn1h1m+A==","signatures":[{"sig":"MEUCIQDBMOZdoH6bdWr/xyVxNaT8MBXlVpqCMeSsdDAZEHpZfAIgcCrFnBCbFKbnDvn5HHgoGeP6ls0hEpsjW4cVH2Ot/b0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":666620,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiYmq+ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrH/w/9GEaxDmbKwsDzq1LrFXcNTixpBzwPUd00Ad8mBUe/w3eBS7m/\r\nlWUDyhIXKp4KfqteYYozmi9tG/1Y0cxxWZc6z4pKFYeJFbBiJaA+q/sjKQN0\r\nKCucEMOf7lhjvCNkMh0Iz8p6/x048zWSu0/tdFJ28rVuYx5DKC/lODfQyhbd\r\nU5IcfxlOFSW7+cJdxTCARbYoR4U8+GmLjDdQb6E/AGgyxEO4GKvPwas9Tr3v\r\nj2HScsQh0RvJBPDQhXBCNRqQYX0/majWdKr6FfutyabPSe2lxu9VSUBzpPQo\r\nDXjYa1kPCYrfxwg9NGyVB9CarJeT6cRO1G/nGmnn8GJBQw1khHIZcfB5UZVK\r\nuSHWz+wjSR3tPWEsbpRVvrCvuYivB0JoqbVkYkrR4LzTwsfYMDc68gI3yFph\r\nOZSm59FevgtBX+Fd4bqwtt6uHQSc9GDtHZoizuWhkA5n/dZ0IYbQnBD3O5PV\r\nI05SzE99HQoPN3yTwI8g+X7Qbg9L67mcxC5ju3VyVlH5yCrijz0WBoBVUseA\r\nKDT8pwWVbn7gK+Va7/sCErAa7kYZ/0vNwdGE7CAnI+C2/FoECcx6fuEcXMrH\r\nNq/yehQ1DmyM1B/nnbczayVZbY0mlJRy5fW/SaezS/avOX9Ei4+FYSE1NpZP\r\nnwTGMn2XqoIsj0ma8NrIC4XD+Pbql2cptxM=\r\n=T8Wh\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","gitHead":"206d0bdaf54f2b3c50b15d3d08ea230abbb454ce","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"igneel64","email":"p.perlepes@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.13.2+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.13.2","dependencies":{"tslib":"^2.3.1","@clerk/types":"^2.7.1","query-string":"^7.0.1","camelcase-keys":"^7.0.1","snakecase-keys":"^5.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"got":"^11.0.0","jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","node-fetch":"^2.6.0","typescript":"^4.6.2","@types/jest":"^27.4.0","@types/node":"^16.11.12","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.3.2"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_1.5.2_1650617022097_0.5393590498241192","host":"s3://npm-registry-packages"}},"1.5.3":{"name":"@clerk/backend-core","version":"1.5.3","license":"MIT","_id":"@clerk/backend-core@1.5.3","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"14cf4e60f11e4bbe57c88196d7e51e65401cc760","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-1.5.3.tgz","fileCount":499,"integrity":"sha512-xhI5PxRYIjrD7ypeMFyKE2p11lzm5x+S16I3WV4iL8n2g6NuRJdgIF0MfWPtddo3ywjdAgZFkx0BowLPo1jUUQ==","signatures":[{"sig":"MEQCIAXx6qf9qqUJJurGAD3/+Buom0kJ9zyZ9LbwdQEa241QAiAjN85SFq7rwbxTGkytLqPSfY7uWlRGFCxz3/utD4B2lw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":662743,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiaQZaACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoUnA//cmVXDozbnM79jTyjJIloV73Xfbrhy6ioxP6jiGNWj/juRLud\r\nDH1aTZ+dj2RTydhJw3uzQlZtcNzXGzAOR1QOQ8Qkg2THOTFWILsJM548pvPC\r\nlc30rSyTcBa0SG+HuMtdk9sXycJ+0lqCrescDclwctgZjZQnGXlNy1aFk35r\r\noLESIwtusX9K0XVCp/wXRpPXcv5C6MfNGZoN6PqnHqjwyia0z1V5Y1jMBGtA\r\nCRwJUZk/aI66rWnlRlejRrHH/8CV6LvgTKtf+jRERYXakfHOEnCOTJBOcecM\r\nKpx3ceifi1Yr9AuldF5FWut34d4TzZ7c27FMNacosNs3ErQTR4GlijPD46NL\r\nt5D4KeC34FY62FUsBE7aJSD8Og9bI0DJjxA0Ua4SZxM8SyVPJZSmv4mMSqJc\r\nE4tC3GD2g/sF8Rh1GfZk0jL4V4d5/CcJOLK4WH23EcWVbv4ZBShq3UWoxOuh\r\nE+Uz19hCvumV29srK21mUekAG8l/jtbBkPEtTJ3KuHvQQMrDLM1P+xsOug0K\r\nbpvvk5GkGG5v1j9vbLx8tf80ch5oapMxQuPtPUn3C5YX2t5G7Rpdh8MF2oP+\r\nSXBkCqbeyGA3o+Q2yByECppFwotAM6PBfBugVE3yum9SHhfG3TWwEZBKlKPz\r\nsso+tK6d17U4rkxt3kShSJCucgUssyvKPH0=\r\n=QCOs\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","gitHead":"27c6a0bfbc8715f0aace38f56a48d86fc6a3f996","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.14.2+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.14.2","dependencies":{"tslib":"^2.3.1","@clerk/types":"^2.7.1","query-string":"^7.0.1","camelcase-keys":"^7.0.1","snakecase-keys":"^5.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"got":"^11.0.0","jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","node-fetch":"^2.6.0","typescript":"^4.6.2","@types/jest":"^27.4.0","@types/node":"^16.11.12","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.3.2"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_1.5.3_1651050074387_0.46133374838889374","host":"s3://npm-registry-packages"}},"1.5.4":{"name":"@clerk/backend-core","version":"1.5.4","license":"MIT","_id":"@clerk/backend-core@1.5.4","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"19873080742c95a2d27c11c0c4ae025cdacdd925","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-1.5.4.tgz","fileCount":499,"integrity":"sha512-8UhEKNwrLexYqdoARGr9suYSxkeBlbfUp/O9yaUCaWbbOzYAS1eMrB1Te48qC4/jcChesOQ07kGVmQWJ2Bj2CQ==","signatures":[{"sig":"MEUCIBJr6aT/4WV4esTItOh+HiADki3yGW15U4lEcC6wrsRPAiEAvUfmayxIePl5IycrqVYJ6WJDyKyWPBp0hNLRy5A7Dg8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":663372,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiaXyBACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmolYRAAoTeOEn1UQdICiYsK1/WbhzkrTYUoKLUt+sF+NIcnQB9SJTLU\r\nrqJ6QlfNfxOlpHT4j+yJL5Gy/IfNZUhWUn1CN3y2nvA1Aw+Sbt3Oou5FVXKL\r\nl7QZkS3IlwBDMXCp2CtNBKWW8GSS1qEQRbS+npHLjPJ3gu1VmKuvZBgQlLRF\r\nJ1ILRX7enGILKvgw+GzTK5+eJ84yB5R10qPyNZtdfdozgjxZJ9bZe7BDEl6m\r\nPnmxBU+fx4LNHhYe5ge1gWR5eZQkZKMrvZlkqpV20HyMW6K5vyIMiaXFpo63\r\nlki8dh7BXCavztR5xUS73I2JUtYvDRWW0To8XESoQMoE49SFlJAffHfne3bL\r\n8Rwhnc9ovAS6HUkgo4YaKQF5gcm0Y92LrsG8vsctX/uIV6QZ1MsQNo62+Rqm\r\nA59fCmOHLQk/58fDad9dg9ijstYVxTIwkK0w6KBr8pjJT6fOjy/Vh9HS2mqi\r\n95ylwRhAda0fRj9osdIO1UN4pnDZmMkwj1kUhz/w9H5HWOVCoQlYyajLibuD\r\neAAMThSmPxoAGqBqremLC0HIxtfsbN1A2homD4kH6vur5ZypJu40jz+60PHr\r\nuDj0LSZvuVf1zfqrSrDIAX/jt7KUk+CW5gyNjlyXluPOncAdakmTB4ElTgo7\r\n1nqyM+a6IwS9F6Sg8r6O+7XpERvopQCRTlM=\r\n=7srg\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","gitHead":"1291e80efa88cca8668b4f2828e70a8d1466b372","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.14.2+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.14.2","dependencies":{"tslib":"^2.3.1","@clerk/types":"^2.7.1","query-string":"^7.0.1","camelcase-keys":"^7.0.1","snakecase-keys":"^5.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"got":"^11.0.0","jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","node-fetch":"^2.6.0","typescript":"^4.6.2","@types/jest":"^27.4.0","@types/node":"^16.11.12","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.3.2"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_1.5.4_1651080320858_0.9022516057581937","host":"s3://npm-registry-packages"}},"1.5.5-staging.0":{"name":"@clerk/backend-core","version":"1.5.5-staging.0","license":"MIT","_id":"@clerk/backend-core@1.5.5-staging.0","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"6393d32738936769d62faad2415b4289295083a0","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-1.5.5-staging.0.tgz","fileCount":499,"integrity":"sha512-GwhABAYqh9ubXzeP1i98NZbQoEgDJbqc79xHScHH2g5Jqz+SBvl8gu0PiiKqeKyB/wmCRVFnXKQrwmjsBnD5Qw==","signatures":[{"sig":"MEUCIFpdYp6Lt7EtcisKXMmMIdZM0mLCydCqLUy523L6Qq45AiEAraIJ/cysIX793+2C9BmhKA5CGj3sq/I9hFeLW1oUIvQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":663382,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiaky2ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq9+Q/+KxzTcB/ewaDBLVMIwgDR02VwYqF++Ti8bi9T7P6Tv5SwZVQR\r\nlQZelh341D71HB9Uny0fRIK8AptijtKRNwytrk3j3CKvKFuavvgH7DzWjbFB\r\nLMY4+y1rKfar2QmD4q5HzbDCv6FY7qz7eYBoynQKOHDDUH2xdtXdtmuRyWZ0\r\na/FuW92BMEfeFT/mMcUoPuFXKdonfpltKq8Ho1qU40L/y76rudn5SVQh6pET\r\n37KD0m9MtUJM7KfUblPhRVOfZsS17XfwFLrfhrhCw8YOxfQXehdRVIqgkn5F\r\nQOkRboKg8eP2CVRBAlbYynLYWNYkmEclGf/AwXNzDKJUrX/FlUUWqL13LnjI\r\nbNqKw3LUZUQk9cefj71NceQzvs1tgXHYlQLNLW4YWu+e8uZYWy/BLcynLEjU\r\nQIsnEnXMhJTgDww+aWprgs+G1L7AXUX6gVQjIFdqv1F0DCx9zYNMgXq7Yfkk\r\nBZd/mXgugJQdzWVgPu/h7ZoxXVsDsF6b86l6zxCkn8ywQS8HSpiD2DG5QzNG\r\nIBsLiw0+f+WhS3meDHCVCkEssZ9nhuc2ux58nL0WesH0EUDTgXmwL9Of+d0X\r\nsfMshCupxIcnqJjLzr6RU0Kif4b/pCwQAjekyf2ER19f0TAKIzKYRpiIOmVL\r\nCf+DpAlWfyUhntucNFzbAO+Kdg9OXnYaWe0=\r\n=gAu5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev?utm_source=github&utm_medium=clerk_backend_core\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <img src=\"https://images.clerk.dev/static/clerk.svg\" alt=\"Clerk logo\" height=\"50\">\n  </a>\n  <br />\n</p>\n\n# @clerk/backend-code\n\n<div align=\"center\">\n\n[![Chat on Discord](https://img.shields.io/discord/856971667393609759.svg?logo=discord)](https://discord.com/invite/b5rXHjAg7A)\n[![Clerk documentation](https://img.shields.io/badge/documentation-clerk-green.svg)](https://clerk.dev/docs?utm_source=github&utm_medium=clerk_backend_core)\n[![Follow on Twitter](https://img.shields.io/twitter/follow/ClerkDev?style=social)](https://twitter.com/intent/follow?screen_name=ClerkDev)\n\n[Changelog](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/CHANGELOG.md)\n·\n[Report a Bug](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=bug&template=bug_report.md&title=Bug%3A+)\n·\n[Request a Feature](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=Feature%3A+)\n·\n[Ask a Question](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n\n</div>\n\n---\n\n## Overview\n\nThis package provides Clerk Backend API core resources and low-level authentication utilities for JavaScript environments. It is mostly used as the base for other Clerk SDKs.\n\n## Getting Started\n\n### Installation\n\n```sh\nnpm install @clerk/backend-core\n```\n\n### Build\n\nTo build the package locally with the TypeScript compiler, run:\n\n```sh\nnpm run build\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities, without being platform/environment, specific such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendAPI](./src/api/ClerkBackendAPI.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendAPI` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n## Usage\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendAPI](./src/api/ClerkBackendAPI.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://reference.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendAPI.ts#17) implementation.\n\n## Support\n\nYou can get in touch with us in any of the following ways:\n\n- Join our official community [Discord server](https://discord.com/invite/b5rXHjAg7A)\n- Open a [GitHub support issue](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n- Contact options listed on [our Support page](https://clerk.dev/support?utm_source=github&utm_medium=clerk_backend_core)\n\n## Contributing\n\nWe're open to all community contributions! If you'd like to contribute in any way, please read [our contribution guidelines](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/CONTRIBUTING.md).\n\n## Security\n\n`@clerk/backend-core` follows good practices of security, but 100% security cannot be assured.\n\n`@clerk/backend-core` is provided **\"as is\"** without any **warranty**. Use at your own risk.\n\n_For more information and to report security issues, please refer to our [security documentation](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/SECURITY.md)._\n\n## License\n\nThis project is licensed under the **MIT license**.\n\nSee [LICENSE](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/LICENSE) for more information.\n","gitHead":"56365eadaf8cbcbed5914f32a14b11261566624e","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.14.2+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.14.2","dependencies":{"tslib":"^2.3.1","@clerk/types":"^2.7.1","query-string":"^7.0.1","camelcase-keys":"^7.0.1","snakecase-keys":"^5.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"got":"^11.0.0","jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","node-fetch":"^2.6.0","typescript":"^4.6.2","@types/jest":"^27.4.0","@types/node":"^16.11.12","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.3.2"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_1.5.5-staging.0_1651133622241_0.6496414786834217","host":"s3://npm-registry-packages"}},"1.5.5-staging.1":{"name":"@clerk/backend-core","version":"1.5.5-staging.1","license":"MIT","_id":"@clerk/backend-core@1.5.5-staging.1","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"4e7ddff6d002ab6f472d611c474b2398f9f6831f","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-1.5.5-staging.1.tgz","fileCount":499,"integrity":"sha512-OC9NZ1AZkm17djaguPeXrZd5gEcBpTVQQ9eW09BvVfGZdezsqOgn9FtxqaCCV9K5OZbkYq8AdXEG/kHExm3pFA==","signatures":[{"sig":"MEQCIBggccNZwsa1m4fwv++zm8S+n32IKjYieYEs1XQAblx5AiAyW5gElOHmu1gyoATqFvKWiW87Zv8r9d4PHEI5cuUWvQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":663392,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJian3BACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp0LA//SET8/XObaStdvLys0byAYRqb5FCIytaC8szTCDS/LbGK8RTt\r\nqhZk3NSglsprNwJGHA9a0sgPEZ+vyna/Oi15zbO5I/6Jq6+tHv+l0aqkqJPO\r\nRjYXwumFJoPgvX0OEwiuyCPJO4Y8aCYGrN7Q8DFhhKKhtCP+/+YRDC5Dc4sd\r\nSLs1HgXk4GkQgWbB3InyC44u1Hnyuc7qdJ9Ns5D+f0ALmD1lNw5jftvbsQ6u\r\nZnH5GBjZnTSJhgJDjsroaGjEUGjl0o/0kd0PvmrTfV0+3tdM+HRg5VYefV7N\r\nmehRtY1sTUto2wDhUwh7BxjLfcdOszkb2eHULl9s/KZPDWA3wf+HCM6VGdxW\r\nJRP+5d4PuuZAGtg5g6Oa+WmH6W1ECdJ5E9CQOaP7u1ijHgpNdMwMGSgy/PyC\r\nUplRnPM+UeQJeUb7paSqPoZsWWlyl8GFvLq3iXlJNgpUOZ5NI9qv9Zwu2I00\r\nWChAfnyz4+I5vynOBAEgOwPzeyPHCmetEN+1LNwjvNA3H18LCeO93OBJH6h5\r\nIpPIvn/ZLIDa4NR7MxRUTa7SN2VgQXVuPCojNhvHyv24BgC2P/5++/XfV48h\r\nKNk9g1E+aGc3OBkJ6zDB3DCDANPyDJHfcaNbOrYP9SJfVMil1PTtnCQuUmBI\r\n/g9iXV9ee6JR16WcxusekotlfgqgwvF/xhY=\r\n=u13A\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev?utm_source=github&utm_medium=clerk_backend_core\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <img src=\"https://images.clerk.dev/static/clerk.svg\" alt=\"Clerk logo\" height=\"50\">\n  </a>\n  <br />\n</p>\n\n# @clerk/backend-code\n\n<div align=\"center\">\n\n[![Chat on Discord](https://img.shields.io/discord/856971667393609759.svg?logo=discord)](https://discord.com/invite/b5rXHjAg7A)\n[![Clerk documentation](https://img.shields.io/badge/documentation-clerk-green.svg)](https://clerk.dev/docs?utm_source=github&utm_medium=clerk_backend_core)\n[![Follow on Twitter](https://img.shields.io/twitter/follow/ClerkDev?style=social)](https://twitter.com/intent/follow?screen_name=ClerkDev)\n\n[Changelog](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/CHANGELOG.md)\n·\n[Report a Bug](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=bug&template=bug_report.md&title=Bug%3A+)\n·\n[Request a Feature](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=Feature%3A+)\n·\n[Ask a Question](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n\n</div>\n\n---\n\n## Overview\n\nThis package provides Clerk Backend API core resources and low-level authentication utilities for JavaScript environments. It is mostly used as the base for other Clerk SDKs.\n\n## Getting Started\n\n### Installation\n\n```sh\nnpm install @clerk/backend-core\n```\n\n### Build\n\nTo build the package locally with the TypeScript compiler, run:\n\n```sh\nnpm run build\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities, without being platform/environment, specific such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendAPI](./src/api/ClerkBackendAPI.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendAPI` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n## Usage\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendAPI](./src/api/ClerkBackendAPI.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://reference.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendAPI.ts#17) implementation.\n\n## Support\n\nYou can get in touch with us in any of the following ways:\n\n- Join our official community [Discord server](https://discord.com/invite/b5rXHjAg7A)\n- Open a [GitHub support issue](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n- Contact options listed on [our Support page](https://clerk.dev/support?utm_source=github&utm_medium=clerk_backend_core)\n\n## Contributing\n\nWe're open to all community contributions! If you'd like to contribute in any way, please read [our contribution guidelines](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/CONTRIBUTING.md).\n\n## Security\n\n`@clerk/backend-core` follows good practices of security, but 100% security cannot be assured.\n\n`@clerk/backend-core` is provided **\"as is\"** without any **warranty**. Use at your own risk.\n\n_For more information and to report security issues, please refer to our [security documentation](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/SECURITY.md)._\n\n## License\n\nThis project is licensed under the **MIT license**.\n\nSee [LICENSE](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/LICENSE) for more information.\n","gitHead":"f9c750e54c0dff536b9b8f4e893fef9a3e6629b7","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.14.2+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.14.2","dependencies":{"tslib":"^2.3.1","@clerk/types":"^2.8.0-staging.0","query-string":"^7.0.1","camelcase-keys":"^7.0.1","snakecase-keys":"^5.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"got":"^11.0.0","jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","node-fetch":"^2.6.0","typescript":"^4.6.2","@types/jest":"^27.4.0","@types/node":"^16.11.12","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.3.2"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_1.5.5-staging.1_1651146177298_0.9661072322785103","host":"s3://npm-registry-packages"}},"1.5.5":{"name":"@clerk/backend-core","version":"1.5.5","license":"MIT","_id":"@clerk/backend-core@1.5.5","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"f94765f674e4fa47b104fb905c35f33a469c3f5e","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-1.5.5.tgz","fileCount":499,"integrity":"sha512-6kW1kRc8w+BO9s9v5RNVBPEWV1DqCKpaB/u6Jbjsdl2KABMx3XtnVL5KUFb+vjAzhC2xv/Yg1DUXp6oMgnq4vQ==","signatures":[{"sig":"MEQCIDPm2uyC+XHwUi5LHAnD+lnC1XW1p7bfl2NLSOEqVYM4AiByiT4v/j2sVcDQ/zw4NdiLMTE2q0bldJb4Kvr1ZTh3hQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":663571,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiapdcACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpCQA//WgeJv3DaumswdgdLi6dbG2gHAk1HQ/7X5c/otajEM8GQ5Ir8\r\nnixMREdniaJSV5Gaays2Umat/uCKU5G+q8TEGiJ0Bfu5MMXc2XwM8tHwMBlz\r\nTuMGmwWvuNFv9a8MpJbxUpXH93a0rVO2XnIK5I1/OS2sQ/k6nz5D811w5lMD\r\nZQURaOl+1mErd+V6htsBxRIOOWBbp4w6QPslSHJrr3mqbn4oYeBSyTEIw+3e\r\nxGQGBO1SqNjlhU1RdANq8TYq0xHrmY8NtNdgbZVz8P0p/PIgXypcdtoVxC/q\r\nBsz8uEzUiEdC6q2nwCBiTc36R2W4TNRZHrxHuuvJQiBG+e0qib2/5xJiwNTv\r\nHwKSDo6eu4tWUM8vcgSrKEom61FPUzCwzWQmW8MrRRX3AZicjd/5MmGQ53y+\r\nYJYzBxiGBBeWj6VLs5JIOTGZ4fqbnKoqiXTK7BGcKJTLvfY4hNxaX57rIgvK\r\nBNJFrlZ1e1NLogVtiG6Q6BSl0QUedzHvm1b1BMmLv7cZyvkqUpcCBtqwqvzN\r\nljolaTeEcl0nlEqkG+mlFOvN/6pRtP8dA2PcSn5zVtwHJc2ope6TuWqKTn7a\r\nwUqKb+vrBnN4FOzuRpkowr0y5oHu1zQuDUEcZLR0DC1SfZQdBKVnI1t0FUdw\r\nPHSRxUs/fvrCs/9WUZaMAJ8s6pmB+r/3hM8=\r\n=b1qo\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","gitHead":"e381e89c1b316cf0702cf3a7320eecab7fc4a95a","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.14.2+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.14.2","dependencies":{"tslib":"^2.3.1","@clerk/types":"^2.8.0","query-string":"^7.0.1","camelcase-keys":"^7.0.1","snakecase-keys":"^5.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"got":"^11.0.0","jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","node-fetch":"^2.6.0","typescript":"^4.6.2","@types/jest":"^27.4.0","@types/node":"^16.11.12","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.3.2"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_1.5.5_1651152732329_0.16340074779455094","host":"s3://npm-registry-packages"}},"1.5.6-staging.0":{"name":"@clerk/backend-core","version":"1.5.6-staging.0","license":"MIT","_id":"@clerk/backend-core@1.5.6-staging.0","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"6e1f34d73bce2564a3e286f8112ccc1f15e4095d","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-1.5.6-staging.0.tgz","fileCount":505,"integrity":"sha512-fqrwnnv82+HtYVkVM+keSDfvnOvNU5GRpULdyJZNbsvm1U7DYAYy0ZOR5k4XwFq8DG1BQKE5eRuZ0DLFvxkeNw==","signatures":[{"sig":"MEUCIDNLAnjYFNX0Kyxs55j4zvZ5t3WgGzAOF7abPxOTefs2AiEA2v9eFZvMeJ520WU87uFe8vdtIWGmbikZc7W7E7ygfaA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":667043,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJicndWACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoRXQ//RtkdJz8hChYVwBz+2hSqv6c6meJV5gpyl0wBG4j5wEGuPWQD\r\nu6g4xbaR6cvbFae9t1YZQzY5fzI4EueAzPwXJB8AAu0rt6b8wh9dkjAkcUeK\r\nNRik05kdL2yeQklI/eaG2J9UMfP31Wtx5jAC+cn8SseRJq8TPPQruuJpF+fK\r\nHlcp7BVy7XqnRG/nz/g53Qu5uwZerrojwzobCK7k2hvN66QP/jeDgIsunEcB\r\nedIeoVKhmNMKg/iNUSI3yO5UpS3FAvuwmJMosmHQo48H1hZvL8YJquWdY/9j\r\nCwmVOWqmAQbHa6usrF6MboDvOiMzGr6fiEMstAzH0Z7SX4TgUZxe8/TQEKwT\r\nOkrvsqGmZuYQrAyJTTcuKo7dwa57xedsJ7YHXObrl2Q98YOGg1cN4F4sERmg\r\nLObdSgx7AT0w60Ai1hp47ngUsGGpmWCb5A+ONu6XH2oG96hXtc/eBYMjIH/o\r\nB9reBVf0ZUH/VIpPjObpsq9+IFZjyncM4cWEKPliO7YGfHrEH/EBlFYttlvx\r\nuazv+sqUDGFd+kI7Ocoj4z7/eQkIeLlCieh/RhWCJNPPbwmNetU3jkSembRI\r\nvV+B53eM7uxF6W0ywQ+FA9ihnn+oXBhmJrIyLAIw/CaunGOI113bF+hpvLA4\r\nTMljKFqeTuo65R+TW3T9p9qDaonOsXFfpgE=\r\n=Pq+G\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev?utm_source=github&utm_medium=clerk_backend_core\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <img src=\"https://images.clerk.dev/static/clerk.svg\" alt=\"Clerk logo\" height=\"50\">\n  </a>\n  <br />\n</p>\n\n# @clerk/backend-code\n\n<div align=\"center\">\n\n[![Chat on Discord](https://img.shields.io/discord/856971667393609759.svg?logo=discord)](https://discord.com/invite/b5rXHjAg7A)\n[![Clerk documentation](https://img.shields.io/badge/documentation-clerk-green.svg)](https://clerk.dev/docs?utm_source=github&utm_medium=clerk_backend_core)\n[![Follow on Twitter](https://img.shields.io/twitter/follow/ClerkDev?style=social)](https://twitter.com/intent/follow?screen_name=ClerkDev)\n\n[Changelog](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/CHANGELOG.md)\n·\n[Report a Bug](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=bug&template=bug_report.md&title=Bug%3A+)\n·\n[Request a Feature](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=Feature%3A+)\n·\n[Ask a Question](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n\n</div>\n\n---\n\n## Overview\n\nThis package provides Clerk Backend API core resources and low-level authentication utilities for JavaScript environments. It is mostly used as the base for other Clerk SDKs.\n\n## Getting Started\n\n### Installation\n\n```sh\nnpm install @clerk/backend-core\n```\n\n### Build\n\nTo build the package locally with the TypeScript compiler, run:\n\n```sh\nnpm run build\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities, without being platform/environment, specific such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendAPI](./src/api/ClerkBackendAPI.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendAPI` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n## Usage\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendAPI](./src/api/ClerkBackendAPI.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://reference.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendAPI.ts#17) implementation.\n\n## Support\n\nYou can get in touch with us in any of the following ways:\n\n- Join our official community [Discord server](https://discord.com/invite/b5rXHjAg7A)\n- Open a [GitHub support issue](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n- Contact options listed on [our Support page](https://clerk.dev/support?utm_source=github&utm_medium=clerk_backend_core)\n\n## Contributing\n\nWe're open to all community contributions! If you'd like to contribute in any way, please read [our contribution guidelines](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/CONTRIBUTING.md).\n\n## Security\n\n`@clerk/backend-core` follows good practices of security, but 100% security cannot be assured.\n\n`@clerk/backend-core` is provided **\"as is\"** without any **warranty**. Use at your own risk.\n\n_For more information and to report security issues, please refer to our [security documentation](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/SECURITY.md)._\n\n## License\n\nThis project is licensed under the **MIT license**.\n\nSee [LICENSE](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/LICENSE) for more information.\n","gitHead":"69c118289176327b78e362c4cbfa75be4ac7beb4","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"sokratis","email":"sokratis.vidros@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.13.0+x64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.13.0","dependencies":{"tslib":"^2.3.1","@clerk/types":"^2.9.0-staging.0","query-string":"^7.0.1","camelcase-keys":"^7.0.1","snakecase-keys":"^5.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"got":"^11.0.0","jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","node-fetch":"^2.6.0","typescript":"^4.6.2","@types/jest":"^27.4.0","@types/node":"^16.11.12","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.3.2"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_1.5.6-staging.0_1651668822160_0.3274654294621915","host":"s3://npm-registry-packages"}},"1.5.6":{"name":"@clerk/backend-core","version":"1.5.6","license":"MIT","_id":"@clerk/backend-core@1.5.6","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"279593dfd7a89068b93bf15637d97a73cd780a16","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-1.5.6.tgz","fileCount":499,"integrity":"sha512-oMfiCR/vAJzPObUPCrzwJkUnQjczRKA1IGQQOVbhmM+aq/oQpr8u1nh41YfDB2aRINRmV1qms9YP1qYqgNyoeA==","signatures":[{"sig":"MEYCIQD+dohGDly6GB+f2Pebtceg58bGuJrBDEnXXlC8sQCSUgIhAJWANNYj5GDgX7fGZ65pIh9K1tqnaWNI9RNqJQqSeA3y","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":663770,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJidEtnACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmofpQ//SWr9g7v5D2I+i1+d+kwHb/ZzH4qxraAmhIOl+Lw82FvndD7h\r\ng88GiZwdtBFRLJDXuoOdUASrKB8D/TfIL07o2AVc++d70snVLXSRFDz1yzzg\r\niJjKV1Q7nA43ADFhdkn229Y6IlQ6k4LmiWyAv5cdnG3tswb4RDhclQbcGeWl\r\nWQBc9DayLKUcY7SfEq3m6cEpDh6jlHXM3gp/A+bb+wOuWVreBQfaJhP59KD6\r\nOLM0NNM2YTl3C/CXVd5l2TttvVt0O+1ARdLGTCpn9NXlpS89RMBUksAOPypO\r\nqUMcDaaw5HvAa36RgU1QtS38esK6HaEZAURgX1yBoulyiNfH+4n3F3184n2T\r\nvKufpvThRNH8KtXEeeeACsAOVeqK+PSnS8y+pnLlsdbX9xpowKmSrUEk67qf\r\nB+VSq6puKj3LeRie0PfgnJ2dOh9vNTm1S57FJVOh367WmzhNQJi/5cM04PNz\r\nCLrW4Z17qCjfqMJI/fldmujzIk+HXDmu+EyID1a04A3pAcTChZfKoLwAVyrv\r\nPMo+da7VERCm1ItlQZUmsv/DRlObQbLzXMwy764r6hYTCq4+9M2s40XyzGtc\r\nNp8qgVGilplp+gs9+xHKcw01YGt8+/ctn/XqWRlWb8SRrtXKjeGpZmhqayrN\r\nR+WFudOvFC162QuNHJhTMeLavVAFYgCrpjE=\r\n=iyjR\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev?utm_source=github&utm_medium=clerk_backend_core\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <img src=\"https://images.clerk.dev/static/clerk.svg\" alt=\"Clerk logo\" height=\"50\">\n  </a>\n  <br />\n</p>\n\n# @clerk/backend-code\n\n<div align=\"center\">\n\n[![Chat on Discord](https://img.shields.io/discord/856971667393609759.svg?logo=discord)](https://discord.com/invite/b5rXHjAg7A)\n[![Clerk documentation](https://img.shields.io/badge/documentation-clerk-green.svg)](https://clerk.dev/docs?utm_source=github&utm_medium=clerk_backend_core)\n[![Follow on Twitter](https://img.shields.io/twitter/follow/ClerkDev?style=social)](https://twitter.com/intent/follow?screen_name=ClerkDev)\n\n[Changelog](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/CHANGELOG.md)\n·\n[Report a Bug](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=bug&template=bug_report.md&title=Bug%3A+)\n·\n[Request a Feature](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=Feature%3A+)\n·\n[Ask a Question](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n\n</div>\n\n---\n\n## Overview\n\nThis package provides Clerk Backend API core resources and low-level authentication utilities for JavaScript environments. It is mostly used as the base for other Clerk SDKs.\n\n## Getting Started\n\n### Installation\n\n```sh\nnpm install @clerk/backend-core\n```\n\n### Build\n\nTo build the package locally with the TypeScript compiler, run:\n\n```sh\nnpm run build\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities, without being platform/environment, specific such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendAPI](./src/api/ClerkBackendAPI.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendAPI` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n## Usage\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendAPI](./src/api/ClerkBackendAPI.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://reference.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendAPI.ts#17) implementation.\n\n## Support\n\nYou can get in touch with us in any of the following ways:\n\n- Join our official community [Discord server](https://discord.com/invite/b5rXHjAg7A)\n- Open a [GitHub support issue](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n- Contact options listed on [our Support page](https://clerk.dev/support?utm_source=github&utm_medium=clerk_backend_core)\n\n## Contributing\n\nWe're open to all community contributions! If you'd like to contribute in any way, please read [our contribution guidelines](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/CONTRIBUTING.md).\n\n## Security\n\n`@clerk/backend-core` follows good practices of security, but 100% security cannot be assured.\n\n`@clerk/backend-core` is provided **\"as is\"** without any **warranty**. Use at your own risk.\n\n_For more information and to report security issues, please refer to our [security documentation](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/SECURITY.md)._\n\n## License\n\nThis project is licensed under the **MIT license**.\n\nSee [LICENSE](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/LICENSE) for more information.\n","gitHead":"14c5e3dbb682fb9265208ae3691b5dba08060fb8","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.14.2+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.14.2","dependencies":{"tslib":"^2.3.1","@clerk/types":"^2.9.0","query-string":"^7.0.1","camelcase-keys":"^7.0.1","snakecase-keys":"^5.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"got":"^11.0.0","jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","node-fetch":"^2.6.0","typescript":"^4.6.2","@types/jest":"^27.4.0","@types/node":"^16.11.12","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.3.2"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_1.5.6_1651788647538_0.02844777282261224","host":"s3://npm-registry-packages"}},"1.6.0":{"name":"@clerk/backend-core","version":"1.6.0","license":"MIT","_id":"@clerk/backend-core@1.6.0","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"c0790047b65d48bb85bcdd40c47ab92a3269fe94","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-1.6.0.tgz","fileCount":499,"integrity":"sha512-F16OutesglfRRlYlHUEZNFZpn1YiyMNF353FLh17pTWIbWxmYw1ENPtcdH3wM/PTAI0UB1IDKqV5+wjEzpe7OQ==","signatures":[{"sig":"MEYCIQC5UFDjZsyqy/kcgy0F99/gAfyTnYMu/16YHBdDHEO4eQIhAJxygwfChxWLK65AlmmuDJI54x/oT4OjiD8Sjk1HtjfS","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":669794,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJidP9qACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmpvmw//Y5g/zptWoHHkE9g+of8B/l4wbikDEwrQILcvw01utNd0tj46\r\nZrmiEPAWKZGV/m8QKpNDG6oKRiBOEKaS1zhcBCl99anXBtfEpGZKSoy2XnVu\r\nMegMU7u5VdWoMP2iIVh1LP7oMY7R2aBW8yKoYb80/dCebfLKvIXaCtJ/dgH/\r\n4Uy1gplou9COvHwEA6qPHGPrsv++YmzaqRcgqudnTCEQoVBDirxNXIPQLGg9\r\nqNzbJTdOpXIoHGooHK+gpXq8lQbrD1EACu2LZ3ebpGvRffQIwK/5kEzoZMBr\r\nFF7ye6K0AnpOJ8hEevk+9nPhPq71v1zFmrwkHauLUNqSaIqy9qbg2VJsY4nR\r\nWT8j1QczytW9/T6by3e/dyFfybRloKIbplNfCH+jMI8t8ujetRSsc4Bn5+rr\r\nmbM7UdvQtJJfRXSRoLneNUZaCFeEWAP0DzIGjM2qRvA7tuundh7nKgM4AHEx\r\nHy/xXoyuRZVedfrOYFPdOEpeZzA3ya2VukeZuEng53Zwq+fBbw6cT0GXzs/n\r\n+EL9H98xDtu2bz7hC6Wu3FbsWDwdkTHqsxwYqdWmrUT1QYVHURvBdMWPfkNR\r\n1mKl8mjUxNCIvlvyP5+Ewj/wEwc/7M7dctJXo7h1BppU+FaS2NEbgYs/lamz\r\nIC01Jr7g+L5X9/149CghgyOOOWM1hTC5PUQ=\r\n=gjqv\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","gitHead":"fa2f20ba6fec276bdb12100f60222519b4571a3f","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.14.2+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.14.2","dependencies":{"tslib":"^2.3.1","@clerk/types":"^2.10.0","query-string":"^7.0.1","camelcase-keys":"^7.0.1","snakecase-keys":"^5.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"got":"^11.0.0","jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","node-fetch":"^2.6.0","typescript":"^4.6.2","@types/jest":"^27.4.0","@types/node":"^16.11.12","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.3.2"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_1.6.0_1651834730367_0.6880058918476721","host":"s3://npm-registry-packages"}},"1.7.0-staging.0":{"name":"@clerk/backend-core","version":"1.7.0-staging.0","license":"MIT","_id":"@clerk/backend-core@1.7.0-staging.0","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"caff75c54db1ecd5014c42d0768d3f67c8ec4c7d","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-1.7.0-staging.0.tgz","fileCount":499,"integrity":"sha512-RaOIk+UtkevyTUZO2swRuejgNsLaHjceOPj6G1Xmp7UW1rFsnt83NSqSffQA6iknxl/yb9y3TbLc3Dye6kK1nw==","signatures":[{"sig":"MEYCIQDY55/rSwVclho2uzz6lXvvuwCOZIkEdCNKohDw1N93wwIhAJVMfn8hm/r1jyfm0tBleJaK7CcOhehxJH9bfV1GSxch","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":671967,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJieiDiACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqnoQ/9HjHdlwcXm0/c0TS8liil/dOpYYGUd0zHCb8ofALwUtLnOLLP\r\nnPwXO5vrK8bb0SqmKqywj8mMwrqavH+CISz+fGlBPMWp9buqLw/4mOu5xJCL\r\noOdVQ/jpzVbOpnq23Nmauh+yT98OIhIi4wdemIXusZpGxSJwPdlES+JK3RZs\r\nHKEGtjI9BvuNjp7M5TbZAc050btj7GfBCco9GbV6/EM02VO1J8G0i3tRPr1w\r\nK0r/fPD1t7p6Tjmvn47xmFD9ah/UD0R/nL2YFblOOfqVrcLDPMO8aj4JSaUt\r\ncY11eEE+Q0eFtcWDGr9WaD123Bzr7MQbRBhXSZWgLsDi4nKjHLzIcRsk0GXE\r\nc1pBZ5Wj8fbpKUHQHOut5DT1egVDOwZu5mYkiNESFFyzjDvLNbUdnV8ou5i0\r\niCSbscTGRvGZDT2yzimLVkCDVutFWjSbHZ7/8sKrjx//JOQskjOh1wP5rDn0\r\nfi9+VgHLk+Ecsu+fZCi2ZwjUtogKFmAmZbzqlRLn/magha5c524EvrvXkaEI\r\nzXt8hR4HSSi2Y01ratTtgfn/uHNuOfX5+z/KdaJKSWt0r9FAN29chl9B2yjU\r\nKsWoO/9/a/edkaKFLxyvYZdHGtIabGc/lVg3Jp26wJmiSDCT427pXZThAe6p\r\nFUVOBN3S5oXcGI+fmDD3XppipXYpYjtJjik=\r\n=4TKf\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev?utm_source=github&utm_medium=clerk_backend_core\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <img src=\"https://images.clerk.dev/static/clerk.svg\" alt=\"Clerk logo\" height=\"50\">\n  </a>\n  <br />\n</p>\n\n# @clerk/backend-code\n\n<div align=\"center\">\n\n[![Chat on Discord](https://img.shields.io/discord/856971667393609759.svg?logo=discord)](https://discord.com/invite/b5rXHjAg7A)\n[![Clerk documentation](https://img.shields.io/badge/documentation-clerk-green.svg)](https://clerk.dev/docs?utm_source=github&utm_medium=clerk_backend_core)\n[![Follow on Twitter](https://img.shields.io/twitter/follow/ClerkDev?style=social)](https://twitter.com/intent/follow?screen_name=ClerkDev)\n\n[Changelog](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/CHANGELOG.md)\n·\n[Report a Bug](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=bug&template=bug_report.md&title=Bug%3A+)\n·\n[Request a Feature](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=Feature%3A+)\n·\n[Ask a Question](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n\n</div>\n\n---\n\n## Overview\n\nThis package provides Clerk Backend API core resources and low-level authentication utilities for JavaScript environments. It is mostly used as the base for other Clerk SDKs.\n\n## Getting Started\n\n### Installation\n\n```sh\nnpm install @clerk/backend-core\n```\n\n### Build\n\nTo build the package locally with the TypeScript compiler, run:\n\n```sh\nnpm run build\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities, without being platform/environment, specific such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendAPI](./src/api/ClerkBackendAPI.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendAPI` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n## Usage\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendAPI](./src/api/ClerkBackendAPI.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://reference.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendAPI.ts#17) implementation.\n\n## Support\n\nYou can get in touch with us in any of the following ways:\n\n- Join our official community [Discord server](https://discord.com/invite/b5rXHjAg7A)\n- Open a [GitHub support issue](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n- Contact options listed on [our Support page](https://clerk.dev/support?utm_source=github&utm_medium=clerk_backend_core)\n\n## Contributing\n\nWe're open to all community contributions! If you'd like to contribute in any way, please read [our contribution guidelines](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/CONTRIBUTING.md).\n\n## Security\n\n`@clerk/backend-core` follows good practices of security, but 100% security cannot be assured.\n\n`@clerk/backend-core` is provided **\"as is\"** without any **warranty**. Use at your own risk.\n\n_For more information and to report security issues, please refer to our [security documentation](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/SECURITY.md)._\n\n## License\n\nThis project is licensed under the **MIT license**.\n\nSee [LICENSE](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/LICENSE) for more information.\n","gitHead":"05c8822989848a986e391539e2400bde03bf42af","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.14.2+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.14.2","dependencies":{"tslib":"^2.3.1","@clerk/types":"^2.10.1-staging.0","query-string":"^7.0.1","camelcase-keys":"^7.0.1","snakecase-keys":"^5.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"got":"^11.0.0","jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","node-fetch":"^2.6.0","typescript":"^4.6.2","@types/jest":"^27.4.0","@types/node":"^16.11.12","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.3.2"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_1.7.0-staging.0_1652170978196_0.4789750639064345","host":"s3://npm-registry-packages"}},"1.7.0":{"name":"@clerk/backend-core","version":"1.7.0","license":"MIT","_id":"@clerk/backend-core@1.7.0","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"73eb7f81a3ee90ddad3cf4cebcf8ae8a664025a1","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-1.7.0.tgz","fileCount":505,"integrity":"sha512-4iIqGTdRvVzEIZFOuvVLpzx4uPJjGPpGj2GRFIXStiWpBob9KS1DHbLotHWbA8VrLXi7h5BtEnnF07cPWZNQLw==","signatures":[{"sig":"MEUCIH//YClUxu6i0hlWd38qHo2Io5W8g6MIQQpNzt14I0g4AiEAx2x+u8WBFsjdyqYeAL4YjbvwfJi/1muxZzoVbBPRDvE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":679245,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJie7nhACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmprXxAAlh0ahD/5zyTP7EQBk7BW3p7e9zm6m0AbqXmSVWm/iCdaQasv\r\nzSvw5TpzQirJJQDDjTelC/ob+dVRcjEnk07VmQEYK+0t6+sgEpHODt72UdpZ\r\nYtuwqI/DiBeAdRp9zOF4kQqUgpqaNWGMWxZCcIws3Ue/PC4WIg8Lr+Oi2Q8x\r\nN0P/6pf7JnpmR5eYctNIvgrYnNQFY5l7IpGdq1PIjjRgsS9fT/AbColZ+ANm\r\nj53A8FvQ6Qd0D3ETsUtu2mVsR3eRPv8q/B6PUhK+UkgeQOuvJzniPfreq/ee\r\nzsULwy+mFELhCvf1ilKsSkMiualSxs4AEvNUgXDo1ckFCAPyt7LVWT/RRUoe\r\nmhKeAu7MMbUGLD/IWRnujndpNsiTBFc39efjckpCf15tWAZ8LZvc+6Vq9Mnn\r\n+tytjQ3PbyolRrOZKu1WhcDVbW0Th1z924Zrqj4oa7MAtWKnq4eMqW7JoAQP\r\n505OVKO9j/Ku71L32waBEaHMCOtngHdtfUQRWlRLRFV+YMQUPQaJa/jdYKj0\r\nJOLOc1cXO9Z3B8mbhzQzCKxfA2j0P9LvxTc9ZuDbzzRy7PvQl1fytgEOIxUy\r\nL8WxrL85mfEZd5sDqELFxmjK4ZiiFz+8c6cOMEyH4SpaZCX2voR/Kj2CzgLU\r\nbomHGUg9ITvJWA2YEtbJOhaYvg6Gw/11fLI=\r\n=CK5s\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","gitHead":"7f279975c4e0c835083018275689b608591da6ef","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"sokratis","email":"sokratis.vidros@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.13.0+x64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.13.0","dependencies":{"tslib":"^2.3.1","@clerk/types":"^2.10.1","query-string":"^7.0.1","camelcase-keys":"^7.0.1","snakecase-keys":"^5.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"got":"^11.0.0","jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","node-fetch":"^2.6.0","typescript":"^4.6.2","@types/jest":"^27.4.0","@types/node":"^16.11.12","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.3.2"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_1.7.0_1652275680646_0.7505455094775915","host":"s3://npm-registry-packages"}},"1.7.2":{"name":"@clerk/backend-core","version":"1.7.2","license":"MIT","_id":"@clerk/backend-core@1.7.2","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"59c29909ab8e74c1bd3495d54543d48661ec732d","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-1.7.2.tgz","fileCount":499,"integrity":"sha512-0fQKsdEweAPQQthrWR/6KPDWW5vo2VcVETsISdPfIPtAkxoQNJqkyUQDPDHAv6+KKhselMTIC30Uh9+bOkO5lw==","signatures":[{"sig":"MEUCIQCat60coyMDvYi/Ce3xqTYNGKA/uGpgxJ2293n3KARY2AIgTvpQUUPgUzeznSpL7yZ6zSuNbGqVge0uc2Bse74rmlg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":676067,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJifNesACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmrlng//XNp/yXRv06fP1yZIMIGSep9i991Jg5oyNXejqIrLC4oBtZmR\r\n8uHfOh8RPQLpwDu7Rq9NlQK/fHU50/xf430F94k8ft5cuTr8DvjND9A4DU+6\r\n7JzRREP81fv/9ZQbRmObWrbIb6KMzZvqBeBywdFYTdbUdVB5XMUxJ4aiUQGj\r\nTC5lsxmvaCFFZT8e5aC2YAbQkRdtm3a3gjDTcPs5j8ot6DI0aJtqnCS1jElx\r\nw9H/pyAS9Pe+qRL16dJMkP4tKvJCyR8GK+INlrREmv8M/+JcAEbHRo+kGMn0\r\nrdJYVtDNzOFxpxg/l6FHKIHIv/pC26zUKlI3q+I/ubGF00smEpCR/aewOBWc\r\n66NlMb2uprTc7CU3DhnuKI6psUiVI9x7sjsaU0abl68oCygIV0klLa3H79O8\r\nS1DjsoypQzEXW7Meiqvs2BEG/76DspNJwQHGOYyE/3imjYwQFYHlXtq5D8PH\r\nw5qAW16U6OasIYhcYy3fmp2kkslmAnY5iIlPnjWijdTduE1JiuME0lUvSgjm\r\njmaK3Af5CFNKDXojhaFOZkZ0ta8Hhhv6AhHKw3mHhUhguOPH+G7cGeqPwjCg\r\n9x7IhvoYYKBmRIws/W3vZ8mlvLsPGcRiN1M45AQtdlGlYb4eWwwfL8UjZINw\r\n/3ETWYeoGdqQIdjI6QrGjhCkRQlYk+ul/S0=\r\n=Q2hw\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","gitHead":"18c2b8c1238f479cff2018c09a8bfeb2853af387","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.14.2+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.14.2","dependencies":{"tslib":"^2.3.1","@clerk/types":"^2.12.0","query-string":"^7.0.1","camelcase-keys":"^7.0.1","snakecase-keys":"^5.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"got":"^11.0.0","jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","node-fetch":"^2.6.0","typescript":"^4.6.2","@types/jest":"^27.4.0","@types/node":"^16.11.12","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.3.2"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_1.7.2_1652348844214_0.9023333899812127","host":"s3://npm-registry-packages"}},"1.8.0-staging.0":{"name":"@clerk/backend-core","version":"1.8.0-staging.0","license":"MIT","_id":"@clerk/backend-core@1.8.0-staging.0","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"ebd2311a3ce2a610b76969557cdb8f0b0e17792f","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-1.8.0-staging.0.tgz","fileCount":503,"integrity":"sha512-+IMroMHVmZynZ06AzRyJxcy4bHLopXVyOMmU85koEd5lDYoITFPrAlRtD73lyYM8Psgkba4un8WyLjXk6nGkCQ==","signatures":[{"sig":"MEQCICD0L86TKA4BsxdxNI9rRLyoJ9ue/Y/oaJM1ptn396cKAiBKS+O4Jf85xq7TeoCEbfV3zMFnoVe+a+m1FDBo/Jj2Jw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":708459,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJifRO7ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoNzA/+OQAbD3MZdH42VjNGgJ4Qy2Dv2543d6+oajRagIah6zl0fKZx\r\neESiYRJJ73sFsmwbdh+fCltKI95PW5t3d4GiFiKVO97rT2om8nY+dB6Ee2Pb\r\nS0xdfICpUdDzY3VvfxInNCfcaW3VYz5dBHB1l6Jqf1PHBCD46tM2kuhoxrjc\r\nJesWZn5ozGjwwXqfx9B4wcEwEoTDzP5E/DgpTDjVRIEnBiHxu+ynhG9KOJqM\r\nffQPZRX3EgOJUO+Q2npmJYumXl+ZG+7JNIrP1ZyXS8UVV+9GgC71CbnWsdqs\r\nEIdtHZ22npcOCrM4FpMk5pweX0c2zPrehugD35geLNlwazFT4VoYh5YOPNwa\r\nWqC0EycRicYWsGYAXh16niWmU+eo1wdKySwm4feIddVWxaHksEaPbsEmL1hW\r\nxkaCFbKW+hURrJrFAROpgV7PN9YjcdoVY8f/D0tb9Zc/QqSEp5TEVh5RxhBA\r\nViGOzrgaIOimVVaahEj2VXo0TJBl9Z92n1b9xbX8/a1JIZXg0vlX50rAowgt\r\n9gRUrkPWncpuyVmXazxDo3uQk+o36UJhbD8GHNmJxCNy3Mp4U9PlCkuZ7PfE\r\n+lr79lcJfbaFnYAHxQnR1dYZo7LrpGJGaIuOGpjzmoCalTMQ+/stZ4Iro1F5\r\nG1xWL2eXvLvl42lMQcyb8bh02ACXClRD56Q=\r\n=fuS9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev?utm_source=github&utm_medium=clerk_backend_core\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <img src=\"https://images.clerk.dev/static/clerk.svg\" alt=\"Clerk logo\" height=\"50\">\n  </a>\n  <br />\n</p>\n\n# @clerk/backend-code\n\n<div align=\"center\">\n\n[![Chat on Discord](https://img.shields.io/discord/856971667393609759.svg?logo=discord)](https://discord.com/invite/b5rXHjAg7A)\n[![Clerk documentation](https://img.shields.io/badge/documentation-clerk-green.svg)](https://clerk.dev/docs?utm_source=github&utm_medium=clerk_backend_core)\n[![Follow on Twitter](https://img.shields.io/twitter/follow/ClerkDev?style=social)](https://twitter.com/intent/follow?screen_name=ClerkDev)\n\n[Changelog](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/CHANGELOG.md)\n·\n[Report a Bug](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=bug&template=bug_report.md&title=Bug%3A+)\n·\n[Request a Feature](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=Feature%3A+)\n·\n[Ask a Question](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n\n</div>\n\n---\n\n## Overview\n\nThis package provides Clerk Backend API core resources and low-level authentication utilities for JavaScript environments. It is mostly used as the base for other Clerk SDKs.\n\n## Getting Started\n\n### Installation\n\n```sh\nnpm install @clerk/backend-core\n```\n\n### Build\n\nTo build the package locally with the TypeScript compiler, run:\n\n```sh\nnpm run build\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities, without being platform/environment, specific such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendAPI](./src/api/ClerkBackendAPI.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendAPI` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n## Usage\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendAPI](./src/api/ClerkBackendAPI.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://reference.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendAPI.ts#17) implementation.\n\n## Support\n\nYou can get in touch with us in any of the following ways:\n\n- Join our official community [Discord server](https://discord.com/invite/b5rXHjAg7A)\n- Open a [GitHub support issue](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n- Contact options listed on [our Support page](https://clerk.dev/support?utm_source=github&utm_medium=clerk_backend_core)\n\n## Contributing\n\nWe're open to all community contributions! If you'd like to contribute in any way, please read [our contribution guidelines](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/CONTRIBUTING.md).\n\n## Security\n\n`@clerk/backend-core` follows good practices of security, but 100% security cannot be assured.\n\n`@clerk/backend-core` is provided **\"as is\"** without any **warranty**. Use at your own risk.\n\n_For more information and to report security issues, please refer to our [security documentation](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/SECURITY.md)._\n\n## License\n\nThis project is licensed under the **MIT license**.\n\nSee [LICENSE](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/LICENSE) for more information.\n","gitHead":"fd4d055ce86ef4b06ee887594702525a03b84e16","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.14.2+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.14.2","dependencies":{"tslib":"^2.3.1","@clerk/types":"^2.13.0-staging.0","query-string":"^7.0.1","camelcase-keys":"^7.0.1","snakecase-keys":"^5.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"got":"^11.0.0","jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","node-fetch":"^2.6.0","typescript":"^4.6.2","@types/jest":"^27.4.0","@types/node":"^16.11.12","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.3.2"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_1.8.0-staging.0_1652364218819_0.14807625339989516","host":"s3://npm-registry-packages"}},"1.8.0":{"name":"@clerk/backend-core","version":"1.8.0","license":"MIT","_id":"@clerk/backend-core@1.8.0","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"78708be025521075b747a01bb52906e2e47109a4","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-1.8.0.tgz","fileCount":512,"integrity":"sha512-coIwC0DKgwlxu6QDfB0Mf6A94ztNMh9cb7CCDbTju1YJWT5Ke1C5hOTzpNMNjtuR/qoDpOz6U8Lfqf2RMMOgxg==","signatures":[{"sig":"MEUCIQCguvNjHgXFSkh1R1NQ1kqoA+KC5Y+jnH6IZfy0Ubxg3AIgSJS1vj4pj0m5TMzSR3w4qAyry4ud1Pwu9IHyLhiQNWs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":729907,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJifhyiACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr/tw//UOfh2VlRC9E6mVPm8n1apUPOcBu20UZPsdClvNQOYaLgTXpg\r\n/M6gcG+cNkudqhnbyk++6fjMDRKQMKZEBHPcrEW9GJy7ugQr1mVjRv0H6yxr\r\nwh9zuqqDnVAbWO+G59PAeMR8/1IAhU2Y84oM7uZ7TJQX3fOPPs20JAn1E5RS\r\nF4N3LNHWm9+xLArgBhJN1e8uvirbCr0Fr3VhKKBBE2SmqchrJv7+dVZNbuxC\r\nA1LF4FFezLhQJHIvGgQ2WM/ewdYw7H4bWxhqWbR6loptEhd+KqeXUshNeIMN\r\nI7Wn3U+zD0zPjoiZR9csFSwgaM3dEOV7csmgTvTe54wsvGavMuePvA3yvE4U\r\nIvVQoClrGU764QE5+RVnkZWnzo7213aoC8GWg5F/9JS/fVd0XaVdYO9jRqRU\r\na10rLGoyO0MPpR7g2c8Tki5r4+mO9jrfTSEQ7fcFrjeCPnZti7VRcKIFRzrL\r\n7KDj8rJGqYa6AfUWH6zR/LT8FimBL6sBVEnNWliINnwmRe3xiRYXGYpCk1Bq\r\nbKjbUelOmb+YSkGISMpZhbzqXarNg8MdHYY5Xqnse1Qkg20TeNZYnGFMoYIw\r\nzq8K+vuSb201veiz4nZVVpwk8y1Q4KYFzOyCiqZxHrXWGY+Pj/IBFDPC1+uy\r\nYIvFRbRsyp3rYp3Cg56odSgBb0DkHvNWIgY=\r\n=f8WA\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","gitHead":"e39bdd93e4c5f1965980a470c9af444e1ddee68c","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"sokratis","email":"sokratis.vidros@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.13.0+x64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.13.0","dependencies":{"tslib":"^2.3.1","@clerk/types":"^2.13.0","query-string":"^7.0.1","camelcase-keys":"^7.0.1","snakecase-keys":"^5.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"got":"^11.0.0","jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","node-fetch":"^2.6.0","typescript":"^4.6.2","@types/jest":"^27.4.0","@types/node":"^16.11.12","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.3.2"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_1.8.0_1652432033812_0.2252864860189394","host":"s3://npm-registry-packages"}},"1.9.0-staging.0":{"name":"@clerk/backend-core","version":"1.9.0-staging.0","license":"MIT","_id":"@clerk/backend-core@1.9.0-staging.0","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"ccbe0566c0a2cabff39af00a2a52ed31d61cedc2","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-1.9.0-staging.0.tgz","fileCount":504,"integrity":"sha512-G4wlgspRWvcABq3+REjkz89G5B/Kqh77D/NQNSg2Q9bS55+4z26rjlR00SpfrcU8FE43EbenfKJ9kUycdP4gpw==","signatures":[{"sig":"MEQCIFi5xUyE37myZTwNRttdIJm/VECYi4nnLQ4mmYUj8L0yAiBzUUqphnGCEdYBnJjQUdgtDZnRW2Jh51zHZbATngtqcg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":721844,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJignhDACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp6+BAAgi4UN7jzpkOdiKvNKnDLXDeQxMoQAEaBLN4kHoHBRNV+vlay\r\noPL1IPOdKtbdZczvX42JcIN11WxUzwDqDpxrAWzuHWC843CYOlwppvZUszzz\r\nLdr6Pox/XNaiWGZbD0lYJ3qeKizKSczo3e1etZULtRbZjbNNsPEIPCuHFTgp\r\nmyo74tLwbSz0dBKG+VSy9Wo07e0bnFowB9fqQjU8gGslH3VjTTNTiruXpJHr\r\ntVj5vFhZfo1UwvaGOdRb64kV6A1mzHI1J4/DBWaUZW5ML3K6Ml2rV8OW2TmS\r\n+R3EMWy7YzVg29OkcpZIvqv94oQlplmKbJuh4W+x+vS/MeCfTORq0oGnl6Qp\r\nZ+YHbwmtjmRqhyqZjh7Ss51zxnutTFP49CYuyJ0KLxIDXAP68t6XU2y6jHG6\r\ndOZw5YHEUI8Lsc52XCvSZKaadtH0IubD4rKEQuHTf63RJBWI6+jtN4zwLWsZ\r\nBx4g+gfQy9fR1qIG/O1ayKWnE2PBwL65yN/k8LBHsmk43N8ZVkdi9FTNb6PL\r\nTNNBSzV27U9v7jCuauJWWoopXyPCqDzkPjGozra9OceCA6yulT1hJdNwNjHB\r\nkHnmYsqLR34B2x8l+1/3wY7z7t7bMavzTb3emWtCZNi07PgwAm0Xt1tHJn2F\r\ng5tt2F84eG0CbV5MmfUOrw8W31RN2p1Zeas=\r\n=64bG\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev?utm_source=github&utm_medium=clerk_backend_core\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <img src=\"https://images.clerk.dev/static/clerk.svg\" alt=\"Clerk logo\" height=\"50\">\n  </a>\n  <br />\n</p>\n\n# @clerk/backend-code\n\n<div align=\"center\">\n\n[![Chat on Discord](https://img.shields.io/discord/856971667393609759.svg?logo=discord)](https://discord.com/invite/b5rXHjAg7A)\n[![Clerk documentation](https://img.shields.io/badge/documentation-clerk-green.svg)](https://clerk.dev/docs?utm_source=github&utm_medium=clerk_backend_core)\n[![Follow on Twitter](https://img.shields.io/twitter/follow/ClerkDev?style=social)](https://twitter.com/intent/follow?screen_name=ClerkDev)\n\n[Changelog](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/CHANGELOG.md)\n·\n[Report a Bug](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=bug&template=bug_report.md&title=Bug%3A+)\n·\n[Request a Feature](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=Feature%3A+)\n·\n[Ask a Question](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n\n</div>\n\n---\n\n## Overview\n\nThis package provides Clerk Backend API core resources and low-level authentication utilities for JavaScript environments. It is mostly used as the base for other Clerk SDKs.\n\n## Getting Started\n\n### Installation\n\n```sh\nnpm install @clerk/backend-core\n```\n\n### Build\n\nTo build the package locally with the TypeScript compiler, run:\n\n```sh\nnpm run build\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities, without being platform/environment, specific such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendAPI](./src/api/ClerkBackendAPI.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendAPI` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n## Usage\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendAPI](./src/api/ClerkBackendAPI.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://reference.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendAPI.ts#17) implementation.\n\n## Support\n\nYou can get in touch with us in any of the following ways:\n\n- Join our official community [Discord server](https://discord.com/invite/b5rXHjAg7A)\n- Open a [GitHub support issue](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n- Contact options listed on [our Support page](https://clerk.dev/support?utm_source=github&utm_medium=clerk_backend_core)\n\n## Contributing\n\nWe're open to all community contributions! If you'd like to contribute in any way, please read [our contribution guidelines](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/CONTRIBUTING.md).\n\n## Security\n\n`@clerk/backend-core` follows good practices of security, but 100% security cannot be assured.\n\n`@clerk/backend-core` is provided **\"as is\"** without any **warranty**. Use at your own risk.\n\n_For more information and to report security issues, please refer to our [security documentation](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/SECURITY.md)._\n\n## License\n\nThis project is licensed under the **MIT license**.\n\nSee [LICENSE](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/LICENSE) for more information.\n","gitHead":"344d8294c9a8df222739a9b842e555b6556c8192","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.14.2+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.14.2","dependencies":{"tslib":"^2.3.1","@clerk/types":"^2.13.0","query-string":"^7.0.1","camelcase-keys":"^7.0.1","snakecase-keys":"^5.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"got":"^11.0.0","jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","node-fetch":"^2.6.0","typescript":"^4.6.2","@types/jest":"^27.4.0","@types/node":"^16.11.12","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.3.2"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_1.9.0-staging.0_1652717635501_0.34613187612254714","host":"s3://npm-registry-packages"}},"1.9.0-staging.1":{"name":"@clerk/backend-core","version":"1.9.0-staging.1","license":"MIT","_id":"@clerk/backend-core@1.9.0-staging.1","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"6044c94eb01222e507c3fb99debd5939501fce40","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-1.9.0-staging.1.tgz","fileCount":504,"integrity":"sha512-sMhlpgee9kvEQ9O1BRhEwse204PSDOaGkSZjOP+VvuDiP80dEqx4Y4q3HEsmBUzxIMqcrSb6VjknW2ks4ZePMw==","signatures":[{"sig":"MEYCIQDsULGQJ59PIk0UbJEj6xlusC0t48xvUZeu6lu8DTLv1AIhAOpBsxS9C1Lyi070tuOhBRQTpMMx5HcynF29gKKD2uN0","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":722822,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJig4k9ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqcTxAAi/f/tjl0fS9yLFLlLtK/fPee1Qra7kyD9CfDpPyYdMQQ+tEI\r\nEqf7R4CkNReKdk9Q0xLoGvBKtIYcRJf4SKVgx3xWeN4ElOUAjgTAvCq6lovG\r\nG1h0LiKg45oPmb043iFZ8mkjRHa5ZBgBQQ5nAkxiGHfkt9wh8VF498lLm8zB\r\nPtG/1lP1NbJclQYzR2taKCNkwryGnltHafW1U/ieWrPp+FeO5SC3DyMmn6O3\r\nCUwSlJAGxAomjOR/xFBpJ3pTAyxOkYGVxpjt3hTFOD34VLGF2DNC4vM+vL6j\r\najzxSyWnhRA82WOe7Xq2uaXpK1sZLB5oVUK0oqrCeERhXFJqASHbRqW2u5t7\r\naDrfAIgcKsqPff/8nvrIWnMSNlBGITu1TvaN7kR1CZUL5NgOAsSueavnLy0D\r\nFz/BJbS8Vlsk3V/1oGMUgABTMM/fGgJS4B0mo8ei+SCFe4Rc/R6A7mofk/hL\r\n4lfjIZT8QLQ5n018H/Gaz5c4/rCtjt+Q8oLH3hlljt3YRwdKx/9r/ZBamYDB\r\nZOhgFETTeTiwieg16KL7Id1mTu8nY5YZL+nuIhTCA6/iTRdbqP9ogB6T4FJI\r\nk2YP8A1qCihkjWmKkPhYQAQaeoIaYCFfo1uYgWQMPxsWmnDuw9lPa4Aj8BH0\r\n5nbZ24wBaiTEsL8J9Cy5NCca6HXp+ZBeE+Q=\r\n=yb1I\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev?utm_source=github&utm_medium=clerk_backend_core\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <img src=\"https://images.clerk.dev/static/clerk.svg\" alt=\"Clerk logo\" height=\"50\">\n  </a>\n  <br />\n</p>\n\n# @clerk/backend-code\n\n<div align=\"center\">\n\n[![Chat on Discord](https://img.shields.io/discord/856971667393609759.svg?logo=discord)](https://discord.com/invite/b5rXHjAg7A)\n[![Clerk documentation](https://img.shields.io/badge/documentation-clerk-green.svg)](https://clerk.dev/docs?utm_source=github&utm_medium=clerk_backend_core)\n[![Follow on Twitter](https://img.shields.io/twitter/follow/ClerkDev?style=social)](https://twitter.com/intent/follow?screen_name=ClerkDev)\n\n[Changelog](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/CHANGELOG.md)\n·\n[Report a Bug](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=bug&template=bug_report.md&title=Bug%3A+)\n·\n[Request a Feature](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=Feature%3A+)\n·\n[Ask a Question](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n\n</div>\n\n---\n\n## Overview\n\nThis package provides Clerk Backend API core resources and low-level authentication utilities for JavaScript environments. It is mostly used as the base for other Clerk SDKs.\n\n## Getting Started\n\n### Installation\n\n```sh\nnpm install @clerk/backend-core\n```\n\n### Build\n\nTo build the package locally with the TypeScript compiler, run:\n\n```sh\nnpm run build\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities, without being platform/environment, specific such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendAPI](./src/api/ClerkBackendAPI.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendAPI` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n## Usage\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendAPI](./src/api/ClerkBackendAPI.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://reference.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendAPI.ts#17) implementation.\n\n## Support\n\nYou can get in touch with us in any of the following ways:\n\n- Join our official community [Discord server](https://discord.com/invite/b5rXHjAg7A)\n- Open a [GitHub support issue](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n- Contact options listed on [our Support page](https://clerk.dev/support?utm_source=github&utm_medium=clerk_backend_core)\n\n## Contributing\n\nWe're open to all community contributions! If you'd like to contribute in any way, please read [our contribution guidelines](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/CONTRIBUTING.md).\n\n## Security\n\n`@clerk/backend-core` follows good practices of security, but 100% security cannot be assured.\n\n`@clerk/backend-core` is provided **\"as is\"** without any **warranty**. Use at your own risk.\n\n_For more information and to report security issues, please refer to our [security documentation](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/SECURITY.md)._\n\n## License\n\nThis project is licensed under the **MIT license**.\n\nSee [LICENSE](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/LICENSE) for more information.\n","gitHead":"9668f898a556a38da442a7eb3c6be9c872de798e","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.14.2+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.14.2","dependencies":{"tslib":"^2.3.1","@clerk/types":"^2.14.0-staging.0","query-string":"^7.0.1","camelcase-keys":"^7.0.1","snakecase-keys":"^5.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"got":"^11.0.0","jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","node-fetch":"^2.6.0","typescript":"^4.6.2","@types/jest":"^27.4.0","@types/node":"^16.11.12","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.3.2"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_1.9.0-staging.1_1652787517218_0.8921160358370064","host":"s3://npm-registry-packages"}},"1.9.0-staging.2":{"name":"@clerk/backend-core","version":"1.9.0-staging.2","license":"MIT","_id":"@clerk/backend-core@1.9.0-staging.2","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"34bbd2cc90b05d320c7b14482236d115bd2749f5","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-1.9.0-staging.2.tgz","fileCount":516,"integrity":"sha512-3lfMrGBYUlgvTGQW5Rn1bJ6bzcs4Z5TRGNIt1+UUwmR6b6FFJzuNmrV6BE0CyXpBsOKn2FTI2e1U61cOhsZNJQ==","signatures":[{"sig":"MEQCIE3izVd3rojgnmv4VPmwbHg5ZyOjQ+1cMZQ64q3IsBKlAiAYTs9pDrQ3pfEctu5tNcNXFdSFUv+LMcsGxDCIHZEIWw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":756618,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJihLcZACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmpiww/+J/D0qXZk0I0aN9lD5A4bI2y3axSkF0SYU/lzLTapk1ifnB+t\r\nlOp8sRFLnVNJa4W+Ra30LbG+H8SZnzi6tIDp8AgrHyskVFmKRmvQs+SN+V1L\r\nZdourBceKP7FmHUdvgruorzJipz0zNH5rIQ6GX/OcuAukm2j1Pkrxag0JHPU\r\nPnKmv3fqDmaKCe7FWcnL6G7664qN+f5+kTj7SSSmXj1DvRstllu9TsBuRQ/K\r\nux/EcR4f2Gm9qry6diHw5heulug9Pj1HMEKr/gn45jsSF8vkjnP+nU7sFXqr\r\nhPJCu7WVx1l1XapvOX5DXqIuZ7d8rX5G31+B70GyhNKqagO5LOxOF+xisM5a\r\nZe6E7AP2j8YJIVsb8ryvlDRY75/3WESZoYYzR4RhbxP1WDfSPybv5/Ldbs5a\r\n7LqExfGQFp70aT7rD73Y5eMod67ZcfNXFiMTAHbB0+KhieI+WiZNWMtZWhDY\r\n7iZ+jr+cMa34ZK4954OgAE6QokXNxhu4VavwGtZOqC3Ezh5YJ4bBo5xA1dj/\r\nkiM79U7+HZFZGnsppZ3a94B2GBe6b2+WBdz4kqkixY8Tz8LB1qX1UbxSxu0+\r\nj9/zhun3Zjg/CFk866j3AvnD8fFfCFVI1HBjEVCHa/+cFBBc6pPISeWhUcg2\r\nt8EwCIckumGJyp1n5vibpkmlucC9XZOfoRE=\r\n=zGKb\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev?utm_source=github&utm_medium=clerk_backend_core\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <img src=\"https://images.clerk.dev/static/clerk.svg\" alt=\"Clerk logo\" height=\"50\">\n  </a>\n  <br />\n</p>\n\n# @clerk/backend-code\n\n<div align=\"center\">\n\n[![Chat on Discord](https://img.shields.io/discord/856971667393609759.svg?logo=discord)](https://discord.com/invite/b5rXHjAg7A)\n[![Clerk documentation](https://img.shields.io/badge/documentation-clerk-green.svg)](https://clerk.dev/docs?utm_source=github&utm_medium=clerk_backend_core)\n[![Follow on Twitter](https://img.shields.io/twitter/follow/ClerkDev?style=social)](https://twitter.com/intent/follow?screen_name=ClerkDev)\n\n[Changelog](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/CHANGELOG.md)\n·\n[Report a Bug](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=bug&template=bug_report.md&title=Bug%3A+)\n·\n[Request a Feature](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=Feature%3A+)\n·\n[Ask a Question](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n\n</div>\n\n---\n\n## Overview\n\nThis package provides Clerk Backend API core resources and low-level authentication utilities for JavaScript environments. It is mostly used as the base for other Clerk SDKs.\n\n## Getting Started\n\n### Installation\n\n```sh\nnpm install @clerk/backend-core\n```\n\n### Build\n\nTo build the package locally with the TypeScript compiler, run:\n\n```sh\nnpm run build\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities, without being platform/environment, specific such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendAPI](./src/api/ClerkBackendAPI.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendAPI` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n## Usage\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendAPI](./src/api/ClerkBackendAPI.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://reference.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendAPI.ts#17) implementation.\n\n## Support\n\nYou can get in touch with us in any of the following ways:\n\n- Join our official community [Discord server](https://discord.com/invite/b5rXHjAg7A)\n- Open a [GitHub support issue](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n- Contact options listed on [our Support page](https://clerk.dev/support?utm_source=github&utm_medium=clerk_backend_core)\n\n## Contributing\n\nWe're open to all community contributions! If you'd like to contribute in any way, please read [our contribution guidelines](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/CONTRIBUTING.md).\n\n## Security\n\n`@clerk/backend-core` follows good practices of security, but 100% security cannot be assured.\n\n`@clerk/backend-core` is provided **\"as is\"** without any **warranty**. Use at your own risk.\n\n_For more information and to report security issues, please refer to our [security documentation](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/SECURITY.md)._\n\n## License\n\nThis project is licensed under the **MIT license**.\n\nSee [LICENSE](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/LICENSE) for more information.\n","gitHead":"1d12a4da828792689ecd366f0d2662b7638de80c","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"sokratis","email":"sokratis.vidros@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.13.0+x64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.13.0","dependencies":{"tslib":"^2.3.1","@clerk/types":"^2.14.0-staging.1","query-string":"^7.0.1","camelcase-keys":"^7.0.1","snakecase-keys":"^5.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"got":"^11.0.0","jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","node-fetch":"^2.6.0","typescript":"^4.6.2","@types/jest":"^27.4.0","@types/node":"^16.11.12","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.3.2"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_1.9.0-staging.2_1652864793275_0.09009949830322994","host":"s3://npm-registry-packages"}},"1.9.0-staging.3":{"name":"@clerk/backend-core","version":"1.9.0-staging.3","license":"MIT","_id":"@clerk/backend-core@1.9.0-staging.3","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"2e8c7197fd6a618a9ffa0cb8e861e17ae421eac7","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-1.9.0-staging.3.tgz","fileCount":516,"integrity":"sha512-zhsYMIdBB5hBiOIH/Na4N2nuwSLlEWtMe9JO8LmsAdNExgKDTKhe5GI0iaQtvUmD72JEjNlfhinwOuAXVMcISg==","signatures":[{"sig":"MEYCIQCT9ic1QMpcev636TsX1G+PMC0LUj/jAT/RhpKN/eV+9AIhAMTexrMN/nrRABZC/GsytD69XvqdDdfWNgt0cG08Nc+9","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":759597,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJihgKOACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq38hAAgJBEvBFr2g1NNy0v4/kgctglgEGgNSlUmA1s0o7j05HCK7uK\r\nEr12bkXrAL5wOefyboisPLuL+2TdDGp1fThOmrO7/u14UA/8YccftRAyJFQu\r\nynAZ4cWB76MO3hxjjT8PoAF4wX3vpAyu8DzUDfRBX+88fdu7ZcPiINc0wiBJ\r\n8cq/uV8II+YcFrCo8t99doT1rgIYejKNmGU7zeq3yWmINf2Ei6ds5yy2TmWL\r\nOKL/UdP05m8XrqXZWqqzVqoVZ36mHPaxNhJZCDd1oOLdDUUaGndIN9PSp25Z\r\nn12RPkJIvD7sZtYfE1CaavAq642X5DE03SUyqw9CCbNfAmHmYvAehNS2kZUa\r\noy/1r/uYS/6BniuFt46vpO6rGGpmJgFVCVPNBBZE6CWb0IwdYr6Oy7JX4G8r\r\nCfHwQFl08z8RP5LUS9XYS+DrSfpri7ygcCuLJZD8A1xyagsK6Kr7V6BNkhPm\r\nhU0D1LU/Mz1BzmM6JbIZRnRhJ8584xxT0lpaB0AmHDbbPjzow3rgjVJLWBmQ\r\n+OKyHnmqL5XEGOxckCLmtMp1IJCLYaPN56HcuL27SkxWyodyjXzunvvmVWOY\r\nVBzHEy/Nj4XqjbNLdfzuWBnIWw4wIXJAw9L4HKwkE8jDN+j3VD4tb37Rua3p\r\nIQc69jUHMNr3NSFyudDgy0hg7ZVaJKQZZZE=\r\n=rin2\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev?utm_source=github&utm_medium=clerk_backend_core\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <img src=\"https://images.clerk.dev/static/clerk.svg\" alt=\"Clerk logo\" height=\"50\">\n  </a>\n  <br />\n</p>\n\n# @clerk/backend-code\n\n<div align=\"center\">\n\n[![Chat on Discord](https://img.shields.io/discord/856971667393609759.svg?logo=discord)](https://discord.com/invite/b5rXHjAg7A)\n[![Clerk documentation](https://img.shields.io/badge/documentation-clerk-green.svg)](https://clerk.dev/docs?utm_source=github&utm_medium=clerk_backend_core)\n[![Follow on Twitter](https://img.shields.io/twitter/follow/ClerkDev?style=social)](https://twitter.com/intent/follow?screen_name=ClerkDev)\n\n[Changelog](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/CHANGELOG.md)\n·\n[Report a Bug](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=bug&template=bug_report.md&title=Bug%3A+)\n·\n[Request a Feature](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=Feature%3A+)\n·\n[Ask a Question](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n\n</div>\n\n---\n\n## Overview\n\nThis package provides Clerk Backend API core resources and low-level authentication utilities for JavaScript environments. It is mostly used as the base for other Clerk SDKs.\n\n## Getting Started\n\n### Installation\n\n```sh\nnpm install @clerk/backend-core\n```\n\n### Build\n\nTo build the package locally with the TypeScript compiler, run:\n\n```sh\nnpm run build\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities, without being platform/environment, specific such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendAPI](./src/api/ClerkBackendAPI.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendAPI` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n## Usage\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendAPI](./src/api/ClerkBackendAPI.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://reference.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendAPI.ts#17) implementation.\n\n## Support\n\nYou can get in touch with us in any of the following ways:\n\n- Join our official community [Discord server](https://discord.com/invite/b5rXHjAg7A)\n- Open a [GitHub support issue](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n- Contact options listed on [our Support page](https://clerk.dev/support?utm_source=github&utm_medium=clerk_backend_core)\n\n## Contributing\n\nWe're open to all community contributions! If you'd like to contribute in any way, please read [our contribution guidelines](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/CONTRIBUTING.md).\n\n## Security\n\n`@clerk/backend-core` follows good practices of security, but 100% security cannot be assured.\n\n`@clerk/backend-core` is provided **\"as is\"** without any **warranty**. Use at your own risk.\n\n_For more information and to report security issues, please refer to our [security documentation](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/SECURITY.md)._\n\n## License\n\nThis project is licensed under the **MIT license**.\n\nSee [LICENSE](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/LICENSE) for more information.\n","gitHead":"d9e838f0ad446a6ff95dc9b71b41206b4a3782ae","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"sokratis","email":"sokratis.vidros@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.13.0+x64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.13.0","dependencies":{"tslib":"^2.3.1","@clerk/types":"^2.14.0-staging.1","query-string":"^7.0.1","camelcase-keys":"^7.0.1","snakecase-keys":"^5.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"got":"^11.0.0","jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","node-fetch":"^2.6.0","typescript":"^4.6.2","@types/jest":"^27.4.0","@types/node":"^16.11.12","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.3.2"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_1.9.0-staging.3_1652949646369_0.6227891130727425","host":"s3://npm-registry-packages"}},"1.9.0-staging.4":{"name":"@clerk/backend-core","version":"1.9.0-staging.4","license":"MIT","_id":"@clerk/backend-core@1.9.0-staging.4","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"19015c7ebf820978419ce3d0cae0dec60d2c5dbd","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-1.9.0-staging.4.tgz","fileCount":518,"integrity":"sha512-WSo6On4r89O8qydJQ32wITcKkY3GiY2Dwn8vnHEqmCo05qQ4HzQMwfjEmDnvGhyMr6ORVZeOjqzUxhmcoLXF3w==","signatures":[{"sig":"MEYCIQDP2jEZZknWNqrGot78xojngcijwuKLDmwtErstRbA7pgIhANppKOnEJkK33pe4uBWSXoG0USCzeiGUUioKGL92kp9v","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":752367,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJih1TFACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqUABAAjIQVGit5LVxwBJ5+hnNgCZN2VxsSeU+zkwjCcv20yEjJqz3i\r\nF4g1KP1e3hxY7dPNbmnHUxIw/Cr6y9vwaTXgguy4KMJBG2OshgFux2PXL+pZ\r\ns3he2oGDeD/zOxFQs75x/22jXDLidIZcdwQb0HieJ08YuyGl8FtpI+WLVKv6\r\nnN+dq/RykP/0twpd+h/dtBi01xqSdYjBsvk8B4iIfzzHU8bJCEDRllmPj5Wl\r\n8Vk8y0yjr4g7J6TWEkqDnUTQZKsQr6BngcnpG9MNZCs+/UUNQTQdxxVMelvC\r\nJwLOBSZUWk1jRHcdbRDJyrOisgfPWn73QHYTKA6S75+xQxXbYV3Jks3+Es5Z\r\nr0cE14VRae2O1W4sh6wHuaovfwXUzGDy/kRAXvGKe1ReDwf6bOVfTPpN7A/G\r\n0n8IJsaccOiKFcQkQdUZ0j3T1+AM0Z5Bk36KxSMvZDEE8dFTup2Yl9NB3v9x\r\nSWJ1a1odEp+Uapwwozxi5UcAupViRtQQ68WeJMzXz6NaHlL11pbD9euPuqrE\r\nTislpb9Rb9dPIQkC0OoEPN+eGmKKroc8ySOG32cCJK+3HqR6Z8xHHKhSzTxF\r\nRW6bomVd4J/+mlh5F0Mks2Tq/QBDYPKlvV1lwN0ErCNwtcKsv669sOImdSO3\r\nCQykVFr97L2vWHcin6xIUoPxPx7mjJh/4wg=\r\n=QP35\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev?utm_source=github&utm_medium=clerk_backend_core\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <img src=\"https://images.clerk.dev/static/clerk.svg\" alt=\"Clerk logo\" height=\"50\">\n  </a>\n  <br />\n</p>\n\n# @clerk/backend-code\n\n<div align=\"center\">\n\n[![Chat on Discord](https://img.shields.io/discord/856971667393609759.svg?logo=discord)](https://discord.com/invite/b5rXHjAg7A)\n[![Clerk documentation](https://img.shields.io/badge/documentation-clerk-green.svg)](https://clerk.dev/docs?utm_source=github&utm_medium=clerk_backend_core)\n[![Follow on Twitter](https://img.shields.io/twitter/follow/ClerkDev?style=social)](https://twitter.com/intent/follow?screen_name=ClerkDev)\n\n[Changelog](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/CHANGELOG.md)\n·\n[Report a Bug](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=bug&template=bug_report.md&title=Bug%3A+)\n·\n[Request a Feature](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=Feature%3A+)\n·\n[Ask a Question](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n\n</div>\n\n---\n\n## Overview\n\nThis package provides Clerk Backend API core resources and low-level authentication utilities for JavaScript environments. It is mostly used as the base for other Clerk SDKs.\n\n## Getting Started\n\n### Installation\n\n```sh\nnpm install @clerk/backend-core\n```\n\n### Build\n\nTo build the package locally with the TypeScript compiler, run:\n\n```sh\nnpm run build\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities, without being platform/environment, specific such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendAPI](./src/api/ClerkBackendAPI.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendAPI` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n## Usage\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendAPI](./src/api/ClerkBackendAPI.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://reference.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendAPI.ts#17) implementation.\n\n## Support\n\nYou can get in touch with us in any of the following ways:\n\n- Join our official community [Discord server](https://discord.com/invite/b5rXHjAg7A)\n- Open a [GitHub support issue](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n- Contact options listed on [our Support page](https://clerk.dev/support?utm_source=github&utm_medium=clerk_backend_core)\n\n## Contributing\n\nWe're open to all community contributions! If you'd like to contribute in any way, please read [our contribution guidelines](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/CONTRIBUTING.md).\n\n## Security\n\n`@clerk/backend-core` follows good practices of security, but 100% security cannot be assured.\n\n`@clerk/backend-core` is provided **\"as is\"** without any **warranty**. Use at your own risk.\n\n_For more information and to report security issues, please refer to our [security documentation](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/SECURITY.md)._\n\n## License\n\nThis project is licensed under the **MIT license**.\n\nSee [LICENSE](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/LICENSE) for more information.\n","gitHead":"bb11ec9d1aa30809a1363a6cc1abc4af23a007ac","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"sokratis","email":"sokratis.vidros@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.13.0+x64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.13.0","dependencies":{"tslib":"^2.3.1","@clerk/types":"^2.14.0-staging.1","query-string":"^7.0.1","snakecase-keys":"^5.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"got":"^11.0.0","jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","node-fetch":"^2.6.0","typescript":"^4.6.2","@types/jest":"^27.4.0","@types/node":"^16.11.12","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.3.2"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_1.9.0-staging.4_1653036229212_0.03291284028750474","host":"s3://npm-registry-packages"}},"1.9.0":{"name":"@clerk/backend-core","version":"1.9.0","license":"MIT","_id":"@clerk/backend-core@1.9.0","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"37e15983ec6af6301ee4859e92bdee5a146fc01a","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-1.9.0.tgz","fileCount":521,"integrity":"sha512-2rW546QJcROAIR01jpqwEfjXrokFxPl0p2YZUyCrj1Ali915rDhbKvvrVxtnxK2/3QQTJl5PLq0ICsevPuLAeA==","signatures":[{"sig":"MEYCIQChcPz4Dkh0xffo2d9ct4oZRjwXG86VL8uVk+ScIfgqdwIhAIOcehP5Umn8y9XCa5XmgOKsAL5gOkq67lS40VOE09lz","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":764214,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJih3oMACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrBWQ//Xx3mienbnS0VAPySbz7kX3fxjpARIMeMQTTzdTOuoAorwkfZ\r\nuUbBpowwNRMDLyc8Jzgu8E7TYZSHUiXtDHDRiLBJjCRxUsjcOGmERoATrJKQ\r\nPMF4Faagb0bEf1rq+PcliZFNlSgQng8cV5fylnBXWJdZmMvjfWf0kmiaUMxM\r\n9ul7RRHQvs8ewkKYtR0a4YvfnDiGbRzKLejlOpMPDCwSfQ1a+/zF4upqn9px\r\nVU+n/cvByN4TLt660aBEMUuml5LwsU5AGcMBw6MGE+1ecAxMl7q+BycCJUyp\r\n4x/wKLOuwwACR3KmPuwysn0uRoEYGq6IRQiZRVi26wENT5bxuOt4molvLYqu\r\n97g4PTTnx4C4UiDHfLuQQYC4LRBAKyPYin0QfSULlRlVwFwxmGxZa4KJPz8z\r\n6ybvGHHt48jnxLIIPYEbrGNu7zd6kKXKt2i1seP6ddiOdUZ6OlCB3RbMCzAJ\r\nKphOtqPEZkLNEetgYpsTVFkelxbtpoikGXO9opBE/9qkNvVeLyHLYOa/m1TE\r\nmSjQ9xQ1zREjXR84O0rl0Kas0AYwL5WaLfyXNMy+0IcTBvTF4x7VttEzgYBT\r\n8dpeJQLcOOLTSeCVXoQ4xFs2HASrc4XzYwsEVg9QS7Nt+3YTpOVluPVPVezK\r\nvCxyWvhNKMVZm4Myde723UZGR+Hpcrajjpw=\r\n=u7OO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","gitHead":"4f06d93b006ca0aa731dbb52c5854da6b7d9ecdd","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"sokratis","email":"sokratis.vidros@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.13.0+x64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.13.0","dependencies":{"tslib":"^2.3.1","@clerk/types":"^2.14.0","query-string":"^7.0.1","snakecase-keys":"^5.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"got":"^11.0.0","jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","node-fetch":"^2.6.0","typescript":"^4.6.2","@types/jest":"^27.4.0","@types/node":"^16.11.12","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.3.2"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_1.9.0_1653045772059_0.8438136746550122","host":"s3://npm-registry-packages"}},"1.9.1-staging.0":{"name":"@clerk/backend-core","version":"1.9.1-staging.0","license":"MIT","_id":"@clerk/backend-core@1.9.1-staging.0","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"8a1f0308956779a9f755c78c679468d798649e12","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-1.9.1-staging.0.tgz","fileCount":524,"integrity":"sha512-bxw97clVLnVIkyY8+KVsdCAkTOONtYoPuula+A231l31m5eGqdgORbWXhwpBR1hWkLVDRs8hTxV49VGN3QtWXA==","signatures":[{"sig":"MEQCIACbklMWdFs+1ld7W3tPFKMuYwbnNaxPNHFxFJRmawLZAiA90Ol13n9+oQE+tIXdNxsfEPusRjyPkeGim6en0UcACA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":765336,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJilduXACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr9DxAAl/RME0BCaOCCj3GMt/uZ1FfFSbA4scdg/4lE3emgjqwnmWBE\r\ni9rUzIScCaoNCiAB6XCTGGw8z+Yg2VRJaDi8Cc3aBKo8rXtjFBtu+0hh5RWT\r\nM32wbSYIqKjXg0BSytF4JH2YNHMAvrcwUlOjrWOd9IfUkv0XyGL9tK2WpFQ/\r\nPim9Jb75Xy4wO6bHTB/MdpT1igpbtGR7xzYI9nLmnph25c46bNCdNYd+32ke\r\nKwUONCMkHLoV/3CYREmCWy0Ae/pFFv0BVjoDsuqe905ChBnB0f3XIk8PjoHa\r\nqnAfLZshuSzvh7/YLyurbkphcYG1CFDzYQnr5T/zCUcm5lS4QYjE2A+3Bugc\r\n5IDWuXek4la+fVvt1EIBXBQxEyuTlO7WlFlRVuURJWdZo3AEa4lPiI4K/VwV\r\nlL7XXe/rbF6YTBNvtYrNrv2SH0iEgBK2RpctqgC/eZvFPfVapMg15OBpyx4f\r\nAsXpz6+4RK82uGUBM6Cw2Sk+fV4WNQljrs2D5KVI6sMDrLe/M7d/qqhQKHps\r\nHNi2KWDw9BpmuvjoqjUT3uk4KbuXAk8ZqCyD96MvM/cm7Pez7nJ13Z6lvgqD\r\nWE/9aVQjYDpjooe4vqj2RjscR/L4AUvCOawSVTXBGxhav/+VUg1QoPHH5fWv\r\n3lRVnNEwVooHtUTNcev42CVpimtk//DxTPA=\r\n=pbzm\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev?utm_source=github&utm_medium=clerk_backend_core\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <img src=\"https://images.clerk.dev/static/clerk.svg\" alt=\"Clerk logo\" height=\"50\">\n  </a>\n  <br />\n</p>\n\n# @clerk/backend-code\n\n<div align=\"center\">\n\n[![Chat on Discord](https://img.shields.io/discord/856971667393609759.svg?logo=discord)](https://discord.com/invite/b5rXHjAg7A)\n[![Clerk documentation](https://img.shields.io/badge/documentation-clerk-green.svg)](https://clerk.dev/docs?utm_source=github&utm_medium=clerk_backend_core)\n[![Follow on Twitter](https://img.shields.io/twitter/follow/ClerkDev?style=social)](https://twitter.com/intent/follow?screen_name=ClerkDev)\n\n[Changelog](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/CHANGELOG.md)\n·\n[Report a Bug](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=bug&template=bug_report.md&title=Bug%3A+)\n·\n[Request a Feature](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=Feature%3A+)\n·\n[Ask a Question](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n\n</div>\n\n---\n\n## Overview\n\nThis package provides Clerk Backend API core resources and low-level authentication utilities for JavaScript environments. It is mostly used as the base for other Clerk SDKs.\n\n## Getting Started\n\n### Installation\n\n```sh\nnpm install @clerk/backend-core\n```\n\n### Build\n\nTo build the package locally with the TypeScript compiler, run:\n\n```sh\nnpm run build\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities, without being platform/environment, specific such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendAPI](./src/api/ClerkBackendAPI.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendAPI` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n## Usage\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendAPI](./src/api/ClerkBackendAPI.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://reference.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendAPI.ts#17) implementation.\n\n## Support\n\nYou can get in touch with us in any of the following ways:\n\n- Join our official community [Discord server](https://discord.com/invite/b5rXHjAg7A)\n- Open a [GitHub support issue](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n- Contact options listed on [our Support page](https://clerk.dev/support?utm_source=github&utm_medium=clerk_backend_core)\n\n## Contributing\n\nWe're open to all community contributions! If you'd like to contribute in any way, please read [our contribution guidelines](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/CONTRIBUTING.md).\n\n## Security\n\n`@clerk/backend-core` follows good practices of security, but 100% security cannot be assured.\n\n`@clerk/backend-core` is provided **\"as is\"** without any **warranty**. Use at your own risk.\n\n_For more information and to report security issues, please refer to our [security documentation](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/SECURITY.md)._\n\n## License\n\nThis project is licensed under the **MIT license**.\n\nSee [LICENSE](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/LICENSE) for more information.\n","gitHead":"8c65c7e07a1ceda423e5615851d61a81ba6645c9","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"igneel64","email":"p.perlepes@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.13.2+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.13.2","dependencies":{"tslib":"^2.3.1","@clerk/types":"^2.15.0-staging.0","query-string":"^7.0.1","snakecase-keys":"^5.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"got":"^11.0.0","jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","node-fetch":"^2.6.0","typescript":"^4.6.4","@types/jest":"^27.4.0","@types/node":"^16.11.12","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.3.2"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_1.9.1-staging.0_1653988246823_0.8714412942471936","host":"s3://npm-registry-packages"}},"1.9.1-staging.1":{"name":"@clerk/backend-core","version":"1.9.1-staging.1","license":"MIT","_id":"@clerk/backend-core@1.9.1-staging.1","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"f71d9009de3ee7a0d2515b4f97ad54ba70e5dbd1","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-1.9.1-staging.1.tgz","fileCount":524,"integrity":"sha512-PZkXnrFS08NQvjsBWYVhzQx+z6OCTMz5xj5HS3JRA53qm/o/LOClfGfX0qzrZzuybsSmtfEIPPiMAgdB1AaUIQ==","signatures":[{"sig":"MEYCIQDLeGDJy5zCUYulpwMFE/2WlgBPUWqBLcn8CEXY4FAgRgIhAMFBFk5JVBog2fP3UtpLilCeDAO+nyoELEzkmewp6D4G","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":765555,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJil4MLACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrQARAAhWgCVA2D6L59ZKMHWLkMVjSLfcqrUML0tFDk7h9WQfPLzU6k\r\n0NOpa2T0XFHgu2zhfaDt5tIkU9+IApMUQcZyx8bvgNV3KA3x8t28NMnaZSJJ\r\nely/ZnUsQITLHbhk0oPBf3N8k0PIrvyfOcdhQBckW8l2nwWC/cZgNz4tKZ9I\r\nkNKrEZ6nvmOk3FmmmxX2aTaqUIR/2AQU71tDxtX5e+MepBssK5PKNG/oaBqE\r\niR4MWeXM94RuI+Hyq60dUTnI4wldBr19J9wnJfbSb/DVRfLi5D/nS6K8fliR\r\nmYBaFKl3tynmXs4JOhhk6eU3VXOZI+HgYwKD1BiCbLT+OfnAMHHrNkkN7rfd\r\nxhxda7z8tyjZz/a0bMhPL2Pu4e2HFEJjttP0lmOAj8P4048+SLErHGVPM/Pd\r\nm32PWBSlCBcs/rpJ5FnsTc+4Bc4WNi/ZZv61hRM8eyU+/F7m+YWyC4rW/9wa\r\nk+3ee5KeFZr2EukEgaRnqDz84jSwwpDya+oX6JefR1yMYNy0QzJ8OBITLLrA\r\nvEHIBO3cLj+WqBm4BHoRK77KuU4Ayj4+93SFx7hv6ONkZcVyaxYxQ6lbQOCC\r\nx9Z/DlzEph6gQhG/JhOEN+ZbJvG88OkMVIXhbmWelwehJ8azgntuzEDln3VC\r\nmCQ1PdRr13yUlBzC2clFHWBRM70W3THY3HI=\r\n=HJFL\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev?utm_source=github&utm_medium=clerk_backend_core\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <img src=\"https://images.clerk.dev/static/clerk.svg\" alt=\"Clerk logo\" height=\"50\">\n  </a>\n  <br />\n</p>\n\n# @clerk/backend-code\n\n<div align=\"center\">\n\n[![Chat on Discord](https://img.shields.io/discord/856971667393609759.svg?logo=discord)](https://discord.com/invite/b5rXHjAg7A)\n[![Clerk documentation](https://img.shields.io/badge/documentation-clerk-green.svg)](https://clerk.dev/docs?utm_source=github&utm_medium=clerk_backend_core)\n[![Follow on Twitter](https://img.shields.io/twitter/follow/ClerkDev?style=social)](https://twitter.com/intent/follow?screen_name=ClerkDev)\n\n[Changelog](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/CHANGELOG.md)\n·\n[Report a Bug](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=bug&template=bug_report.md&title=Bug%3A+)\n·\n[Request a Feature](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=Feature%3A+)\n·\n[Ask a Question](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n\n</div>\n\n---\n\n## Overview\n\nThis package provides Clerk Backend API core resources and low-level authentication utilities for JavaScript environments. It is mostly used as the base for other Clerk SDKs.\n\n## Getting Started\n\n### Installation\n\n```sh\nnpm install @clerk/backend-core\n```\n\n### Build\n\nTo build the package locally with the TypeScript compiler, run:\n\n```sh\nnpm run build\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities, without being platform/environment, specific such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendAPI](./src/api/ClerkBackendAPI.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendAPI` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n## Usage\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendAPI](./src/api/ClerkBackendAPI.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://reference.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendAPI.ts#17) implementation.\n\n## Support\n\nYou can get in touch with us in any of the following ways:\n\n- Join our official community [Discord server](https://discord.com/invite/b5rXHjAg7A)\n- Open a [GitHub support issue](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n- Contact options listed on [our Support page](https://clerk.dev/support?utm_source=github&utm_medium=clerk_backend_core)\n\n## Contributing\n\nWe're open to all community contributions! If you'd like to contribute in any way, please read [our contribution guidelines](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/CONTRIBUTING.md).\n\n## Security\n\n`@clerk/backend-core` follows good practices of security, but 100% security cannot be assured.\n\n`@clerk/backend-core` is provided **\"as is\"** without any **warranty**. Use at your own risk.\n\n_For more information and to report security issues, please refer to our [security documentation](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/SECURITY.md)._\n\n## License\n\nThis project is licensed under the **MIT license**.\n\nSee [LICENSE](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/LICENSE) for more information.\n","gitHead":"358d11f005d7649ec899add9a9acab532cba59e4","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"igneel64","email":"p.perlepes@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.13.2+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.13.2","dependencies":{"tslib":"^2.3.1","@clerk/types":"^2.15.0-staging.1","query-string":"^7.0.1","snakecase-keys":"^5.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"got":"^11.0.0","jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","node-fetch":"^2.6.0","typescript":"^4.6.4","@types/jest":"^27.4.0","@types/node":"^16.11.12","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.3.2"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_1.9.1-staging.1_1654096651316_0.949152309748402","host":"s3://npm-registry-packages"}},"1.9.1-staging.2":{"name":"@clerk/backend-core","version":"1.9.1-staging.2","license":"MIT","_id":"@clerk/backend-core@1.9.1-staging.2","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"8eb197d79c89e4fb26b0e61ffedaad81ca0133c7","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-1.9.1-staging.2.tgz","fileCount":629,"integrity":"sha512-3un++KMF/f+7pExk9z4AQAr3vJu2WcmCJUKunQZweV+VFbgYWyE9FZH0tP9dHTakENr7cRQ537UVWKXduK1nsA==","signatures":[{"sig":"MEUCIQC30Yn8IZeFoP//AUw+Vf34EDTWxmMes2tYNOPWK2DITwIgHSLMfvieX5dB47uoT7sa3oHTSxdN45mS2Ok26vrnvc4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":828718,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJimHvuACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqe8A/9GVEIGimFhIQWBpSJ0yv2sB+ja4klWJc4wYUU/wEZg1S91ALW\r\n7UxWk+ciwrMPe3WSm14hw1pR3mvK1FTdKk1L5xnT1ffrpdmnuG3oksZw39kd\r\n9L1Va1ClbKZt8eOkIghJWQDu6inAXkgpQs5brKV59skvqF5g+btCo2arHqu6\r\n6aXc8kRFVxCenPejlSSv/YHNN4fcG5u75okvj1BlgGDWXGFY9gwmmaV5yQKm\r\nLaAEklijZdm4uR0ijjT/NNNB+u4yuxkRKcvkegyk1nyW5wNirJe9T6ItvIXS\r\ntYnLAO6QwEpnbjKrjl/S6ymw7zRrzhYxorarbWWEzc68Zr7tCPAQEjCK/YMV\r\n4ZUMJjoj73GvrwxXj7iUGyZGmIeDo7HNY5/QjuUfnhmGP0jIWmQBtLtFQJWz\r\nIYNUqkLup/brlojovhMTGjkDc46pxcETMIn9RbvlZkvhCzPaaoJloRKtX6WC\r\n2fvqkMBiGw1NczRcUg43URgYoHgGTUO+gy7iDaN7JpCM2qP2Fb/Nj9m4c/Ap\r\n/vgMpVYD0aad3EP7cKinU5fusaW8QfIZNikQcaBQg5t4Pe3BH101eUH8ANVr\r\nQWwpJH/LRX2e4jnxnjnNotAQ7+345K/39RSi4tMINtoW/X6RiVrzO8QWgaoP\r\nzK91bf+lAGApk4htF81ejha9MDtUJlayNKo=\r\n=I6/F\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev?utm_source=github&utm_medium=clerk_backend_core\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <img src=\"https://images.clerk.dev/static/clerk.svg\" alt=\"Clerk logo\" height=\"50\">\n  </a>\n  <br />\n</p>\n\n# @clerk/backend-code\n\n<div align=\"center\">\n\n[![Chat on Discord](https://img.shields.io/discord/856971667393609759.svg?logo=discord)](https://discord.com/invite/b5rXHjAg7A)\n[![Clerk documentation](https://img.shields.io/badge/documentation-clerk-green.svg)](https://clerk.dev/docs?utm_source=github&utm_medium=clerk_backend_core)\n[![Follow on Twitter](https://img.shields.io/twitter/follow/ClerkDev?style=social)](https://twitter.com/intent/follow?screen_name=ClerkDev)\n\n[Changelog](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/CHANGELOG.md)\n·\n[Report a Bug](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=bug&template=bug_report.md&title=Bug%3A+)\n·\n[Request a Feature](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=Feature%3A+)\n·\n[Ask a Question](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n\n</div>\n\n---\n\n## Overview\n\nThis package provides Clerk Backend API core resources and low-level authentication utilities for JavaScript environments. It is mostly used as the base for other Clerk SDKs.\n\n## Getting Started\n\n### Installation\n\n```sh\nnpm install @clerk/backend-core\n```\n\n### Build\n\nTo build the package locally with the TypeScript compiler, run:\n\n```sh\nnpm run build\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities, without being platform/environment, specific such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendAPI](./src/api/ClerkBackendAPI.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendAPI` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n## Usage\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendAPI](./src/api/ClerkBackendAPI.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://reference.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendAPI.ts#17) implementation.\n\n## Support\n\nYou can get in touch with us in any of the following ways:\n\n- Join our official community [Discord server](https://discord.com/invite/b5rXHjAg7A)\n- Open a [GitHub support issue](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n- Contact options listed on [our Support page](https://clerk.dev/support?utm_source=github&utm_medium=clerk_backend_core)\n\n## Contributing\n\nWe're open to all community contributions! If you'd like to contribute in any way, please read [our contribution guidelines](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/CONTRIBUTING.md).\n\n## Security\n\n`@clerk/backend-core` follows good practices of security, but 100% security cannot be assured.\n\n`@clerk/backend-core` is provided **\"as is\"** without any **warranty**. Use at your own risk.\n\n_For more information and to report security issues, please refer to our [security documentation](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/SECURITY.md)._\n\n## License\n\nThis project is licensed under the **MIT license**.\n\nSee [LICENSE](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/LICENSE) for more information.\n","gitHead":"cf06ae234386f93ca81cd6bae58f854e1cd197d0","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"sokratis","email":"sokratis.vidros@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.13.0+x64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.13.0","dependencies":{"tslib":"^2.3.1","@clerk/types":"^2.15.0-staging.2","query-string":"^7.0.1","snakecase-keys":"^5.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"got":"^11.0.0","jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","node-fetch":"^2.6.0","typescript":"^4.6.4","@types/jest":"^27.4.0","@types/node":"^16.11.12","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.3.2"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_1.9.1-staging.2_1654160366749_0.466403366435713","host":"s3://npm-registry-packages"}},"1.9.1-staging.3":{"name":"@clerk/backend-core","version":"1.9.1-staging.3","license":"MIT","_id":"@clerk/backend-core@1.9.1-staging.3","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"de6b3ef45f013a0562f69464ada14065629eff4b","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-1.9.1-staging.3.tgz","fileCount":629,"integrity":"sha512-80co/QfrVsqZL8IYbAI1jDx5gX4k0+DUeYP1aPdbR56N3O2zQJEXG0B05oDgggh663EhhZlg5yGSTd+UKe9Jzw==","signatures":[{"sig":"MEYCIQCjMRZfAAikH/mQwdICtTt3+Z5fwKRo0Z7K949wRX8+qgIhAKbsBctd9fJzqJg/wqWRISc+mUAM+/IHFGEs1kNaIA8u","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":828937,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJimc0KACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpExxAAjYGQfWf1ZFj+nEI1E5/J1y+rtcw1Xw6KUcA/tFOArkCjO+Pa\r\nQQsnbEdtqKLUs43LQZYLQdEgB32wVvxqLKD+LNF9tGGmCEPVAmCbYnhoISnt\r\nPOy7E3gzfK/b7PF4bXU7BLXkmK0AI6FtTOkpzMYAMA4copwJ1GUlCHzoOrEg\r\nFmEvFtoQVyPkqZukVs1l8sjAGGv+VBWQ5NNqUFnGFUWsJCp+xBl5S8DvLyiQ\r\njNDZExYHj849rtqz94pIg/miaAfT4DqL7zZpeAPg9tdkrY/aLOE/OsukUUFq\r\n8lG0925dQE84FH8ZN+JsZQTPaxvrFsNfHZUrtYF41vJGXktiY45ELkCAA1Mg\r\nkgUBT+c0cw2HVZ093CyA9yPtq2OsyHl+uPT95lkxDnxbI6EkVLNTc2YndohH\r\nojRSUjAE3U2WLOgDqYOZurF/FfC2lyZ3k0KuyQqcel+PHgLrtJCkVwM+tlY1\r\n91G+g7LP8sqBtbn5ZElRho5u+0P3Y6U+pZRuy3cGrHlbI5jMYO3nym13QJ6Z\r\nQ86KETOOziP9ObYm3a+KrgEOaPNOdzHGdWRFMyUXF7aEE3xIOIAfTgiuuhOU\r\nEdnZep0ZR62VnU6mOChwIdd+0lPr+LS13XVyFYPTMizeRi3MgvZXUI9Fd3AT\r\nLIsBuMTXWL2IaRFita5hJCnAqY5OBB15C/Y=\r\n=wieg\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev?utm_source=github&utm_medium=clerk_backend_core\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <img src=\"https://images.clerk.dev/static/clerk.svg\" alt=\"Clerk logo\" height=\"50\">\n  </a>\n  <br />\n</p>\n\n# @clerk/backend-code\n\n<div align=\"center\">\n\n[![Chat on Discord](https://img.shields.io/discord/856971667393609759.svg?logo=discord)](https://discord.com/invite/b5rXHjAg7A)\n[![Clerk documentation](https://img.shields.io/badge/documentation-clerk-green.svg)](https://clerk.dev/docs?utm_source=github&utm_medium=clerk_backend_core)\n[![Follow on Twitter](https://img.shields.io/twitter/follow/ClerkDev?style=social)](https://twitter.com/intent/follow?screen_name=ClerkDev)\n\n[Changelog](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/CHANGELOG.md)\n·\n[Report a Bug](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=bug&template=bug_report.md&title=Bug%3A+)\n·\n[Request a Feature](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=Feature%3A+)\n·\n[Ask a Question](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n\n</div>\n\n---\n\n## Overview\n\nThis package provides Clerk Backend API core resources and low-level authentication utilities for JavaScript environments. It is mostly used as the base for other Clerk SDKs.\n\n## Getting Started\n\n### Installation\n\n```sh\nnpm install @clerk/backend-core\n```\n\n### Build\n\nTo build the package locally with the TypeScript compiler, run:\n\n```sh\nnpm run build\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities, without being platform/environment, specific such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendAPI](./src/api/ClerkBackendAPI.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendAPI` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n## Usage\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendAPI](./src/api/ClerkBackendAPI.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://reference.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendAPI.ts#17) implementation.\n\n## Support\n\nYou can get in touch with us in any of the following ways:\n\n- Join our official community [Discord server](https://discord.com/invite/b5rXHjAg7A)\n- Open a [GitHub support issue](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n- Contact options listed on [our Support page](https://clerk.dev/support?utm_source=github&utm_medium=clerk_backend_core)\n\n## Contributing\n\nWe're open to all community contributions! If you'd like to contribute in any way, please read [our contribution guidelines](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/CONTRIBUTING.md).\n\n## Security\n\n`@clerk/backend-core` follows good practices of security, but 100% security cannot be assured.\n\n`@clerk/backend-core` is provided **\"as is\"** without any **warranty**. Use at your own risk.\n\n_For more information and to report security issues, please refer to our [security documentation](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/SECURITY.md)._\n\n## License\n\nThis project is licensed under the **MIT license**.\n\nSee [LICENSE](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/LICENSE) for more information.\n","gitHead":"56ccbbc0e69e59e065b97f59eb7ecea80ad855a8","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"sokratis","email":"sokratis.vidros@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.13.0+x64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.13.0","dependencies":{"tslib":"^2.3.1","@clerk/types":"^2.15.0-staging.3","query-string":"^7.0.1","snakecase-keys":"^5.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"got":"^11.0.0","jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","node-fetch":"^2.6.0","typescript":"^4.6.4","@types/jest":"^27.4.0","@types/node":"^16.11.12","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.3.2"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_1.9.1-staging.3_1654246666196_0.04360433561866772","host":"s3://npm-registry-packages"}},"1.9.1":{"name":"@clerk/backend-core","version":"1.9.1","license":"MIT","_id":"@clerk/backend-core@1.9.1","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"c68a69278a9dd2ee98ab5af0845a817131ba4ef8","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-1.9.1.tgz","fileCount":524,"integrity":"sha512-GzwWoSt4hQUhKBgEALsSq0uSj2nfawCvPYPL3DpKYlgU2JW+MchmBAFqpZgoc54/aerIpEiat/eOrBgsSzVwMg==","signatures":[{"sig":"MEUCIQCOVTw/ooQaRkdUQ+BYUcfPF2LSnZbruVE0olStOhqINwIge700CE4Thao1Z4xq2ePpRLvBr0kcNBetqHLt34EELTk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":766172,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJincMRACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrZmQ/9FoHFDj2NDYN2UqDch+t+xFQdBzkG8b5nZUra+5qg3/DMnboG\r\nJzwi0Cvh9u3foSOVxuwkw9M21js4rko494KXPjzu3JUeVrVfFLfD8aBXH2L5\r\nPsbt4bCmpHSHwkLdx4ZHOfv/Et0DtSjgmQFAjhrxLH+uMgz02AFM/3TyQ0IS\r\nGdAucN/wz8kig0ej8bp6iF1hHEBJm/skqfWoXUAuQtvJBFTR/7n6zpANqplH\r\ntxLErAYJjT8eJBIFvTS73smVmmvxQU6UrhY4lcr4hQr1F/J9rR65u2pKKAmd\r\nwU6Ks5hxkAMryDxq7U6U2M52Bw2y4yqnjRI0JjlLo7RxnfbyTlzwjPiorXjq\r\nfRc3y8w23cHRhT1oyyq+8KgcOKCw9bXrUPmkl/Sq34unEAAjHkH3GJ4tw2Xr\r\n/rJrxZSeYsOPBrWYdlbHaQvKBBrXirTfFuupSmZ6u0xefq6IYU9h8kB2g5+4\r\nnqEb4zti1xs55aAcxHvAc3/mrBNIiAQxTht+yJ64V+7jBUFWS/YoaaAhDfrg\r\nQAC446/t+S3TOtjQvor3/TkFfN+WtmvumuK83Gds13YfLeyYKs5Rd3oKIZ+d\r\nvbAtnXm7NRPKicfOT5rG8zEjYuy5EsZZaJux+omJiKGBajJRg/xnt2PzfF7C\r\nGFy3T3O5Vys/1njdLw/QvsKTkSgkrL+rEY0=\r\n=RHtL\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","gitHead":"bb1d6cc0accbe9d9df6b5b557a41c42c657f6830","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"igneel64","email":"p.perlepes@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.13.2+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.13.2","dependencies":{"tslib":"^2.3.1","@clerk/types":"^2.15.0","query-string":"^7.0.1","snakecase-keys":"^5.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"got":"^11.0.0","jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","node-fetch":"^2.6.0","typescript":"^4.6.4","@types/jest":"^27.4.0","@types/node":"^16.11.12","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.3.2"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_1.9.1_1654506257212_0.8548166089434304","host":"s3://npm-registry-packages"}},"1.9.2-staging.0":{"name":"@clerk/backend-core","version":"1.9.2-staging.0","license":"MIT","_id":"@clerk/backend-core@1.9.2-staging.0","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"ad390cd5c9bf896e663cec6957aa1b2c886facfc","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-1.9.2-staging.0.tgz","fileCount":524,"integrity":"sha512-Y9Xm8Yesn9fXsxQg4USyItC0f1ZwiyhUDr1fsdJwEp6gxVj+xuS0cuH1zX4TSAakhPylLyzqn6smZPA60HysOw==","signatures":[{"sig":"MEUCIDaaPtxYQ1rwDnphWataNYTGGRSJjdK6CjtEq7H5RkAWAiEAxkNg5HjlXG2LcZtoS7470Apiad1/Z3A91cQCuGydObc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":766192,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiqtm4ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoP7A/5AO64rwFomKU/o8uvcbsPMOgM3Ictrv7FR+IYpYlsiMJfZdhl\r\nvnMyLpU8M3DqtyKZa/8pd7xMKHxHudZuhugu1Bx8/ALpqmgF+UJ8Dl90qnhG\r\nxUxRdLM/fl+/8tJ1MnWV6ShSDLmCMMNIa/5Ko8+JAiqqBFxt4sGYiav6+9JR\r\nZ7YBEhrOVxvaguWWH4v/itF3Hh+v7Vn1kKp64Vx9NpBWtVOq/r9fTeZdTsPQ\r\nTq0tToO/SUKTLmtGGl5sp3UNlYgbLzvKUSriHFQHgDDxtpwX3Cbf/0jKQ1pB\r\n+iWXe2qNQaFA7zuREYfkLNrHR2OUMwCh4ftqm9tNxozbt56fH2pUfgY1Tfg+\r\nRyEPfmOdUh5JsdEXoEKhXFVq4aaiNPuzDsr4b6YJtsZAdi/YXn0rcYCXg/kx\r\nnz88JWgT43DTBhtZog1ftHTbq1WLSR5RptcAplmPucWeO5tPImhbJf2YlWcd\r\na4bPxNEvpBIYJphhiFHJbjHLI0peUR/SoEhkP9Lw6Qijwq2SeUaiapAehQn9\r\n+7C2HM8MT7m5a611wtiwmgnw7obU7zHjakpWL8+FLmSM11+sszp+tP8LBgR3\r\nuG5SkIF2VZJzlq3rBEqjnU4/pxblhR+8WET30sOVwPcehXLHfDUdlpDME5TL\r\nd/mNOzjTAKFdWr118WzY0HHBowJfiLt+X2Q=\r\n=22/E\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev?utm_source=github&utm_medium=clerk_backend_core\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <img src=\"https://images.clerk.dev/static/clerk.svg\" alt=\"Clerk logo\" height=\"50\">\n  </a>\n  <br />\n</p>\n\n# @clerk/backend-code\n\n<div align=\"center\">\n\n[![Chat on Discord](https://img.shields.io/discord/856971667393609759.svg?logo=discord)](https://discord.com/invite/b5rXHjAg7A)\n[![Clerk documentation](https://img.shields.io/badge/documentation-clerk-green.svg)](https://clerk.dev/docs?utm_source=github&utm_medium=clerk_backend_core)\n[![Follow on Twitter](https://img.shields.io/twitter/follow/ClerkDev?style=social)](https://twitter.com/intent/follow?screen_name=ClerkDev)\n\n[Changelog](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/CHANGELOG.md)\n·\n[Report a Bug](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=bug&template=bug_report.md&title=Bug%3A+)\n·\n[Request a Feature](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=Feature%3A+)\n·\n[Ask a Question](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n\n</div>\n\n---\n\n## Overview\n\nThis package provides Clerk Backend API core resources and low-level authentication utilities for JavaScript environments. It is mostly used as the base for other Clerk SDKs.\n\n## Getting Started\n\n### Installation\n\n```sh\nnpm install @clerk/backend-core\n```\n\n### Build\n\nTo build the package locally with the TypeScript compiler, run:\n\n```sh\nnpm run build\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities, without being platform/environment, specific such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendAPI](./src/api/ClerkBackendAPI.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendAPI` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n## Usage\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendAPI](./src/api/ClerkBackendAPI.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://reference.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendAPI.ts#17) implementation.\n\n## Support\n\nYou can get in touch with us in any of the following ways:\n\n- Join our official community [Discord server](https://discord.com/invite/b5rXHjAg7A)\n- Open a [GitHub support issue](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n- Contact options listed on [our Support page](https://clerk.dev/support?utm_source=github&utm_medium=clerk_backend_core)\n\n## Contributing\n\nWe're open to all community contributions! If you'd like to contribute in any way, please read [our contribution guidelines](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/CONTRIBUTING.md).\n\n## Security\n\n`@clerk/backend-core` follows good practices of security, but 100% security cannot be assured.\n\n`@clerk/backend-core` is provided **\"as is\"** without any **warranty**. Use at your own risk.\n\n_For more information and to report security issues, please refer to our [security documentation](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/SECURITY.md)._\n\n## License\n\nThis project is licensed under the **MIT license**.\n\nSee [LICENSE](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/LICENSE) for more information.\n","gitHead":"4131192647ed4e0472053c25622e6a03332adc85","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"igneel64","email":"p.perlepes@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.13.2+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.13.2","dependencies":{"tslib":"^2.3.1","@clerk/types":"^2.16.0-staging.0","query-string":"^7.0.1","snakecase-keys":"^5.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"got":"^11.0.0","jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","node-fetch":"^2.6.0","typescript":"^4.6.4","@types/jest":"^27.4.0","@types/node":"^16.11.12","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.3.2"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_1.9.2-staging.0_1655364024161_0.4682772361270131","host":"s3://npm-registry-packages"}},"1.9.2":{"name":"@clerk/backend-core","version":"1.9.2","license":"MIT","_id":"@clerk/backend-core@1.9.2","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"700f9d56d4b63d8ea5bae8ff60a6ad1615c3b9c8","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-1.9.2.tgz","fileCount":524,"integrity":"sha512-E2quh+GKqvYxoNXiuJwvJjcn+6wH5fGeCe7SWdREcFoG0mto5SGkDxhZfKLZV8GbJKJQTgbU+/xCL10DkU0Kaw==","signatures":[{"sig":"MEQCIDMYMY7nPC2Urpek37xgpEVcYibl+cjgGp+kbnTOkk+2AiAiC74YkQEBlghYCZF8IVbs9YRQBQGwryPp/I3sS6Aimg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":766371,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiqu/zACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoavQ/9HAC2fRVHuaN91Jk9qiawBWSm6A8yURS4rYYZ7ZulHZzM4iX7\r\niK3nPOraHuZ4BiiFQjgz61rey2sBICmzErIe8Uh54l03lr5uhCcdj79d5CxE\r\nRb7a+1Ek7QPWdOlA4SwrUm0Sx7uGXH4ZEBwDwo/Xcu3YCjVzReNVPVste2mT\r\nPf9ajB2vXV0C2V9yVYI9xFKPe+tonjiNlFgXzMFnWMbzxCH0hELa6vAnE+Nr\r\nR26MlxfH3+rNzj9YNQ+suePvyHyNoC67c6fIklrFJqassDQzcg4s6rLWZcb5\r\nQy2W8CvLDHjUc0m/EI/dBwbHWztZSFr4UfpKh8WhKKY2CRtiyb/FWzrwCRWz\r\nHSCscCOn+C6QTOfDkdaQedD8096EjCE1IO3dlHlQnC1RXs52Yi8bGdo0IXpC\r\nUJauEkYcIriuLiLzHdn6C0eBHhzDj7gq4inxZ/CFOzf459s1HCsZfWj+e+2o\r\nA8+x5jVmeQhYNkfaCpJYqIWE9TS846KxL/ZGRE67rXTb18uXvUbob3tyq7KZ\r\nptGAGwxhttgUgL1fMYgDczfvN6/lHVPNt0wyxYKMFvyI/0vqJMAmlD+nrJo6\r\nFMtE+Ui5sj+iEsxtOMLJr5ZcfqZhzwBIVqixQ7JYYl6MMM0d22ajY8IyVaOq\r\n3KeKFjFhhfJTChgzfwZgdABi2u6UKG2nl9o=\r\n=FB/X\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","gitHead":"069536ed7cf4600913802d293b4a24ade6e9786a","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"igneel64","email":"p.perlepes@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.13.2+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.13.2","dependencies":{"tslib":"^2.3.1","@clerk/types":"^2.16.0","query-string":"^7.0.1","snakecase-keys":"^5.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"got":"^11.0.0","jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","node-fetch":"^2.6.0","typescript":"^4.6.4","@types/jest":"^27.4.0","@types/node":"^16.11.12","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.3.2"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_1.9.2_1655369715312_0.08479672849676145","host":"s3://npm-registry-packages"}},"1.10.0":{"name":"@clerk/backend-core","version":"1.10.0","license":"MIT","_id":"@clerk/backend-core@1.10.0","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"930c49f59b1239f438c4f6b66ad91be8452a78d4","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-1.10.0.tgz","fileCount":650,"integrity":"sha512-o5L8F+97kbVgY/nhQhaYMGmBhc9okZLR50OV42XZUsKk8Vk16ExgmQKN1k6LdcfB+RY2atQanCWUGfYR6ylJ+g==","signatures":[{"sig":"MEYCIQDHgc69HQ5miKlITM0s/fNC6oxQc2ks6kusFp86qyAYzgIhALN3B75+wOb9RGy7HNCb7kSWvLyRIAVQyFHWmunIlsBH","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":852393,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJitXpwACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpuvQ//fQw1YIYsQZmwLikYB47Fpcwvg01umXctIA8E0hnk5RXFW+xq\r\n23XntnR4odNIRFYzB15fFwxzhadW6KwjvSVo1wTqRD52daHelLEopXy0A2ph\r\nJ6+1zQdg8txBkTwbK3f2TrAoTszBjY3kfcC57FTJ/VVIa92/Tqoo7NmT8vXa\r\nlKCzcmhuwJqQKpA42W7g7qUQMEA5B22NoQeda6gRoVXxSDo5WqBRib0Atv1C\r\n8GcXghmz+xlpHED5DH/BhenfuKhl70REcfVkLeUA1+dNjOrCay3wkU9UtjX8\r\nPxovdbXnXcqm5GDT4o87MUdftV2oInonrDJPAgiqNDJ5GhVAqIpL3BrSCZsr\r\nSD3rVRWyMHX5vIODUkQhNfZ67ACOicIQSiaCdHgucT2vhSFdmZqS6j67Fu6u\r\ndXN6vwa5dpUT1/vGHndJkILfSfiDq7+toNW30eVcA/ju4ZRibPiGUIK2flWP\r\nyOkwEiMWwLfzFAI5A1HbMbg84C/Os+azIbeGV13y8yLpAg7Pq6g0tku5fLzd\r\nPVbBHaRA+ThkyAJ8dA9cjMHHRxxGk24BWHFucRa8ECoSr1OLLW2iKUU//fx+\r\nbOiNUYxhNndjqM9S6IirDdo6roqHfALqitEw211HmMjWlY2SZ5LMzDa2o0E+\r\ngS86HDgNw1P/0gsOBk3xP4E53sukRf0s0os=\r\n=+YSc\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","gitHead":"259a214c3c6850a770c32e09f52efec4150bbaf2","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"igneel64","email":"p.perlepes@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.13.2+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.13.2","dependencies":{"tslib":"^2.3.1","@clerk/types":"^2.17.0","query-string":"^7.0.1","snakecase-keys":"^5.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"got":"^11.0.0","jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","node-fetch":"^2.6.0","typescript":"^4.6.4","@types/jest":"^27.4.0","@types/node":"^16.11.12","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.3.2"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_1.10.0_1656060528701_0.1744613493218361","host":"s3://npm-registry-packages"}},"1.11.0":{"name":"@clerk/backend-core","version":"1.11.0","license":"MIT","_id":"@clerk/backend-core@1.11.0","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"d6fded48f41561099b3d925792d3c995d961c318","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-1.11.0.tgz","fileCount":658,"integrity":"sha512-mJIQySD/YxQhmW2f4hu+EwCX1BAVO4bcZKxNMbNGxrV6D9oqfUojz2LL3X3nbwukAaNNDsIVlNwQud3WhMR8iA==","signatures":[{"sig":"MEUCIGR4mUSqhywb3qROMDibX5/en1pqOwp+xm2NLAN9jM7wAiEA0kPGygFTf0JIYfKCFiKQjLlHtUfq5Ejk0RsySFk65kg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":852669,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJivrqsACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq2ug/+Nygo8xwnLh5uptHZbc0s0w36pr7mejsS6zZr265rNJ8reQAZ\r\nhZbL7147cAvwAHp9tbQl98FvyGSb6m23Zskc+FjAxbGdUE2cgKdoPGDVrzri\r\nE++akRPoGv4Ewsg7szpgPd9h0DZ/ipZLy+u9zcEoG+27R2e+6c/NVez1MrXR\r\nBesPmoOvkS3Fh1xuSBU+vAW4XBamJ2bxy77pAxKauVPDIyIThgomsIFaCVP1\r\nrACZdw+jR5EWnBGAL7TN2gpxSrCzQr+YCMhWG9HPlb7/7qILgo3j9Zx9EVq6\r\nyO9S4vqtOkiQ4kJijbbH4qM3y6EZ0b3GPn8ODC/osqqlIDHRok61KHqGx6XB\r\n9BoPC2C8ojPdJD8vMXta1uNJRiAYdaofP4jd3jJzbKZVYfRoEYz523EImDKX\r\nzXOBjQCSj4E5DM8VrcZuI8kFAjRV7VjThY0HoNcy3Wgu/XQyEnMnnlRP/bB7\r\nI53v7N0yf+Jhnpo/8ZAwIdd2LGq+DZTbA353LFgmDDHsPjtlbhh3FhiNn8Od\r\n8HMkVspjxGiWMd9BbxaMemt1IT5oUgqIbO31DWcGYMiMy/WkVYj1uc98/pyv\r\ngfids1OchjdOLa+gN/UlIdmUFxfPj5qfXntVphp+jvWBy/62K4ETlFwUpxzv\r\nbfKsYogUIeXUlsuEBVRLCmfkP7TFmH803Qo=\r\n=PZXZ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","gitHead":"8629150af2d2923845ff86a39439542e12bc3c0f","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"igneel64","email":"p.perlepes@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.13.2+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.13.2","dependencies":{"tslib":"^2.3.1","@clerk/types":"^2.18.0","query-string":"^7.0.1","snakecase-keys":"^5.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"got":"^11.0.0","jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","node-fetch":"^2.6.0","typescript":"^4.6.4","@types/jest":"^27.4.0","@types/node":"^16.11.12","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.3.2"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_1.11.0_1656666796423_0.8180664007216472","host":"s3://npm-registry-packages"}},"1.11.1":{"name":"@clerk/backend-core","version":"1.11.1","license":"MIT","_id":"@clerk/backend-core@1.11.1","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"e5bcd4302a49369cee20066901a462971ae8b60c","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-1.11.1.tgz","fileCount":637,"integrity":"sha512-hMBDGS83blETlZ2MkkRq9k+gtjdfsjYDJLupLZjqIRGxDRRDh9ioaXyXjTNuQhNqf7oKnvkYRx1C5iXpW0bW4A==","signatures":[{"sig":"MEYCIQCh7UOM4uSYnimvzpv7d2Adf1REVLtXec8m2nFm/JhuNgIhAPvqhXwt6vN+7hB6KyNZ38xuG0itB8PlInROFCV3AvBp","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":829474,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiwqm/ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp78g/+LbqYK5z3zlCn/6cMtr/mmuQaJ7pbldLgwulR5xaU+r+CWoEQ\r\nc9ZUIVd/4tSyBZBkE2dqlHPyRyv5Vu9N9YL9coFfZFsZ0RmIw5S3a10kuZ1D\r\nGy4beJ6REwBVJRTtgo5cD4bD8cS95g8Kjj3Wpr4gua3hJuUJlz13Pvc0MzLO\r\ntGsAyB6Cmf3X3mY6VjaK5hC/hwtk0mk39ZoOeOD3KvblaJecjEQptciQZUe3\r\nGCKa2ztdz0o/1WCZ7GrvIMWO6Vowg6VgfXzC1bGTpYiMyXK4bRwSJM917elF\r\niC28m6c+2IvLHxKcpop+wbcG6oYyI4DCCHDxxKWMq5nL+eqFJwFT7U13OHvs\r\nxr5DbKCpER5QlArBRrMJPsbifG5SEt9xFEMhuL5W+BUY/+YJIyWlankkAiYO\r\n0tSpOLr4EC0Zboci0jbLn0brM/QhMZ+CZyABBVl/p/l1cgKR9S7mIOTaH7b+\r\nhgysOGI5eJUDS7M4VTT00Kc3PXHDUh3AG925ct/N/O5+bDGBUP2oybkOPEee\r\naayinBacY9eoirtEM26MzcMme6bkHfjL5yfDhya0it4DcorpHopmVtw3nT4a\r\nkheEM59C6yjjXVsnzCd2v4lt2PY0OR9q3q7GgC/ZHGK0nLBZUDt5AD/FJL7E\r\noY/triuPOJUxO8ncRicePyQvLWyZHinqhcQ=\r\n=NnPA\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","gitHead":"f6739f95b2e2177724e2283cd6d8bde18bf667fb","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"sokratis","email":"sokratis.vidros@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.13.0+x64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.13.0","dependencies":{"tslib":"^2.3.1","@clerk/types":"^2.18.0","query-string":"^7.0.1","snakecase-keys":"^5.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"got":"^11.0.0","jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","node-fetch":"^2.6.0","typescript":"^4.6.4","@types/jest":"^27.4.0","@types/node":"^16.11.12","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.3.2"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_1.11.1_1656924607731_0.80725461922648","host":"s3://npm-registry-packages"}},"1.11.2":{"name":"@clerk/backend-core","version":"1.11.2","license":"MIT","_id":"@clerk/backend-core@1.11.2","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"c7b60afb04245e2246ef639dd720c63e33374701","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-1.11.2.tgz","fileCount":658,"integrity":"sha512-rSyAKNKQnOjfu1R+gz7LfVW3evnqJ49xbCuSezMygax/d9mggnLNcVQRc7FYIceDcW9Ow2Oip4QfV4ow1jpdHA==","signatures":[{"sig":"MEQCIEpvOE7WNoKrjScP3DVYIewbtgWhpLrkG1931bHyz9yNAiBZ6hLxT0oLVhybtsaBvoAP7bRMbQXuwKptNmwKez1AMQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":853253,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJixUzzACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoYnhAAiQjQxp+FFf27o6z64COp71ah7b1EVHm4FPbzcIA1+HA/nAAR\r\n1TAZtMT/yKz1jRr0kdVIYPyAfapy8EsHXgdP4n8CmbWa9fyhoVd9RSPqOpGI\r\nH7ZBsqpTSXSo41N+JuKwrWLaGJ+a2F3TrQoiJqMntX9zW+SZ9NQPAo/My3VR\r\nWlcHAQ+xRLeef9hLA90t3YhN3jA0OgRWoLL53trAfTb7HMn/S0WFJufiNTtX\r\nfhzepdVAE0ZBo2z34siXzgiNsv3798AaRZCDKzG5urX8kQB7RZDXzgRRltBq\r\nSdVQxvLbOCgXchTa7NaryjQWwME6MNFSAamT8FEO04pdMn7ZnphL0eCdTuFM\r\nGO1C902UJYzFqz/e5VZuebTYun8NZz1TudraY8dAGLjr4VhZbxsJHcUnO3L+\r\nRzvY8wzWPtWfTfh9+H/6SqjYlwayEjm3b4/4QSIOEMlznd9vr2WHYtYr4JEE\r\n1DLbKCHZdn8DgMeMstToQkEmztBVi3i5Nc+AETTyCcyeGSOLFYwGYxq9bIOr\r\nBzQpAbWGZLHF/cVfPOuI6HsbdGxBUExxjDRoSd2A1TflXwq7vFOhQkjdYVQK\r\nMjjNZX+WPt5jIyB56HpMTTkoOSKbAgs6D8iqpduWcnobqn9a5gNKBZs9wwk3\r\nHIxXCxM4aSPjqd6O4OfWaJItJARaG7alutw=\r\n=HFIf\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","gitHead":"e8a2bac488d7079954a54b25460225b4dc25c2cc","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"igneel64","email":"p.perlepes@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.13.2+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.13.2","dependencies":{"tslib":"^2.3.1","@clerk/types":"^2.19.0","query-string":"^7.0.1","snakecase-keys":"^5.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"got":"^11.0.0","jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","node-fetch":"^2.6.0","typescript":"^4.6.4","@types/jest":"^27.4.0","@types/node":"^16.11.12","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.3.2"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_1.11.2_1657097458919_0.10092020652967948","host":"s3://npm-registry-packages"}},"1.11.3":{"name":"@clerk/backend-core","version":"1.11.3","license":"MIT","_id":"@clerk/backend-core@1.11.3","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"04db7a39dfdbcf38bebf526a7b2d7d8689026ee2","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-1.11.3.tgz","fileCount":658,"integrity":"sha512-LOvbA9GjhrxsUh80xuRFBQEOPn8lB70aH+pbmcJKrPLAkUmQMUX2nsiduMjEIE79kw8cHq3IiGspPBYOT88mog==","signatures":[{"sig":"MEUCIQCAkX0W1OZQtsnCzwglt8o8zgK8/Uorq5AXvUe582mQ3QIgb+UvRQ3bwGHRe2iJ7TDydAYFOgiyNaB9T3C6Wj64OZo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":853445,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJixqKZACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrPUg/9EH8XkqD+eNDbUBAkbpR/+uE9gGEud5Ce9JBUNfUSK6dGIcEK\r\nyHbp+t1Ni2k0F2AAYcVcwPxgjruA+0Gb4VEnIvOaOVapT9xb5bynh+6ZfFtB\r\nOF2qGCQXJQjOMIyvR6c5vffIdZDd5QtDWSv8CjvTpMtKVBLbvvDy3+FPux4z\r\nXKCuuHLQMg1ptzRpvtLQiypbGUrAl74nNM3RiyQbkZrcGqJZ+jI47I4la/D0\r\nhklBs3naepaAfUedyMCacdmU9efz37xfAna630jmvBxr2mbmWAKMD47xr3t+\r\nOqG+5EmY/f8aIzzYpSmr4cFZhAovTBIjlmJBfgT/HlJ7xSDI23/Za4mm9ksc\r\nPhv29k5eq0JPKCwZ6ziIMrIiw7Yq4LZR2/kZUslDyStF2wdn1oHdEdJz/Vah\r\n+2W/XJAWu002Gv3GYgmKRkHHt4wBxBpdUc7b40Lc66Rt1tcqwNunB2sQcqo+\r\nuiCU7cwWG6g5xREFgu0RSaVXJFb5JtpQA01sXtckzE6zqDNAKOMMHR/ow+/1\r\nJ2+iVAiNNJqWtSoMIdDvMTTWCrLDEOpMWr21ociUrwzZXyOZuoj5IyNqLCr+\r\nRTWq2JUyltkDgAzPpVbbFtgKx6TJ2nbXT7fQa/1FAKs12mwJ87S/hrbP3+BE\r\nW8OQtM0QC8dkby26Do3mlGzmHy+DGRgiRP8=\r\n=1/mp\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","gitHead":"dc38fca7ddd78d6c017f874812eb75523656e925","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"igneel64","email":"p.perlepes@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.13.2+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.13.2","dependencies":{"tslib":"^2.3.1","@clerk/types":"^2.19.1","query-string":"^7.0.1","snakecase-keys":"^5.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"got":"^11.0.0","jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","node-fetch":"^2.6.0","typescript":"^4.6.4","@types/jest":"^27.4.0","@types/node":"^16.11.12","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.3.2"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_1.11.3_1657184921590_0.15792117026953068","host":"s3://npm-registry-packages"}},"1.12.0":{"name":"@clerk/backend-core","version":"1.12.0","license":"MIT","_id":"@clerk/backend-core@1.12.0","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"555eba68cf05b0e8f3e2cc123e90d3c25a0a86c5","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-1.12.0.tgz","fileCount":658,"integrity":"sha512-UgcCzbVCrIOrBGVfQxn4a7stVFjCYMSofj/t+SIWDfTurRDIeunVkh2EH+KE8Y7z1Dsohuq3+/vovHUfxlc5XQ==","signatures":[{"sig":"MEYCIQDJhEWY51xN8PYSwzr8hMt89/FNdRwyk4nEaMRURN63yAIhAIoQGF1toPnrUd49tmxImoxL565p8+Xiwa3FpPxN0HsA","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":855159,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJix/BMACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpYexAAniDUJw4apGJ3LaSyD+Vz0IXzQZQttM2YuSZSFcyivwXr0kS8\r\naeq0pnTrb9kWxz+mAP/p3XwaG+a2e1cxhvLWFZuLsXq2EWuhqD/ihksZl5s8\r\nBmFbfJvYs2HkOVFBgrsPoa+TiJoUem99cLv24dZs5oVKWzTZCBwLDhyl3+On\r\naA1ZJ5BuEDnFgQXZgBPFxaIcRptgmSxQYIf7ATAFXTWPOR+TT7ukBcLHpI+q\r\n9oZ4YYRz1b3m6ppQYmMqbZ83GmKwZ4Xod706Nru7JkAtTVftDrKrxvel9DNZ\r\ncXM17za/Frsj53B5MHioYi3xh3lQgMZtQyMhHyR5zIyzkARr2BlwV7z2jPOZ\r\nf7tGvhMA/YOgA1ZpjpOGEjqX/H2AjtZFB2P9NVOYIK49JxVy5FfnBzsg405u\r\n4QwJ78pCS7l4weGEohUHh2cChrBhS+Clh6JddNTEg991txJ1tXtyQan4xGEG\r\nutlZcIAJFSNpM45CO6tnSo1ux1jQQ0xLS7dPZ0giAOU7tdoUq16qAWsSc2tr\r\n+WdssS6H4cgm2ktGTckZA7NJpjOD+G9UlcMAnZJCcbsLKoHTl2F5sTZJ43bw\r\nq8ZzcRcp/y6NH9YaImI0f+uZSiTgfcX0140AiQi/mDx7Okj31ehFBXzIvYI1\r\n98re4s7xb0rPtC7IvqBLIv6VTZYTLuiJTRo=\r\n=LXAX\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","gitHead":"ab57861d55abb0417b6f40152f57dc4f6d0c4419","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"igneel64","email":"p.perlepes@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.13.2+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.13.2","dependencies":{"tslib":"^2.3.1","@clerk/types":"^2.19.1","query-string":"^7.0.1","snakecase-keys":"^5.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"got":"^11.0.0","jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","node-fetch":"^2.6.0","typescript":"^4.6.4","@types/jest":"^27.4.0","@types/node":"^16.11.12","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.3.2"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_1.12.0_1657270348053_0.7694445893037896","host":"s3://npm-registry-packages"}},"1.12.1-next.0":{"name":"@clerk/backend-core","version":"1.12.1-next.0","license":"MIT","_id":"@clerk/backend-core@1.12.1-next.0","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"4cdd65e80cb43d25440340140076dcdd5c4a6c25","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-1.12.1-next.0.tgz","fileCount":523,"integrity":"sha512-jSCDKK9NwAI0JoYfC450KJnvM8OW/mvmsHZnMw6fZuLlfs7Rk4L0lJKq8qgaPZgxN2dnRqXDcQulRyOyK2Jo6Q==","signatures":[{"sig":"MEQCID9B91ChGAy4vA5naTcgbbkzYb/Fpt2U2+GNnRJGXKv+AiALgZqcHRMPYI9yGo/Azgxq3g5Z0sLxZDZDe9ojGSF7aA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":764472,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJizkUjACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpNbg/+JOZi4leEDSD98FIcZhTe3KbU1SliTjqfXk/TJumx1gd/ziXA\r\njxdCYEz2dMNew36BMgQRSsIUw06dmtg384vLTqIQnbeiCuiPOy7Q//udC1F6\r\nfIv7ZmsJ0MTaXLh4coeC9t8l9//I7ggvn7rhjmboOeOCbG+OJ6DfbqYHzstm\r\nLOJngC0kme61Im3EE9fX4Gtn03zgkjKP3iMK/wD+H00/KgAONMIYJBjnpnsK\r\nqW7NqNT/rc7iEBm+Z/q/dMZq+mAg8vp0S2VLxVjS4vIiXPGYFC0BpOla9DGo\r\nr1EDjnSj8S3/HADQCEvmtfYNhKi4rL9F8rsJUrzAT5/c50PMI03eciOQ282W\r\nxonR7qfL7bbjPpr7YGIPLI2VvPWj5WFX9dnM5jiwvUR0EIbUfaT9vJuVJSIn\r\n4BmWTjQ3i8AulfW03K5j6BQlnV7OLbwsMjmvBIC3/CtgrUfKx6RShxXk2qdp\r\nUpxyLPWSfq0d1rf3e9ii81uqjoek0Mjf2EPVs0jfhCuqyVe1bV5Mz4rEpBRr\r\nd993SVcN2auj1fx+hq26c957LYVlBcZJdwHQFk9Wcp5AGKds06004aEqXZia\r\nMsIuhkjpu2y/9XuKq3s9RyF1FNydrM7NKpMEswslQSrJVM1DxcBDJ7v7o8gO\r\nQxCDVRHS8dIqxuRMsmmdQ1mMD6MfkyI79Kc=\r\n=3TjJ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev?utm_source=github&utm_medium=clerk_backend_core\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <img src=\"https://images.clerk.dev/static/clerk.svg\" alt=\"Clerk logo\" height=\"50\">\n  </a>\n  <br />\n</p>\n\n# @clerk/backend-code\n\n<div align=\"center\">\n\n[![Chat on Discord](https://img.shields.io/discord/856971667393609759.svg?logo=discord)](https://discord.com/invite/b5rXHjAg7A)\n[![Clerk documentation](https://img.shields.io/badge/documentation-clerk-green.svg)](https://clerk.dev/docs?utm_source=github&utm_medium=clerk_backend_core)\n[![Follow on Twitter](https://img.shields.io/twitter/follow/ClerkDev?style=social)](https://twitter.com/intent/follow?screen_name=ClerkDev)\n\n[Changelog](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/CHANGELOG.md)\n·\n[Report a Bug](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=bug&template=bug_report.md&title=Bug%3A+)\n·\n[Request a Feature](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=Feature%3A+)\n·\n[Ask a Question](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n\n</div>\n\n---\n\n## Overview\n\nThis package provides Clerk Backend API core resources and low-level authentication utilities for JavaScript environments. It is mostly used as the base for other Clerk SDKs.\n\n## Getting Started\n\n### Installation\n\n```sh\nnpm install @clerk/backend-core\n```\n\n### Build\n\nTo build the package locally with the TypeScript compiler, run:\n\n```sh\nnpm run build\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities, without being platform/environment, specific such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendAPI](./src/api/ClerkBackendAPI.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendAPI` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n## Usage\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendAPI](./src/api/ClerkBackendAPI.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://reference.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendAPI.ts#17) implementation.\n\n## Support\n\nYou can get in touch with us in any of the following ways:\n\n- Join our official community [Discord server](https://discord.com/invite/b5rXHjAg7A)\n- Open a [GitHub support issue](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n- Contact options listed on [our Support page](https://clerk.dev/support?utm_source=github&utm_medium=clerk_backend_core)\n\n## Contributing\n\nWe're open to all community contributions! If you'd like to contribute in any way, please read [our contribution guidelines](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/CONTRIBUTING.md).\n\n## Security\n\n`@clerk/backend-core` follows good practices of security, but 100% security cannot be assured.\n\n`@clerk/backend-core` is provided **\"as is\"** without any **warranty**. Use at your own risk.\n\n_For more information and to report security issues, please refer to our [security documentation](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/SECURITY.md)._\n\n## License\n\nThis project is licensed under the **MIT license**.\n\nSee [LICENSE](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/LICENSE) for more information.\n","gitHead":"4b5e38c14eb6ded7c4de1dd11ed196130e49bf3f","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.15.0+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.15.0","dependencies":{"tslib":"^2.3.1","@clerk/types":"^3.0.0-next.0","query-string":"^7.0.1","snakecase-keys":"^5.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"got":"^11.0.0","jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","node-fetch":"^2.6.0","typescript":"^4.6.4","@types/jest":"^27.4.0","@types/node":"^16.11.12","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.3.2"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_1.12.1-next.0_1657685283115_0.09460378567251948","host":"s3://npm-registry-packages"}},"1.13.0":{"name":"@clerk/backend-core","version":"1.13.0","license":"MIT","_id":"@clerk/backend-core@1.13.0","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"528a4b10b2b66949b4da8adfcba361a9fb7e235e","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-1.13.0.tgz","fileCount":658,"integrity":"sha512-5JZvZuiw5rN9E2DKcgi0/kt28yprWLV07p9WYcm3IsvS9GAacmvK/LP5cwPqkjXhauqBBWUfKaApXViXZ0Vsqw==","signatures":[{"sig":"MEQCIDxvX3uvI8CnLl/yXEaOAFXHySTXxlqrNcs+pWLgrAAyAiAVqM6S7MUoLj6FMvD3yMPEnXZBlIjInMjV74v4dSE3vw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":855627,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJizo89ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmodSA//c2AdHxjhxA43jR+RJS8IsYvKcGKSiFhcGV4GpJiprBiClTCT\r\nJo8KE5ZCmYXXNU+loJWrXsdTv46Pw+JVVOvgjNzf6Kg6hMeC6lb3McDGik2n\r\nKcBxglS0OEv9r7wsOu4P4ao0i9nQ+BMyC9eekoHcDxZvdtIY8YvRxR4tgUQc\r\nhW6P3yTvQNd7HZGPVZViUF0/ygJoGbJa5xyMMmM+/tWjDpBR8LAaDZWcHjqI\r\nysebDgk8IFmROShmrfkpn95RpDFgJOegNihepFSsHtXtYh/R8xvBkjU7R5Aa\r\n/mSX1h6HRG1DfYzscYJHmBEpaG8JBdhK3TzglOvr5PsZA6BojThRkunCjo32\r\n346VbCPIRKFOKMLmq80H/OLLy09746Gx2oLuxqDfa5LgR7u0j8LkvrdHvEC6\r\ncRE9FRL5MfBCMKcqPsWYGX7H2Uut4ZTIvFj/hLIBelNNqMKWif+Ndv1EcU6u\r\n+BntoBSBo5yDdKc1yWehWI774zf50zxRwxtF5rlj1yfI9pN7uMCX07/Wy7+m\r\nZKkuCyXosJ5aD6EkRa+GM7m2D+vSkht/1S9RbWNE/UtwA4POpq/HO4ctLhvB\r\nzzyJGUS8FROGJaTIaSQgyFTXIP+2jMaeqnD4C3nXwmY/+kn+x9velCUIkOV6\r\nrXOyiIwZxFFvfkds96+Z3T8549TmqQdxw4o=\r\n=3IcX\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","gitHead":"92bc6888721d7bbbcf227469a30e64a306ff49f6","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"igneel64","email":"p.perlepes@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.13.2+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.13.2","dependencies":{"tslib":"^2.3.1","@clerk/types":"^2.20.0","query-string":"^7.0.1","snakecase-keys":"^5.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"got":"^11.0.0","jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","node-fetch":"^2.6.0","typescript":"^4.6.4","@types/jest":"^27.4.0","@types/node":"^16.11.12","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.3.2"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_1.13.0_1657704252946_0.37032726743778155","host":"s3://npm-registry-packages"}},"1.14.0-next.1":{"name":"@clerk/backend-core","version":"1.14.0-next.1","license":"MIT","_id":"@clerk/backend-core@1.14.0-next.1","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"66a1d9053573faf0d8fa502be220a9e1289a9581","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-1.14.0-next.1.tgz","fileCount":523,"integrity":"sha512-RSqNr3EIRAiUOoQh+sMLZhI0kqdV/4V03niNCgxiQAud62mhlYaQ5v4JxkuYCiWmM4sreavVBskKLqrxlO7laQ==","signatures":[{"sig":"MEYCIQC3O0g8pHiUAMobop6KUi8askqcjSWL887V247uA1ub8AIhAM/iXK6gvz0MTaF3lxaF76bAHHZU/i2HLMlTYPNC347z","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":764940,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiztVNACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp/qxAAm0VPsGYNKbgxPHxi+/Wu5TZEDi9TSvlJUMbPUrSI0Er7dNNg\r\nzMA0UTm/k8/aP9RnqSihEpVnajf8EHCD9juWLQXLWmFsrxgDs+31SwNIjQo8\r\nmoRA1i7fpT08xlRCDNCRV38p/5Prq9GsXAHMQj2U6fvx5B1LpxwRUa4W21Z7\r\nDpt58gBW5QXtjGXOYt1ImHGbFD7kQ908Ra6GnsZ42LHyTkWGpBBndDnN87Q7\r\nMkvlqBZGIi3ZnJLwBeOyetFwXrNERQp55pHpY9Fqq0QISrYDwcFyjj/6AF1l\r\n71GoWdeuSz+Cz6vrtGij71M9r7Oog3+gsp+EDtj769Jk0xCFMSQhmVvI3fmp\r\nGHxSec4eLsR8ZGC7UnULc5loGPkls7YnkuYK5Q5APIeKOMtWoOYv+K5qT1K0\r\nq3BLXtCTizO2OJL30GTQO0EZZxVt9FyGekcqbMVlNud6zeXC7MpQsW7cYy9q\r\ne1q2BqXHhPO3WMHO+T9a0oKzUzN/gEwDpxfPRVLgHQJ4EIRbZaZdBFt46276\r\n287nWjYVLO+oJTN8WQgmcRqN4zqdOc7StDwJzAqjpEQwCGJVuF7h6vlN/AvX\r\ni0MEnXvep61RgWAtGBNOiKR8DPo3D8bL3kSspew7pnCbroXlTGa9/BI/yQX8\r\nottLYvzotwu04NPGlsUPgRXMmLeGBAQbVtY=\r\n=gd5H\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev?utm_source=github&utm_medium=clerk_backend_core\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <img src=\"https://images.clerk.dev/static/clerk.svg\" alt=\"Clerk logo\" height=\"50\">\n  </a>\n  <br />\n</p>\n\n# @clerk/backend-code\n\n<div align=\"center\">\n\n[![Chat on Discord](https://img.shields.io/discord/856971667393609759.svg?logo=discord)](https://discord.com/invite/b5rXHjAg7A)\n[![Clerk documentation](https://img.shields.io/badge/documentation-clerk-green.svg)](https://clerk.dev/docs?utm_source=github&utm_medium=clerk_backend_core)\n[![Follow on Twitter](https://img.shields.io/twitter/follow/ClerkDev?style=social)](https://twitter.com/intent/follow?screen_name=ClerkDev)\n\n[Changelog](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/CHANGELOG.md)\n·\n[Report a Bug](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=bug&template=bug_report.md&title=Bug%3A+)\n·\n[Request a Feature](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=Feature%3A+)\n·\n[Ask a Question](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n\n</div>\n\n---\n\n## Overview\n\nThis package provides Clerk Backend API core resources and low-level authentication utilities for JavaScript environments. It is mostly used as the base for other Clerk SDKs.\n\n## Getting Started\n\n### Installation\n\n```sh\nnpm install @clerk/backend-core\n```\n\n### Build\n\nTo build the package locally with the TypeScript compiler, run:\n\n```sh\nnpm run build\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities, without being platform/environment, specific such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendAPI](./src/api/ClerkBackendAPI.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendAPI` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n## Usage\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendAPI](./src/api/ClerkBackendAPI.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://reference.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendAPI.ts#17) implementation.\n\n## Support\n\nYou can get in touch with us in any of the following ways:\n\n- Join our official community [Discord server](https://discord.com/invite/b5rXHjAg7A)\n- Open a [GitHub support issue](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n- Contact options listed on [our Support page](https://clerk.dev/support?utm_source=github&utm_medium=clerk_backend_core)\n\n## Contributing\n\nWe're open to all community contributions! If you'd like to contribute in any way, please read [our contribution guidelines](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/CONTRIBUTING.md).\n\n## Security\n\n`@clerk/backend-core` follows good practices of security, but 100% security cannot be assured.\n\n`@clerk/backend-core` is provided **\"as is\"** without any **warranty**. Use at your own risk.\n\n_For more information and to report security issues, please refer to our [security documentation](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/SECURITY.md)._\n\n## License\n\nThis project is licensed under the **MIT license**.\n\nSee [LICENSE](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/LICENSE) for more information.\n","gitHead":"2091bff63205edb1cf231e2e39d838c3d3286a8b","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.15.0+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.15.0","dependencies":{"tslib":"^2.3.1","@clerk/types":"^3.0.0-next.1","query-string":"^7.0.1","snakecase-keys":"^5.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"got":"^11.0.0","jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","node-fetch":"^2.6.0","typescript":"^4.6.4","@types/jest":"^27.4.0","@types/node":"^16.11.12","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.3.2"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_1.14.0-next.1_1657722188783_0.30007819211930276","host":"s3://npm-registry-packages"}},"1.14.0-next.3":{"name":"@clerk/backend-core","version":"1.14.0-next.3","license":"MIT","_id":"@clerk/backend-core@1.14.0-next.3","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"e1736fd1dc24b7a26dba60dfe05de18b7448c64f","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-1.14.0-next.3.tgz","fileCount":523,"integrity":"sha512-cEgzBYbPvWIPaYDqjsdSQjJ6yLeNK+EpHKlrL7GIyVtfd0S0uSlaQrxyXL9twi3OXxDgnBUnI6CCXTY63pozTg==","signatures":[{"sig":"MEQCICOqTX+mFPySMlEupVW9jDzaR/eteq7IhjODtJuhCudzAiA5GmZOuHt9wKyPDFVPvhTN5Lg1Eeah8A6gJjUBs2XHBQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":764940,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiz22DACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr0gg/+JXYZ98Ga/QKZpaFrRD5mYCP+vQZNSURrvC99H+dDks4rrXUn\r\nehcM3yVv4/LwGO+vpWYqprznYW9AhHL70gVi8QNXhU7Gl9OxnWR0uC6RWPW4\r\nfgGAZFJZCjRIeerjL+6o3VbFvJyTS9/yG98FYU3mcM0vb2FuPnrP8G56rWDh\r\nuueZVnb+v8cJGDwgBLka8trmd8ggP3rNJc49/ULZLKpSAkl+rTo37NdnSh5o\r\nr89zIoQf7TWI1jgezz3Rx9lrmciQ6S3/5evd7tS1dNcBNhseIfKq/BZ7i6tR\r\n2xFEnphmBnFqLfH9KOdBwxfy191IjmYiizVX9bV3kpV5pibe+sfXbj3d6oia\r\nVBrxW17/w/dg60vCqEIdeHA6eCGemtX1fnGPTOtBQpxFzaGitXuBAeJq9bAG\r\niE44JYygmSul3fqX7wRlL2LsGzetlsR261mI46tZVSIeR5dzmKAwCjbj7Unx\r\np2CJlV/hTyuZBlOP1+90P3Dw6mI+gzW4SvMOp4phFxT+61D1gVLWR6jllfRq\r\nDDKmgaet8ad5cipF/h6rksqiabJ8Zo7ldPNjhBUiRo/LSmoUf0cwgmA8KDzu\r\nn6p+jpVMYl5bVP/Nv2miZ6TeiohFfgSdZmgerHlmGwIy2F36qOq8KudnJo8J\r\nrapf/lceUB2B8UHPgt2VLU9Hz/Tqj66LQC0=\r\n=lRL4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev?utm_source=github&utm_medium=clerk_backend_core\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <img src=\"https://images.clerk.dev/static/clerk.svg\" alt=\"Clerk logo\" height=\"50\">\n  </a>\n  <br />\n</p>\n\n# @clerk/backend-code\n\n<div align=\"center\">\n\n[![Chat on Discord](https://img.shields.io/discord/856971667393609759.svg?logo=discord)](https://discord.com/invite/b5rXHjAg7A)\n[![Clerk documentation](https://img.shields.io/badge/documentation-clerk-green.svg)](https://clerk.dev/docs?utm_source=github&utm_medium=clerk_backend_core)\n[![Follow on Twitter](https://img.shields.io/twitter/follow/ClerkDev?style=social)](https://twitter.com/intent/follow?screen_name=ClerkDev)\n\n[Changelog](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/CHANGELOG.md)\n·\n[Report a Bug](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=bug&template=bug_report.md&title=Bug%3A+)\n·\n[Request a Feature](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=Feature%3A+)\n·\n[Ask a Question](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n\n</div>\n\n---\n\n## Overview\n\nThis package provides Clerk Backend API core resources and low-level authentication utilities for JavaScript environments. It is mostly used as the base for other Clerk SDKs.\n\n## Getting Started\n\n### Installation\n\n```sh\nnpm install @clerk/backend-core\n```\n\n### Build\n\nTo build the package locally with the TypeScript compiler, run:\n\n```sh\nnpm run build\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities, without being platform/environment, specific such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendAPI](./src/api/ClerkBackendAPI.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendAPI` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n## Usage\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendAPI](./src/api/ClerkBackendAPI.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://reference.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendAPI.ts#17) implementation.\n\n## Support\n\nYou can get in touch with us in any of the following ways:\n\n- Join our official community [Discord server](https://discord.com/invite/b5rXHjAg7A)\n- Open a [GitHub support issue](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n- Contact options listed on [our Support page](https://clerk.dev/support?utm_source=github&utm_medium=clerk_backend_core)\n\n## Contributing\n\nWe're open to all community contributions! If you'd like to contribute in any way, please read [our contribution guidelines](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/CONTRIBUTING.md).\n\n## Security\n\n`@clerk/backend-core` follows good practices of security, but 100% security cannot be assured.\n\n`@clerk/backend-core` is provided **\"as is\"** without any **warranty**. Use at your own risk.\n\n_For more information and to report security issues, please refer to our [security documentation](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/SECURITY.md)._\n\n## License\n\nThis project is licensed under the **MIT license**.\n\nSee [LICENSE](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/LICENSE) for more information.\n","gitHead":"9a9514eaf872fd8caaec598ed8d02bfa58c0f5ca","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.15.0+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.15.0","dependencies":{"tslib":"^2.3.1","@clerk/types":"^3.0.0-next.3","query-string":"^7.0.1","snakecase-keys":"^5.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"got":"^11.0.0","jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","node-fetch":"^2.6.0","typescript":"^4.6.4","@types/jest":"^27.4.0","@types/node":"^16.11.12","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.3.2"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_1.14.0-next.3_1657761154982_0.7055484316693446","host":"s3://npm-registry-packages"}},"1.14.0-next.4":{"name":"@clerk/backend-core","version":"1.14.0-next.4","license":"MIT","_id":"@clerk/backend-core@1.14.0-next.4","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"96406eec5102e2b968ea4f5d16961a55edc16d0c","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-1.14.0-next.4.tgz","fileCount":523,"integrity":"sha512-GQUFLf2wgnwWS0ovt+szZswNt4pqTBqBYbYM+62w1pf0z/Y+Gk+ezvZJdnw+di8nr4n9WiD5rfuq4wRfO1sLDw==","signatures":[{"sig":"MEUCIQCbzd986IsWXt2poQZV3FoLP2+UaqPOUs+cFegf0J9iDgIgGqRilxbZOH0Of2Nmsa8u3xedA2U4L0KycNaAJdBAs9U=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":764940,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi0KkAACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmonVg//ZIBe+nCvk7BsGgdVudLr5V4zIZgVPmWCUXuWeJqHPTT+qEPg\r\nQLqjI8ta210uxrxTMIfwd9ITll6Urzq/2CGFBYBW3zbfgkJducB4x3dNy/ki\r\nha+Je0UuVaV5fwvNGOWe0Mkqh7fqVB1wr3ts7XXtNFWEwqXy+eD/oCZPuenr\r\nok0XbxYYZvxS9ISNHfaJObRrm3rNDATOxOfvUr/1rOI6keINoTuGmCfI2evS\r\nAzfAkBoILmvbkPHyCfuPMIMHO9oedcyS2taj8bcXiQap7DDE8ioqg7qtUnWl\r\nSH8u8r6pilb5KEVXThisp6nbiTMIPE4Xv1c+oLz2ETGvW1z0XC24PA6IGGpD\r\noSkZNdXU5l6OjwXMvGuyRh92Js5ykmEG910soMQZK5nyPtrvgQbgfvABSodL\r\nygsK2nzLyE0YVnsqChWBG5PtnIkn5EPpSiXggO37+fbB/w28wp/d/+1a3J+s\r\nWjkH0PpLEWzb/SjoHqOQSKTwk7MHxgARCVYuyprR0jsL0MUO1/8RBYGsQmWX\r\ni/3CWrup3srEE/9D1kRSJFAC+9e0Sn/RV06wh23bMhrN2M5mRPGEW2Sscal1\r\nKzpeav2A8jYR63ZxOdsORgFVxW0F+eaLOKQt/IccTZGoWdb//t0cuG9/YBgm\r\nGILrxR2+hqAd3sAlWMPwa1GQgplFaIh0z/4=\r\n=ac6V\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev?utm_source=github&utm_medium=clerk_backend_core\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <img src=\"https://images.clerk.dev/static/clerk.svg\" alt=\"Clerk logo\" height=\"50\">\n  </a>\n  <br />\n</p>\n\n# @clerk/backend-code\n\n<div align=\"center\">\n\n[![Chat on Discord](https://img.shields.io/discord/856971667393609759.svg?logo=discord)](https://discord.com/invite/b5rXHjAg7A)\n[![Clerk documentation](https://img.shields.io/badge/documentation-clerk-green.svg)](https://clerk.dev/docs?utm_source=github&utm_medium=clerk_backend_core)\n[![Follow on Twitter](https://img.shields.io/twitter/follow/ClerkDev?style=social)](https://twitter.com/intent/follow?screen_name=ClerkDev)\n\n[Changelog](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/CHANGELOG.md)\n·\n[Report a Bug](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=bug&template=bug_report.md&title=Bug%3A+)\n·\n[Request a Feature](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=Feature%3A+)\n·\n[Ask a Question](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n\n</div>\n\n---\n\n## Overview\n\nThis package provides Clerk Backend API core resources and low-level authentication utilities for JavaScript environments. It is mostly used as the base for other Clerk SDKs.\n\n## Getting Started\n\n### Installation\n\n```sh\nnpm install @clerk/backend-core\n```\n\n### Build\n\nTo build the package locally with the TypeScript compiler, run:\n\n```sh\nnpm run build\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities, without being platform/environment, specific such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendAPI](./src/api/ClerkBackendAPI.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendAPI` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n## Usage\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendAPI](./src/api/ClerkBackendAPI.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://reference.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendAPI.ts#17) implementation.\n\n## Support\n\nYou can get in touch with us in any of the following ways:\n\n- Join our official community [Discord server](https://discord.com/invite/b5rXHjAg7A)\n- Open a [GitHub support issue](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n- Contact options listed on [our Support page](https://clerk.dev/support?utm_source=github&utm_medium=clerk_backend_core)\n\n## Contributing\n\nWe're open to all community contributions! If you'd like to contribute in any way, please read [our contribution guidelines](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/CONTRIBUTING.md).\n\n## Security\n\n`@clerk/backend-core` follows good practices of security, but 100% security cannot be assured.\n\n`@clerk/backend-core` is provided **\"as is\"** without any **warranty**. Use at your own risk.\n\n_For more information and to report security issues, please refer to our [security documentation](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/SECURITY.md)._\n\n## License\n\nThis project is licensed under the **MIT license**.\n\nSee [LICENSE](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/LICENSE) for more information.\n","gitHead":"4f43d1a27997559692f7ccba1628f595452f047d","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.15.0+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.15.0","dependencies":{"tslib":"^2.3.1","@clerk/types":"^3.0.0-next.4","query-string":"^7.0.1","snakecase-keys":"^5.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"got":"^11.0.0","jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","node-fetch":"^2.6.0","typescript":"^4.6.4","@types/jest":"^27.4.0","@types/node":"^16.11.12","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.3.2"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_1.14.0-next.4_1657841919818_0.42227610906064306","host":"s3://npm-registry-packages"}},"1.14.0-next.5":{"name":"@clerk/backend-core","version":"1.14.0-next.5","license":"MIT","_id":"@clerk/backend-core@1.14.0-next.5","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"98acaae82cef91263d3e71e5ba842d246fdf6ce4","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-1.14.0-next.5.tgz","fileCount":523,"integrity":"sha512-c8DnNsE0w8KY/1uLEYFHBG+c54a2KoNN/jZZOP9b7MAqn+dKEawJVmsAo64V1rz3Zw72NFMpwfRfo0oPqeVGXg==","signatures":[{"sig":"MEUCIHfOt2Ds7jNbkgfJsIvGlnOI+EpObkrjpBVmySguBX6CAiEAuY34gIs0zJTC63Erq6KE4wRkCKxTJdD4NebOJSfQcW4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":764940,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi0KoaACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpKvg/+N+rtsfdJv1/+UF45taUbr4HsQfM6tDohFNJM7PN5OoIQ6YsF\r\nT7TPynRkPMGAj2qGexRtvRCW43ll/Xg/i11+4yGP9N6E/eNI8gO8YctzmFiq\r\nOpC0zOgg3e1Re7NuXu44CBsq7ASqKr4YkETQUWriOYNkBIkyANJgpgZrV5zh\r\nl02CqNszO5vM+tGcgSGeFayzSKk+pKHFHMLoYromGP2piDbSk3Ud6fn9wnis\r\nCCeaS+X0KQZzwpSPON7vg68sPkGlC7K2kdULKWgRZ9Ww0LopwadCdfKYl7BH\r\n8khNhlss/M0AEAx4RCoEKCzVt/ZrUO2B5waxiEQmuTqc6jnTy+LVLyr29IjD\r\nQ0Gt9gSu9efpWXPcTYcjJ90mzea/YigEp26ohYnD2bIUHG1eZd4RzdjCF1wq\r\nOHZ7LiKBfBx3EU823HXdG1++dy82W2VjynVygIapiF1HL7V/U41V4dWyDWNc\r\niNsmyfXe1bspdx5ZHcnSco66bY4N4S2pxWywFiL1Sx9nYCF+JQXS81j9PFFR\r\n6O91GauVLFwkK+GVaIxwg1e3xUw9915jqxXew7AnjDGY8Gz/0qhzz4qqtpG0\r\ntDHSBWVLhuQEH+95elfgR0Zp0s97WzcURGP5wTyH5JvbUQD6hxWA9MleumBH\r\ngGE7bhNUweOWQ7OUrmNSlMoTZNAarytZpTc=\r\n=2EoQ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev?utm_source=github&utm_medium=clerk_backend_core\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <img src=\"https://images.clerk.dev/static/clerk.svg\" alt=\"Clerk logo\" height=\"50\">\n  </a>\n  <br />\n</p>\n\n# @clerk/backend-code\n\n<div align=\"center\">\n\n[![Chat on Discord](https://img.shields.io/discord/856971667393609759.svg?logo=discord)](https://discord.com/invite/b5rXHjAg7A)\n[![Clerk documentation](https://img.shields.io/badge/documentation-clerk-green.svg)](https://clerk.dev/docs?utm_source=github&utm_medium=clerk_backend_core)\n[![Follow on Twitter](https://img.shields.io/twitter/follow/ClerkDev?style=social)](https://twitter.com/intent/follow?screen_name=ClerkDev)\n\n[Changelog](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/CHANGELOG.md)\n·\n[Report a Bug](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=bug&template=bug_report.md&title=Bug%3A+)\n·\n[Request a Feature](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=Feature%3A+)\n·\n[Ask a Question](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n\n</div>\n\n---\n\n## Overview\n\nThis package provides Clerk Backend API core resources and low-level authentication utilities for JavaScript environments. It is mostly used as the base for other Clerk SDKs.\n\n## Getting Started\n\n### Installation\n\n```sh\nnpm install @clerk/backend-core\n```\n\n### Build\n\nTo build the package locally with the TypeScript compiler, run:\n\n```sh\nnpm run build\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities, without being platform/environment, specific such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendAPI](./src/api/ClerkBackendAPI.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendAPI` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n## Usage\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendAPI](./src/api/ClerkBackendAPI.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://reference.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendAPI.ts#17) implementation.\n\n## Support\n\nYou can get in touch with us in any of the following ways:\n\n- Join our official community [Discord server](https://discord.com/invite/b5rXHjAg7A)\n- Open a [GitHub support issue](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n- Contact options listed on [our Support page](https://clerk.dev/support?utm_source=github&utm_medium=clerk_backend_core)\n\n## Contributing\n\nWe're open to all community contributions! If you'd like to contribute in any way, please read [our contribution guidelines](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/CONTRIBUTING.md).\n\n## Security\n\n`@clerk/backend-core` follows good practices of security, but 100% security cannot be assured.\n\n`@clerk/backend-core` is provided **\"as is\"** without any **warranty**. Use at your own risk.\n\n_For more information and to report security issues, please refer to our [security documentation](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/SECURITY.md)._\n\n## License\n\nThis project is licensed under the **MIT license**.\n\nSee [LICENSE](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/LICENSE) for more information.\n","gitHead":"658511834393bda947f390e017bab200ac902bc7","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.15.0+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.15.0","dependencies":{"tslib":"^2.3.1","@clerk/types":"^3.0.0-next.5","query-string":"^7.0.1","snakecase-keys":"^5.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"got":"^11.0.0","jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","node-fetch":"^2.6.0","typescript":"^4.6.4","@types/jest":"^27.4.0","@types/node":"^16.11.12","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.3.2"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_1.14.0-next.5_1657842201755_0.921793109669621","host":"s3://npm-registry-packages"}},"2.0.0-next.0":{"name":"@clerk/backend-core","version":"2.0.0-next.0","license":"MIT","_id":"@clerk/backend-core@2.0.0-next.0","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"8f871db4a93e45008245f4b8a5d797f57ce2704e","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.0.0-next.0.tgz","fileCount":523,"integrity":"sha512-KVfRzmAVGRHYTIFoQKdW5jhqFAph3SO/Yz2uQ3Jr/aoGa/sykLNXrd2yqps3QiMp+5f0Q8BR1YH3vwljLYABfA==","signatures":[{"sig":"MEUCICn3nPzpfPY7A5Mu0EHo2yHJD82/0ru0ZW2y0YckmEW0AiEAnCgwEBZE7zWu9w7G6e8n4uf1ZPavGJPygSbbdgodeok=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":764978,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi1LOeACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqYVw/9EpNd3sPDicdrZQXW4ZBjQJTyMAn+cpX4LtAIK20NEQJMNixV\r\nKM+kZ+NhwHs9/axzp+kzq8Co1JRv1uuT4gj7qE7hRN92RW5TknOvpfjoPs5x\r\nMs5ZMCW1/8Sf9a+465vZSJG9vhPpfWqfSaZxI3L5iuv3GVK8KuZvxiqJx3up\r\nkLsNfShyT8iShxNgpX7tNm6nOdV747PqFSv/8q8yAkEVCIuxNRhPPqk4h8XA\r\npJ+7nMeyKUVrQ1h1qmmJDkZVoLp1AMuXWA2yNABLYD81+bQlOGr1U5ice1eI\r\nCuiY2WgqliI7t709DTiIcNRLUOc0mfjkbk7nJTP9vfuyJD2Y4TJcoerjAyUI\r\naFsHVy4bAEYs6I3TRlGLqfK9F1cjymbk3839h3RHZY15c2j9J/xK4hrt2JqW\r\nCWn4aRUJplGnE2dns+HBz473feA62Lp9X8uiKxmKvRk/1FZRYPrJlCiPbikr\r\nyuZrrYYDBfg6oznwVHcDTx17cmLXcToxmbxENoHX2y0TNJg7roMTaOMZmnZ0\r\nJ2GgxOuEtrIY2Fsx7LjlPSBSD2KnWtblyZkN92rQG/nOhCNxEEk9jNSuWNcC\r\niru3RwoOtXUGqOUgJsSgTkCFiaxeXI5Ar2oXnakctdp+T+f1ODMNTdLPVIb/\r\n7W4UzwTm7cT8QfxBqzd7Via6VNsaTVM/zHk=\r\n=5Xj9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev?utm_source=github&utm_medium=clerk_backend_core\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <img src=\"https://images.clerk.dev/static/clerk.svg\" alt=\"Clerk logo\" height=\"50\">\n  </a>\n  <br />\n</p>\n\n# @clerk/backend-code\n\n<div align=\"center\">\n\n[![Chat on Discord](https://img.shields.io/discord/856971667393609759.svg?logo=discord)](https://discord.com/invite/b5rXHjAg7A)\n[![Clerk documentation](https://img.shields.io/badge/documentation-clerk-green.svg)](https://clerk.dev/docs?utm_source=github&utm_medium=clerk_backend_core)\n[![Follow on Twitter](https://img.shields.io/twitter/follow/ClerkDev?style=social)](https://twitter.com/intent/follow?screen_name=ClerkDev)\n\n[Changelog](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/CHANGELOG.md)\n·\n[Report a Bug](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=bug&template=bug_report.md&title=Bug%3A+)\n·\n[Request a Feature](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=Feature%3A+)\n·\n[Ask a Question](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n\n</div>\n\n---\n\n## Overview\n\nThis package provides Clerk Backend API core resources and low-level authentication utilities for JavaScript environments. It is mostly used as the base for other Clerk SDKs.\n\n## Getting Started\n\n### Installation\n\n```sh\nnpm install @clerk/backend-core\n```\n\n### Build\n\nTo build the package locally with the TypeScript compiler, run:\n\n```sh\nnpm run build\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities, without being platform/environment, specific such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendAPI](./src/api/ClerkBackendAPI.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendAPI` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n## Usage\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendAPI](./src/api/ClerkBackendAPI.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://reference.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendAPI.ts#17) implementation.\n\n## Support\n\nYou can get in touch with us in any of the following ways:\n\n- Join our official community [Discord server](https://discord.com/invite/b5rXHjAg7A)\n- Open a [GitHub support issue](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n- Contact options listed on [our Support page](https://clerk.dev/support?utm_source=github&utm_medium=clerk_backend_core)\n\n## Contributing\n\nWe're open to all community contributions! If you'd like to contribute in any way, please read [our contribution guidelines](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/CONTRIBUTING.md).\n\n## Security\n\n`@clerk/backend-core` follows good practices of security, but 100% security cannot be assured.\n\n`@clerk/backend-core` is provided **\"as is\"** without any **warranty**. Use at your own risk.\n\n_For more information and to report security issues, please refer to our [security documentation](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/SECURITY.md)._\n\n## License\n\nThis project is licensed under the **MIT license**.\n\nSee [LICENSE](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/LICENSE) for more information.\n","engines":{"node":">=14"},"gitHead":"6164f7ff9e623a2c6e6b0ccce2a0f2359bdeefc2","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.15.0+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.15.0","dependencies":{"tslib":"^2.3.1","@clerk/types":"^3.0.0-next.6","query-string":"^7.0.1","snakecase-keys":"^5.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"got":"^11.0.0","jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","node-fetch":"^2.6.0","typescript":"^4.6.4","@types/jest":"^27.4.0","@types/node":"^16.11.12","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.3.2"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.0.0-next.0_1658106782350_0.07446592829718757","host":"s3://npm-registry-packages"}},"2.0.0-next.1":{"name":"@clerk/backend-core","version":"2.0.0-next.1","license":"MIT","_id":"@clerk/backend-core@2.0.0-next.1","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"c6a9aa82c5a1926c79420fad581ba5b5ed067e75","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.0.0-next.1.tgz","fileCount":648,"integrity":"sha512-x1uy9jUg1mBpjtOXsr/GrQolqlREB1HHGzft558O908vt3ApFGB7WD8pkJJIzbL3rFJt0tWnD6tGaGP9gp/8hw==","signatures":[{"sig":"MEYCIQCMuT5bFvfv0BlhRu+Nv/Ma9LOwmUJ0O1OIiMm2D/RN3QIhAM5ZLibIMRge11w58q6wB4L9r9qHbLDpQFfcdbuLI/z7","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":859190,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi1jNHACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqX8A//dWa9YeVl8q+Ea3FtVuJmQqYlZwcxpKJQPBxWRSKhYjZ5vwvY\r\nokKSVl9ATwr+S/AgoHt3etqFMtlfUF0aCterGHEPFqY3gJ0BZFDLrThOsQ5T\r\nWlBqVckYLYHeIbo1/jV7sakOuz9Y9UMCY80e2UO2EpwpJLZVmtVnJiuc1eUe\r\n+lTZxwGOO1M9GGdrj0dWUsHX2u3PQAhl6tdfoYYRP16Vu1EyvlT5qg4PuPem\r\nWs03Hv61vgp7fqM7dQyM8fQiJQ75q9k1S8MejlHMPZ4gKvsNW5c4Z2tscu4w\r\nLRlS6xw5NbdZMoZ2S18GHGZTzFhJOjOLTIOKvfoOsB5XFNROgNhjB8w77grP\r\nAFIR1AXveQwirvN4CU+gLp0InYYBSKFSJO6Bjq2n1K/piEeHBXyQk/gsRMPg\r\n74nsRAyAD7U4I5bIwllhknH6MceExgELHAsHr23d4vfF4r6Tbd5qV88C9LhE\r\n486I4V0ptpXXyzAPPCoBQj3oZtMdOFV23G5cfUs5RqQTpzj16ujir08cRL5M\r\nokiwj/NV9OewlnpCtx1ZIX0VLgjZ1BxBbp4FY+o/ma7YnJKk3vOOdF0z59wc\r\nkAPWFfU0h58QTFQiboYFMhvY1IckJaJBh+g7wIqhJkpAjmAHA28tuHvWL80/\r\najCinRCMr13ZyCfkb2nzdDtIqL1NMRQU8VE=\r\n=7m6P\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev?utm_source=github&utm_medium=clerk_backend_core\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <img src=\"https://images.clerk.dev/static/clerk.svg\" alt=\"Clerk logo\" height=\"50\">\n  </a>\n  <br />\n</p>\n\n# @clerk/backend-code\n\n<div align=\"center\">\n\n[![Chat on Discord](https://img.shields.io/discord/856971667393609759.svg?logo=discord)](https://discord.com/invite/b5rXHjAg7A)\n[![Clerk documentation](https://img.shields.io/badge/documentation-clerk-green.svg)](https://clerk.dev/docs?utm_source=github&utm_medium=clerk_backend_core)\n[![Follow on Twitter](https://img.shields.io/twitter/follow/ClerkDev?style=social)](https://twitter.com/intent/follow?screen_name=ClerkDev)\n\n[Changelog](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/CHANGELOG.md)\n·\n[Report a Bug](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=bug&template=bug_report.md&title=Bug%3A+)\n·\n[Request a Feature](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=Feature%3A+)\n·\n[Ask a Question](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n\n</div>\n\n---\n\n## Overview\n\nThis package provides Clerk Backend API core resources and low-level authentication utilities for JavaScript environments. It is mostly used as the base for other Clerk SDKs.\n\n## Getting Started\n\n### Installation\n\n```sh\nnpm install @clerk/backend-core\n```\n\n### Build\n\nTo build the package locally with the TypeScript compiler, run:\n\n```sh\nnpm run build\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities, without being platform/environment, specific such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendAPI](./src/api/ClerkBackendAPI.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendAPI` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n## Usage\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendAPI](./src/api/ClerkBackendAPI.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://reference.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendAPI.ts#17) implementation.\n\n## Support\n\nYou can get in touch with us in any of the following ways:\n\n- Join our official community [Discord server](https://discord.com/invite/b5rXHjAg7A)\n- Open a [GitHub support issue](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n- Contact options listed on [our Support page](https://clerk.dev/support?utm_source=github&utm_medium=clerk_backend_core)\n\n## Contributing\n\nWe're open to all community contributions! If you'd like to contribute in any way, please read [our contribution guidelines](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/CONTRIBUTING.md).\n\n## Security\n\n`@clerk/backend-core` follows good practices of security, but 100% security cannot be assured.\n\n`@clerk/backend-core` is provided **\"as is\"** without any **warranty**. Use at your own risk.\n\n_For more information and to report security issues, please refer to our [security documentation](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/SECURITY.md)._\n\n## License\n\nThis project is licensed under the **MIT license**.\n\nSee [LICENSE](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/LICENSE) for more information.\n","engines":{"node":">=14"},"gitHead":"173951e13e2f6970014b668068abef2de404868a","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.15.0+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.15.0","dependencies":{"tslib":"^2.3.1","@clerk/types":"^3.0.0-next.7","query-string":"^7.0.1","snakecase-keys":"^5.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","node-fetch":"^2.6.0","typescript":"^4.6.4","@types/jest":"^27.4.0","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.3.2"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.0.0-next.1_1658204998924_0.9977489336789351","host":"s3://npm-registry-packages"}},"1.14.0-staging.0":{"name":"@clerk/backend-core","version":"1.14.0-staging.0","license":"MIT","_id":"@clerk/backend-core@1.14.0-staging.0","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"19a43fc3f951d86c0548b127dcd079b4ee9dcf08","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-1.14.0-staging.0.tgz","fileCount":636,"integrity":"sha512-U2WvpIqAh1tx+eLWyPK9tYVzNGn0DYJUZKSV9pFDqcwhHupwN0GVOzvV3dilrQ0m1JM6vW2o1E6Ktw4XXLkYLA==","signatures":[{"sig":"MEQCIC5CfO9NSezOg4sfJ5ZKhQSxitrHVf41+DLd5xysXpbgAiADubg6uiyNR0khaOxmD5BjucYI5vE0d4hEKEoJ9bYqHQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":833787,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi1/1WACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqcmg/7BDzJyqJF8+0hxQUWFXAVsG2uduHZdKEvHarEaBrevhL225un\r\nQ52gImEl8qcIpCOnPTaKF5P8sLVubMSjgzlLCxntllVP59CupbEoJzHgTVee\r\nJhG/sLE19pRr1QpvJDeIgxuIbrGsx0oBk+GFlux67DpB57QPuI7mR26By2Ia\r\nb4xBnpDYKtQ6ITVxq81VvndaX3d9wuX0pHqbKbhPgd6ZIYHgg9kJ4ScyABxT\r\nYzFkIlrKot+FNIki6Zh0+A/RpFdFGtdtMR8XFZpGeBdgmwjENPv97mpzIwoh\r\nBKJ/OB0S/ZxZKDbYWR2M4lc4zxU8BOWlXZhT5152Hrpyxh0TmJskSx9HJUiP\r\ncimIYD5W7ufYXsjcw8oUsNgtmot7V5s725yhg9GINk1rPGZRpQVjSCmqRkBw\r\nwRT8R+BMho+gW2DUs5S+nhY1+2VEhEkJc/3GBfqyho2T98ctqMXq4qjqrKxy\r\np+3GkId3+/NssR2WZAZMJdSrxcilZogR3BIOg24xUo/fa/Nw6HGKPKbuse6L\r\n9QABtwdx7O7qrO6TTEL1Hc3BnLq6G/u/rm63VKfipeg03UeN5P3Trhh1xxtN\r\nbtbdELGsdTzpJep8RegBuvLfp+rOkMPqAB5SZwX0CT7jqlkD8d8Jcuw3OclG\r\n83acTj88wCtuzi9wksL+nzoqFtMRGUhnVHI=\r\n=J9wY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev?utm_source=github&utm_medium=clerk_backend_core\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <img src=\"https://images.clerk.dev/static/clerk.svg\" alt=\"Clerk logo\" height=\"50\">\n  </a>\n  <br />\n</p>\n\n# @clerk/backend-code\n\n<div align=\"center\">\n\n[![Chat on Discord](https://img.shields.io/discord/856971667393609759.svg?logo=discord)](https://discord.com/invite/b5rXHjAg7A)\n[![Clerk documentation](https://img.shields.io/badge/documentation-clerk-green.svg)](https://clerk.dev/docs?utm_source=github&utm_medium=clerk_backend_core)\n[![Follow on Twitter](https://img.shields.io/twitter/follow/ClerkDev?style=social)](https://twitter.com/intent/follow?screen_name=ClerkDev)\n\n[Changelog](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/CHANGELOG.md)\n·\n[Report a Bug](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=bug&template=bug_report.md&title=Bug%3A+)\n·\n[Request a Feature](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=Feature%3A+)\n·\n[Ask a Question](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n\n</div>\n\n---\n\n## Overview\n\nThis package provides Clerk Backend API core resources and low-level authentication utilities for JavaScript environments. It is mostly used as the base for other Clerk SDKs.\n\n## Getting Started\n\n### Installation\n\n```sh\nnpm install @clerk/backend-core\n```\n\n### Build\n\nTo build the package locally with the TypeScript compiler, run:\n\n```sh\nnpm run build\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities, without being platform/environment, specific such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendAPI](./src/api/ClerkBackendAPI.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendAPI` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n## Usage\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendAPI](./src/api/ClerkBackendAPI.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://reference.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendAPI.ts#17) implementation.\n\n## Support\n\nYou can get in touch with us in any of the following ways:\n\n- Join our official community [Discord server](https://discord.com/invite/b5rXHjAg7A)\n- Open a [GitHub support issue](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n- Contact options listed on [our Support page](https://clerk.dev/support?utm_source=github&utm_medium=clerk_backend_core)\n\n## Contributing\n\nWe're open to all community contributions! If you'd like to contribute in any way, please read [our contribution guidelines](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/CONTRIBUTING.md).\n\n## Security\n\n`@clerk/backend-core` follows good practices of security, but 100% security cannot be assured.\n\n`@clerk/backend-core` is provided **\"as is\"** without any **warranty**. Use at your own risk.\n\n_For more information and to report security issues, please refer to our [security documentation](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/SECURITY.md)._\n\n## License\n\nThis project is licensed under the **MIT license**.\n\nSee [LICENSE](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/LICENSE) for more information.\n","gitHead":"b852405d6531f8f5d2f97ec5dce06b5b588fada0","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"sokratis","email":"sokratis.vidros@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.13.0+x64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.13.0","dependencies":{"tslib":"^2.3.1","@clerk/types":"^2.20.0","query-string":"^7.0.1","snakecase-keys":"^5.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","node-fetch":"^2.6.0","typescript":"^4.6.4","@types/jest":"^27.4.0","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.3.2"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_1.14.0-staging.0_1658322261745_0.3751853202232207","host":"s3://npm-registry-packages"}},"1.14.0":{"name":"@clerk/backend-core","version":"1.14.0","license":"MIT","_id":"@clerk/backend-core@1.14.0","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"a7deacfa5aec7bd05ea554eefd9e54fbb72be152","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-1.14.0.tgz","fileCount":636,"integrity":"sha512-M760OSe8aQH/TyoD4KlMptSAsnJnYEvF5DncZNpqIFdLhw90BAvCTtq3HGpOfAUW+MNIBG6+LLbm2Z0UQjrucQ==","signatures":[{"sig":"MEUCIDio0TonJ0Fb6Sb3EHDr9Wd8KCahSMei5AUEqOCVIBwkAiEArLTQ7LCyL6x8COqTVRxlkYBCYQ5mTtGnUq7mHQEjK6s=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":837132,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi367QACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpYIA//UTKKB6x9eHhdzYX0LO56lLKKdPf1W1aFLPSJL1ZTlnI1sbuh\r\nyUihLOBeErJunRn+BWhHSWbRQi+wAjZbQGhV93tzZ06UP9lhZFshOZljlh85\r\nRAIy9yu2aEdtbBoBbIDVceK4mVrLGhd7Ujl9rxbpPSTVsUouGJQPI6yjXkpp\r\nrOz3UqXqcuNNm52QpKZDSvJpOAwmXcdLzkaGTsnYLYAGfkJKb6T5mOnYPAL1\r\nCSmRj7usIcJA4/GGN2jxRRHYNyLtgQQYxjXlTFJy2ghFO7JQ6OSI7SF4d2Tt\r\nzlOdQS3HsjyfqPwvkU1vOrbKeNqlYaF6vPVDnB51UTtsdgMoK604pkbx9oiN\r\nN7TSXLdxG8D1P+EDXxoR1zZGai3Xw0kpmPpIAvbXG0JLlDgdQFec48Aj+3td\r\nPlLR9tVUUhUobZmfyGmGGnxXVNp7vL8/m5Ff3yGSAA6jXusisV61opI978iv\r\nCgE5Se81MvMs/W2Ph605bBlfjLBohXSvyjRL6enQfokKp0Jp7tPpSWHu8a5T\r\nSl8xzIdPVI75wDBqWrkrLqFTnO/3mxcTYiZpyAkLLgJeAUG4en2hpRoWMn+q\r\nAWGSXgvOzPULo99/NX2JFKKH+0rSvvD5JBGRmxBC/LhTBQV4hU6wiBsLy5vW\r\nLR6RuOh1H2yc+DW3Yy8b+wQJeen8JYqZVU0=\r\n=1VOc\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","gitHead":"496a90657f029a3718160c9184314279936ab211","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"sokratis","email":"sokratis.vidros@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.13.0+x64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.13.0","dependencies":{"tslib":"^2.3.1","@clerk/types":"^2.20.0","query-string":"^7.0.1","snakecase-keys":"^5.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","node-fetch":"^2.6.0","typescript":"^4.6.4","@types/jest":"^27.4.0","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.3.2"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_1.14.0_1658826448477_0.7203516347404355","host":"s3://npm-registry-packages"}},"2.0.0-next.2":{"name":"@clerk/backend-core","version":"2.0.0-next.2","license":"MIT","_id":"@clerk/backend-core@2.0.0-next.2","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"1edbd9f10eed1cae84ed14449e64b21fa483f0e9","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.0.0-next.2.tgz","fileCount":648,"integrity":"sha512-gRts3J/xhfG2mKuH+sQBfFJw8srveBzC6ho3G8gqHrDGiyRMYfQ85VS13PSFiW3HWCs5sU+pSxA/3KVG2YDxIA==","signatures":[{"sig":"MEYCIQCxyZhKHJTm8+tYDwOmQ8vpsZ7HDqyPu2o7q9nEfTzg0AIhAJS0MwKvtg8ftw/y93+dWAjn9GSF7I3acllOfSlEhMqW","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":859190,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi4Qs/ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrgMA/+NquWNaQOenzMWrGFR+B+Rhst9+BcxoMuKCb5xu4yBllD5Vp9\r\nyF8521bjH2b+/If1lWRFCkWMBgLXEm3UKzFgJOb1mNzerwqLVuMaHIddbGdK\r\nXjA6HhPK59d7MOOH+Ip19ZNnKavNRW9dMfzfPEK9BbcppN35Mqx1QQnHbyLi\r\n/ICVUW6FFxM3BLRp8kZZxqUcyCqS8Qv2rRs52kRzGK7DuxG2lPVl8KW1FhEg\r\nM0NzkjSVyRGxUDjJeleGzr0Cc2l0fH15TPXj3NlHzCi/E4DePliYVxDBX4Dg\r\nhkn1Da5JJyMxKux5B+V5z5PoS+8QXcZFL++AXdkhnR8uuV5xhyCNcG7LUFvd\r\nYm+6wk1Md2LYUWAKTrnGMa117vKtYmbDZFjgga7nj1D0UaYc/yXTUOyZINeL\r\n/AHWwVEcTZdj31sm/tIdV7XOQzpePwJjP+KYw4eviMgZ+9zfdlDuE0tjoJlu\r\noB7L/fnjQjGrvG+JyWCkTQtB8aUSZI9XzKU07wW74sjJarkUJMFfjJs/RTV2\r\nqqBWVDI5KC5Ofp+BcKLyUaQQMZwTGTBeyFWfXREpZr4lb+r/9e8yLqMZZSW+\r\nivcL0ErCY5fNCNGQwwy4K/gOpsHw796Qk0z85o3MzS9cfTXFI5/tvYHDaUsq\r\n5h3W659aCUyDjvLlNuNxW191xSc+/nha3DU=\r\n=pYSc\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev?utm_source=github&utm_medium=clerk_backend_core\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <img src=\"https://images.clerk.dev/static/clerk.svg\" alt=\"Clerk logo\" height=\"50\">\n  </a>\n  <br />\n</p>\n\n# @clerk/backend-code\n\n<div align=\"center\">\n\n[![Chat on Discord](https://img.shields.io/discord/856971667393609759.svg?logo=discord)](https://discord.com/invite/b5rXHjAg7A)\n[![Clerk documentation](https://img.shields.io/badge/documentation-clerk-green.svg)](https://clerk.dev/docs?utm_source=github&utm_medium=clerk_backend_core)\n[![Follow on Twitter](https://img.shields.io/twitter/follow/ClerkDev?style=social)](https://twitter.com/intent/follow?screen_name=ClerkDev)\n\n[Changelog](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/CHANGELOG.md)\n·\n[Report a Bug](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=bug&template=bug_report.md&title=Bug%3A+)\n·\n[Request a Feature](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=Feature%3A+)\n·\n[Ask a Question](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n\n</div>\n\n---\n\n## Overview\n\nThis package provides Clerk Backend API core resources and low-level authentication utilities for JavaScript environments. It is mostly used as the base for other Clerk SDKs.\n\n## Getting Started\n\n### Installation\n\n```sh\nnpm install @clerk/backend-core\n```\n\n### Build\n\nTo build the package locally with the TypeScript compiler, run:\n\n```sh\nnpm run build\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities, without being platform/environment, specific such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendAPI](./src/api/ClerkBackendAPI.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendAPI` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n## Usage\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendAPI](./src/api/ClerkBackendAPI.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://reference.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendAPI.ts#17) implementation.\n\n## Support\n\nYou can get in touch with us in any of the following ways:\n\n- Join our official community [Discord server](https://discord.com/invite/b5rXHjAg7A)\n- Open a [GitHub support issue](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n- Contact options listed on [our Support page](https://clerk.dev/support?utm_source=github&utm_medium=clerk_backend_core)\n\n## Contributing\n\nWe're open to all community contributions! If you'd like to contribute in any way, please read [our contribution guidelines](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/CONTRIBUTING.md).\n\n## Security\n\n`@clerk/backend-core` follows good practices of security, but 100% security cannot be assured.\n\n`@clerk/backend-core` is provided **\"as is\"** without any **warranty**. Use at your own risk.\n\n_For more information and to report security issues, please refer to our [security documentation](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/SECURITY.md)._\n\n## License\n\nThis project is licensed under the **MIT license**.\n\nSee [LICENSE](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/LICENSE) for more information.\n","engines":{"node":">=14"},"gitHead":"b1a6d69c6c73f944fb0fe65c499c7358dfc4368e","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.15.0+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.15.0","dependencies":{"tslib":"^2.3.1","@clerk/types":"^3.0.0-next.8","query-string":"^7.0.1","snakecase-keys":"^5.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","node-fetch":"^2.6.0","typescript":"^4.6.4","@types/jest":"^27.4.0","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.3.2"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.0.0-next.2_1658915646739_0.7431854360826868","host":"s3://npm-registry-packages"}},"2.0.0-next.3":{"name":"@clerk/backend-core","version":"2.0.0-next.3","license":"MIT","_id":"@clerk/backend-core@2.0.0-next.3","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"6ca874a4262505f6a00997be9a1eb6cf040f99f7","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.0.0-next.3.tgz","fileCount":648,"integrity":"sha512-//yaaeZO/ZnUuBaLph0lEG5Quy4UoY99FvjOZy5yRAJhUURITJ7+Pvm/5Y+2EAZenk+cVTGIWhQaJetEaMI3Hw==","signatures":[{"sig":"MEQCIHC7tsJkzIY8tKejP3q/TVIxFC8HAOLUjL4boAIIc+4sAiBtEvqodZbcO0uM3ore9npqVmVM5sNeEIFxbBiwqlkxEQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":859190,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi4yLSACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoqbA//aKvF46VBgX8Rs7/P2CdKk/yt0TLbhTxY+L4Q9L1FaEJwu1oa\r\nFVqwD9EFhvllSrnHewyEfOOlchvXzLIGsYdzA813zNo82jyyqpsi2/DFrgel\r\nabdAsj6i6sGcug7G0W6jpeKvWJpk7y6FOZMT2NfAzW+6d7tmM08VmUqhQLDV\r\nCcMlkchXvahFOWPSCIUV2YpbYNKSrvWfKuual+x6VE7hI3AwoGyLIYKFJFLz\r\n+IbugDQkXrxFvRsOHlL9dIjrAFrthN7haTZEnfhTgj+5pPbDlHFNJ+oa88XY\r\nD2hrkZagAF0SVk7ll4xFMR/MAaAMm+lvvynuTGl9bkvTkQqCiAaserYUsSSE\r\nNbyTOlH57lwVQ/iKKQbHdO3yrepuTx+aY9vo2ulm1KXFhAqzjUW6FNYv3B96\r\nYzW05QfXp7FGjLHxkSd7v2s80Awhf9OVi9Px73FkWjfvBIxzd8vgeU4yvad9\r\nho/zQ7j2i2wXArJ7JXv/f16Nzr1TXT/ez0y0Mf9RGqiMfgoQ5TbgR5fbSwYj\r\nFnzq7+BO1soALr5BtZCVuG1NApRBrmPkMifEIDWQnGoHgDnPG97n7BmC+Mvs\r\nCSP0csKOaI32p9BOkm/gVxDazAJU/uzg/E7G6eIiSaroeyJh3M1fWW25yTl6\r\nfUC3SBTnypnaGbjMNg8Ds+v10ZaVmW6IeaY=\r\n=35MY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev?utm_source=github&utm_medium=clerk_backend_core\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <img src=\"https://images.clerk.dev/static/clerk.svg\" alt=\"Clerk logo\" height=\"50\">\n  </a>\n  <br />\n</p>\n\n# @clerk/backend-code\n\n<div align=\"center\">\n\n[![Chat on Discord](https://img.shields.io/discord/856971667393609759.svg?logo=discord)](https://discord.com/invite/b5rXHjAg7A)\n[![Clerk documentation](https://img.shields.io/badge/documentation-clerk-green.svg)](https://clerk.dev/docs?utm_source=github&utm_medium=clerk_backend_core)\n[![Follow on Twitter](https://img.shields.io/twitter/follow/ClerkDev?style=social)](https://twitter.com/intent/follow?screen_name=ClerkDev)\n\n[Changelog](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/CHANGELOG.md)\n·\n[Report a Bug](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=bug&template=bug_report.md&title=Bug%3A+)\n·\n[Request a Feature](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=Feature%3A+)\n·\n[Ask a Question](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n\n</div>\n\n---\n\n## Overview\n\nThis package provides Clerk Backend API core resources and low-level authentication utilities for JavaScript environments. It is mostly used as the base for other Clerk SDKs.\n\n## Getting Started\n\n### Installation\n\n```sh\nnpm install @clerk/backend-core\n```\n\n### Build\n\nTo build the package locally with the TypeScript compiler, run:\n\n```sh\nnpm run build\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities, without being platform/environment, specific such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendAPI](./src/api/ClerkBackendAPI.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendAPI` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n## Usage\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendAPI](./src/api/ClerkBackendAPI.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://reference.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendAPI.ts#17) implementation.\n\n## Support\n\nYou can get in touch with us in any of the following ways:\n\n- Join our official community [Discord server](https://discord.com/invite/b5rXHjAg7A)\n- Open a [GitHub support issue](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n- Contact options listed on [our Support page](https://clerk.dev/support?utm_source=github&utm_medium=clerk_backend_core)\n\n## Contributing\n\nWe're open to all community contributions! If you'd like to contribute in any way, please read [our contribution guidelines](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/CONTRIBUTING.md).\n\n## Security\n\n`@clerk/backend-core` follows good practices of security, but 100% security cannot be assured.\n\n`@clerk/backend-core` is provided **\"as is\"** without any **warranty**. Use at your own risk.\n\n_For more information and to report security issues, please refer to our [security documentation](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/SECURITY.md)._\n\n## License\n\nThis project is licensed under the **MIT license**.\n\nSee [LICENSE](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/LICENSE) for more information.\n","engines":{"node":">=14"},"gitHead":"08adeb654233abbe180b2c453d926fd9a30dc3ac","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.15.0+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.15.0","dependencies":{"tslib":"^2.3.1","@clerk/types":"^3.0.0-next.9","query-string":"^7.0.1","snakecase-keys":"^5.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","node-fetch":"^2.6.0","typescript":"^4.6.4","@types/jest":"^27.4.0","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.3.2"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.0.0-next.3_1659052754515_0.6949854593077576","host":"s3://npm-registry-packages"}},"2.0.0-next.5":{"name":"@clerk/backend-core","version":"2.0.0-next.5","license":"MIT","_id":"@clerk/backend-core@2.0.0-next.5","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"040dcdff2b1bc484e1367615f1bec0a094509db2","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.0.0-next.5.tgz","fileCount":648,"integrity":"sha512-fwfIt0h4NRxBan52/gkh+0Naj7xMdUSzQmv5Vv65UMjtCVptbgAeJlU+LF0XkvKuXUCJGgFv2+6p6+uXgHbhVg==","signatures":[{"sig":"MEUCIHK+KtCZPJ1wNH2WLmMPrV0qrVQEYKqdeG3YOgeeSZGrAiEA64MLE+n8Bwn6VyQBOWvAvYyj1lg7d9tc35c53XNSOqY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":859191,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi5oNcACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoQ0hAAkqBBi/TLdlxHEo2AOu9+e3CCt/GP2Gl/soDItS6d09EaXabT\r\nH2ESReFMixSSadxBb7u/juK3FHCdilL/ONoYPQcZT/U4GDTVOXPN6/EUswcx\r\n1FiKUDTyWDKuXFvPyNPiKK6adGnJoTb3HIMGWTCFF3WLjG/+BizCrWKu8Dc2\r\nfvIfoY09nx6Nb6eeDbk4KdxCHThU5XpGO2hKOV6RryemkLslAkKhGJAsKeef\r\nofWPe0GwNME0gtN8I3MgzqxTVeBxV/M5uxJHwgL88r+VPous78sE+D4x6W4H\r\ni8S/YK68trmJLEiF920Bs1fob2wEFwE5tVQyQlc8rM/tFsM+PrjNi2z5b3OP\r\nzBz8MFlDjLGv997iXymwnfzqAr5oZxib8KBiTKElHyCmfdELqdtbJm/0Jemm\r\ne2emeQOhYEnOjUE1MDlSLzrH5PjlTfaNuq7/qcuAyfXukBHd4xyH8/s9UhQz\r\nHNzt4DxVRtoNwIUp52Cp1YHMJDScCSM3kPPVTSshZEKsts8IQQTozDVeFKik\r\ne/ooHvC94a3yE7JcikX5DpjWvHfYr13G+tlfR0zc3FlKHSR3VRsz8TVzhMvQ\r\nc8yUXn7H7KbRLJKmaLtY1loVVCBxt4wRVovxY51Zn5oGa0aFxLiSmIzwXQnw\r\nZBjAJ1YJ2XiTSj4xoHdneCc4or8E4H47HPA=\r\n=Cw8+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev?utm_source=github&utm_medium=clerk_backend_core\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <img src=\"https://images.clerk.dev/static/clerk.svg\" alt=\"Clerk logo\" height=\"50\">\n  </a>\n  <br />\n</p>\n\n# @clerk/backend-code\n\n<div align=\"center\">\n\n[![Chat on Discord](https://img.shields.io/discord/856971667393609759.svg?logo=discord)](https://discord.com/invite/b5rXHjAg7A)\n[![Clerk documentation](https://img.shields.io/badge/documentation-clerk-green.svg)](https://clerk.dev/docs?utm_source=github&utm_medium=clerk_backend_core)\n[![Follow on Twitter](https://img.shields.io/twitter/follow/ClerkDev?style=social)](https://twitter.com/intent/follow?screen_name=ClerkDev)\n\n[Changelog](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/CHANGELOG.md)\n·\n[Report a Bug](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=bug&template=bug_report.md&title=Bug%3A+)\n·\n[Request a Feature](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=Feature%3A+)\n·\n[Ask a Question](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n\n</div>\n\n---\n\n## Overview\n\nThis package provides Clerk Backend API core resources and low-level authentication utilities for JavaScript environments. It is mostly used as the base for other Clerk SDKs.\n\n## Getting Started\n\n### Installation\n\n```sh\nnpm install @clerk/backend-core\n```\n\n### Build\n\nTo build the package locally with the TypeScript compiler, run:\n\n```sh\nnpm run build\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities, without being platform/environment, specific such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendAPI](./src/api/ClerkBackendAPI.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendAPI` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n## Usage\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendAPI](./src/api/ClerkBackendAPI.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://reference.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendAPI.ts#17) implementation.\n\n## Support\n\nYou can get in touch with us in any of the following ways:\n\n- Join our official community [Discord server](https://discord.com/invite/b5rXHjAg7A)\n- Open a [GitHub support issue](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n- Contact options listed on [our Support page](https://clerk.dev/support?utm_source=github&utm_medium=clerk_backend_core)\n\n## Contributing\n\nWe're open to all community contributions! If you'd like to contribute in any way, please read [our contribution guidelines](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/CONTRIBUTING.md).\n\n## Security\n\n`@clerk/backend-core` follows good practices of security, but 100% security cannot be assured.\n\n`@clerk/backend-core` is provided **\"as is\"** without any **warranty**. Use at your own risk.\n\n_For more information and to report security issues, please refer to our [security documentation](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/SECURITY.md)._\n\n## License\n\nThis project is licensed under the **MIT license**.\n\nSee [LICENSE](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/LICENSE) for more information.\n","engines":{"node":">=14"},"gitHead":"9f351ebd0d4fd9ea4131ad006eda73c19f1e18f1","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.15.0+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.15.0","dependencies":{"tslib":"^2.3.1","@clerk/types":"^3.0.0-next.11","query-string":"^7.0.1","snakecase-keys":"^5.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","node-fetch":"^2.6.0","typescript":"^4.6.4","@types/jest":"^27.4.0","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.3.2"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.0.0-next.5_1659274076153_0.3542344982606749","host":"s3://npm-registry-packages"}},"2.0.0-next.6":{"name":"@clerk/backend-core","version":"2.0.0-next.6","license":"MIT","_id":"@clerk/backend-core@2.0.0-next.6","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"7b885cbd834d1557453e8130886de9a52c9884d7","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.0.0-next.6.tgz","fileCount":648,"integrity":"sha512-iLs/iSOEiwahxeiX9sO6wzQ9fZ8NiiFk8zvAS0/7a85uUOO8Vlhqo32IOE+gYPfjelGky3ovjaWAkSvtKyvozQ==","signatures":[{"sig":"MEUCIEZiTYE7WRcqqQnhXvbpAgeUj0eP2BKrcZ+2GGjrERp0AiEAw0Vao7be0D7KqaoldF0PpgTkc0AA4bNp7cZ7IjaHvlY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":859191,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi6GqoACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoOExAAoVYwd7Nh5ubtMRF0oPQ+Jj0F4nbfUuqhIcP5aoaqjvtHH/pE\r\nWX6abyujZbvm7XPQIMB09d5CtZoxl7Zsgllc2cwPY9QAWjZbyFDmE5wA2+57\r\nMGA/G50GjTbh5NECx09CYSFZGr1xa2E4c5tYpngbMKC4avi4jCG5omIcG8Xv\r\nOquDHs/+xx+0jcletEnyYL8EGy1AXSOB1XikzgTpWfYYA0GVxnhyHbiMZvBc\r\n8GRVGWput5D4+lulloxnrxNnpMSUkmFBsK/egHyYW0aj+tZZrot9sa8TJHKZ\r\niN4HYbKV+9LwQ53kd7xiYM0gg/0WgQtezQGBDMEwL1JJb1pCYpc9TTsC+mUV\r\ngrNWwaNgHdN+p/UYmisFyl2NHQ4nI5YRSealJzz+aJpgzl+Ux47lvbKlOjXp\r\n7wBvnJcFPupl1s+U/lJumkyiIhuzi+8cp+AMj3AhYlQTCax9o8R6Yu3pExjK\r\nfNMo2UuiBnFzxD9GLbAQoMpKle6fgPHrjHTOWRput9G4Jo4eg8L9izGET3JK\r\nBgez78CQlDYtBVJMuOUbX11ccVeXB8p5jEzzk+uqk78wRDpvaxKQONOxXm8t\r\nKOg/35tOetCAPnBXVautp9b95BXoiOq09KcC44zBXQ9fTu51T3Rx3HY2NWCY\r\nXrj1AgITEuBFkOGyyvmKPUMro5S3yw957c0=\r\n=gV1u\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev?utm_source=github&utm_medium=clerk_backend_core\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <img src=\"https://images.clerk.dev/static/clerk.svg\" alt=\"Clerk logo\" height=\"50\">\n  </a>\n  <br />\n</p>\n\n# @clerk/backend-code\n\n<div align=\"center\">\n\n[![Chat on Discord](https://img.shields.io/discord/856971667393609759.svg?logo=discord)](https://discord.com/invite/b5rXHjAg7A)\n[![Clerk documentation](https://img.shields.io/badge/documentation-clerk-green.svg)](https://clerk.dev/docs?utm_source=github&utm_medium=clerk_backend_core)\n[![Follow on Twitter](https://img.shields.io/twitter/follow/ClerkDev?style=social)](https://twitter.com/intent/follow?screen_name=ClerkDev)\n\n[Changelog](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/CHANGELOG.md)\n·\n[Report a Bug](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=bug&template=bug_report.md&title=Bug%3A+)\n·\n[Request a Feature](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=Feature%3A+)\n·\n[Ask a Question](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n\n</div>\n\n---\n\n## Overview\n\nThis package provides Clerk Backend API core resources and low-level authentication utilities for JavaScript environments. It is mostly used as the base for other Clerk SDKs.\n\n## Getting Started\n\n### Installation\n\n```sh\nnpm install @clerk/backend-core\n```\n\n### Build\n\nTo build the package locally with the TypeScript compiler, run:\n\n```sh\nnpm run build\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities, without being platform/environment, specific such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendAPI](./src/api/ClerkBackendAPI.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendAPI` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n## Usage\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendAPI](./src/api/ClerkBackendAPI.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://reference.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendAPI.ts#17) implementation.\n\n## Support\n\nYou can get in touch with us in any of the following ways:\n\n- Join our official community [Discord server](https://discord.com/invite/b5rXHjAg7A)\n- Open a [GitHub support issue](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n- Contact options listed on [our Support page](https://clerk.dev/support?utm_source=github&utm_medium=clerk_backend_core)\n\n## Contributing\n\nWe're open to all community contributions! If you'd like to contribute in any way, please read [our contribution guidelines](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/CONTRIBUTING.md).\n\n## Security\n\n`@clerk/backend-core` follows good practices of security, but 100% security cannot be assured.\n\n`@clerk/backend-core` is provided **\"as is\"** without any **warranty**. Use at your own risk.\n\n_For more information and to report security issues, please refer to our [security documentation](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/SECURITY.md)._\n\n## License\n\nThis project is licensed under the **MIT license**.\n\nSee [LICENSE](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/LICENSE) for more information.\n","engines":{"node":">=14"},"gitHead":"cbacdfc2cdf869160d9117a8745c2bf6cde36881","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.15.0+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.15.0","dependencies":{"tslib":"^2.3.1","@clerk/types":"^3.0.0-next.12","query-string":"^7.0.1","snakecase-keys":"^5.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","node-fetch":"^2.6.0","typescript":"^4.6.4","@types/jest":"^27.4.0","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.3.2"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.0.0-next.6_1659398824128_0.9374164932307016","host":"s3://npm-registry-packages"}},"1.14.1":{"name":"@clerk/backend-core","version":"1.14.1","license":"MIT","_id":"@clerk/backend-core@1.14.1","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"20dd5c2f45a9683cc579d0a85ffd7be897ae804b","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-1.14.1.tgz","fileCount":648,"integrity":"sha512-6iQRD1FgPISAHK0VJ3gIXzodBL2vwq9RXjpZI0qYyCB8upzSqMmYRijb08igKm2yyCOUjV0OACuCg4rgxQW/iA==","signatures":[{"sig":"MEQCIB+u44InmZbUAoBt2Fy+XkV1zdlZwsvL5STo9iPbVUCcAiB/kTcbZ8KHhXOEq2jA6zx802KdIbkCIjw8x8EE210heA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":859532,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi67XuACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpYkw//bR/w/rK6QmdPBqXgrKm0/BjPCFZHcwcNrL4R5kWHOevkeksU\r\nAGA7zJCbx1otHBuEJtQQ2QbVBCdeVXq1dO2SwjnILH8WIGurBsLrLEaazoCm\r\ngR2BvUKPu1oSm3oD75O69Tw0jB82HUC5Gw4Aj3vyUzZGPbUYUAeSIc7bsPf7\r\nPrlb6GR0WWAwBEFSjLI5dRcypn7J0/DUHBKO/co09QVAqr6fgfw0ucjzfBMz\r\nZw8lGlKrESv2w/84jYX/6DOa4peiaueIJG13u9WmtMFZ6J0g1E4vrmBJIxZ9\r\nv2VNdJ8rQP/an5H8pEvYAlxZbAtFKKsM6TVVQM2tpvuZUCbKdzKgHB0/UKSP\r\n9fNt17vEIsu56LrcORrwEQWjyLVFVm3jMcBBJs1r3JeUywscoh2hpGaoIF2B\r\nEzimm8mxjXLbkQAUfHLulcqTVI7nAMXrS6EKk0R40LcEm1s98umbJ9toE214\r\nMdITTI07e0CrlUKWAq0c3mpDK9mlYZsusauVI2lXKxchDCaZXLYQ4R9rZC6q\r\ntKJCnAfcaIjXkdb8Oik3uelUu3lkOt0ND4+OTxcP1IGDSp2ijAOrjg+3u4Ss\r\nTYVegS5yBe4wsR0zR7uOmiBaXS/JIAv0Obpo3BBOvZFLyHTdP0rkg8rpet9X\r\nSfIT6j8Kbs1En33DGQzpSA62jZGCKX7NVkw=\r\n=AJQe\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","gitHead":"8fec9785cc3424c51144a3164675aaa86f30a5c9","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.15.0+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.15.0","dependencies":{"tslib":"^2.3.1","@clerk/types":"^2.21.0","query-string":"^7.0.1","snakecase-keys":"^5.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","node-fetch":"^2.6.0","typescript":"^4.6.4","@types/jest":"^27.4.0","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.3.2"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_1.14.1_1659614701336_0.6088623311782435","host":"s3://npm-registry-packages"}},"2.0.0-next.7":{"name":"@clerk/backend-core","version":"2.0.0-next.7","license":"MIT","_id":"@clerk/backend-core@2.0.0-next.7","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"81c85ea53cdab34cf0de8e0bc808ff15696557ba","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.0.0-next.7.tgz","fileCount":648,"integrity":"sha512-cDnIrVPrZ3VuFg5DR10vDYmTNRJdyXb33FVL1AR/BkJPzwogNQP2sgC6xXRKibUVuXLJqVgJ0bC5XJq53JQ1QA==","signatures":[{"sig":"MEYCIQDYkm4lwRg2pTUU85VuJWrRrze0qRAQMlHtbAQhB27YMAIhAKe6wgP4dEo2ynSCcu7CB38DUb91RjhJyodVcLS4SaFY","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":859191,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi6+KDACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr/oQ//ecCeZz5YRp6uYIMaJNmzquxHeraOsOOcrZzXeYBmyxCW4ac7\r\nfG6RCqwVmIo7JGZW6kE+EdMgm2jRz4vKDfIDzRNcYRyw270+3yCGBU8tow2o\r\nX8Sv0CX/BWil6FGyyh8zO7kXgzdikgtT0K+adwNMG/2HCqRjOA5q1Md4vuwh\r\nEDx+2U3Apc7PBqsGiZ/4pM/rUSZjwJwnYhBWI3A87rvgq7K4h4qDUmqgSy4U\r\nEDd4DyAy/XJl8szeYHLV7BgogTHUDnKwpXwHS0oBdI0C4Z7cP77bsWnN7uKH\r\nVPD3qgjyiFLonrxDm6PaZ6U8DKFzfkeSE/8BR7xSqIcXBGFnZDgNpo5IfP1c\r\n89LTw7AeqWzyGyVfDO/OV5SS6oyBwUWTJOf3vQn1pIW0Pe79X49U+9wq2lM8\r\n1X8Y6d98GrCUF2ldJFcVMsEJ6fcUwuaweQsvV76qxNcFFnbZ0Kfo0EZy5mvK\r\neiZ+lwcTuqNAnTvNvbBXCSCWxsw+R8y1ohK25rftM9mR/Yb/PTsiu2lbdZYi\r\nH6QeQglgFYnvbVgY3G2J08TbDfEAMq4iH64NEqxzJT/JgGd0ACGbcIzGbD2C\r\nrEFyqCLmLzxX/k2eedtMAwJ2ephS1z9p2WqHW6hJgg2iIPHieZyl1XfIGfte\r\nfl3qXo1PTpTlctH8aGZbCiQ0iqjPaGK9cL8=\r\n=0LzZ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev?utm_source=github&utm_medium=clerk_backend_core\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <img src=\"https://images.clerk.dev/static/clerk.svg\" alt=\"Clerk logo\" height=\"50\">\n  </a>\n  <br />\n</p>\n\n# @clerk/backend-code\n\n<div align=\"center\">\n\n[![Chat on Discord](https://img.shields.io/discord/856971667393609759.svg?logo=discord)](https://discord.com/invite/b5rXHjAg7A)\n[![Clerk documentation](https://img.shields.io/badge/documentation-clerk-green.svg)](https://clerk.dev/docs?utm_source=github&utm_medium=clerk_backend_core)\n[![Follow on Twitter](https://img.shields.io/twitter/follow/ClerkDev?style=social)](https://twitter.com/intent/follow?screen_name=ClerkDev)\n\n[Changelog](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/CHANGELOG.md)\n·\n[Report a Bug](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=bug&template=bug_report.md&title=Bug%3A+)\n·\n[Request a Feature](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=Feature%3A+)\n·\n[Ask a Question](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n\n</div>\n\n---\n\n## Overview\n\nThis package provides Clerk Backend API core resources and low-level authentication utilities for JavaScript environments. It is mostly used as the base for other Clerk SDKs.\n\n## Getting Started\n\n### Installation\n\n```sh\nnpm install @clerk/backend-core\n```\n\n### Build\n\nTo build the package locally with the TypeScript compiler, run:\n\n```sh\nnpm run build\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities, without being platform/environment, specific such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendAPI](./src/api/ClerkBackendAPI.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendAPI` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n## Usage\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendAPI](./src/api/ClerkBackendAPI.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://reference.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendAPI.ts#17) implementation.\n\n## Support\n\nYou can get in touch with us in any of the following ways:\n\n- Join our official community [Discord server](https://discord.com/invite/b5rXHjAg7A)\n- Open a [GitHub support issue](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n- Contact options listed on [our Support page](https://clerk.dev/support?utm_source=github&utm_medium=clerk_backend_core)\n\n## Contributing\n\nWe're open to all community contributions! If you'd like to contribute in any way, please read [our contribution guidelines](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/CONTRIBUTING.md).\n\n## Security\n\n`@clerk/backend-core` follows good practices of security, but 100% security cannot be assured.\n\n`@clerk/backend-core` is provided **\"as is\"** without any **warranty**. Use at your own risk.\n\n_For more information and to report security issues, please refer to our [security documentation](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/SECURITY.md)._\n\n## License\n\nThis project is licensed under the **MIT license**.\n\nSee [LICENSE](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/LICENSE) for more information.\n","engines":{"node":">=14"},"gitHead":"f3ebab007ae9b32a88fa08b2d985c329c89aa1ca","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.15.0+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.15.0","dependencies":{"tslib":"^2.3.1","@clerk/types":"^3.0.0-next.13","query-string":"^7.0.1","snakecase-keys":"^5.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","node-fetch":"^2.6.0","typescript":"^4.6.4","@types/jest":"^27.4.0","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.3.2"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.0.0-next.7_1659626114717_0.3404363358539291","host":"s3://npm-registry-packages"}},"2.0.0-next.8":{"name":"@clerk/backend-core","version":"2.0.0-next.8","license":"MIT","_id":"@clerk/backend-core@2.0.0-next.8","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"c0f31be0679bc7b48c588e02105af57eca6c94cc","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.0.0-next.8.tgz","fileCount":648,"integrity":"sha512-Qkt12NExAfyS3A0P3oXwnnV+cqtKzBrIkhJHtCGSYFFdvHPEQjDM2k1Rs5ifn6eASEXiGq3OEvVxkMgGRDMkTw==","signatures":[{"sig":"MEUCIHfqcbbb44N67MqUYA2jkaqrv1pGsQxfj9fSAr7ersXeAiEAiNj60pPv1GqrvBllQwaTE5fnqVYfdZCFyvV4IKfWlSE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":859584,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi7AP0ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpEsw//f7bN5j6FKJIuMTvAjYm/Uato7sB4lRrNVa3PpixgOAjiXSvA\r\nuGjGOURKQLGnhe2Vwh6LisyYoM95G1A+guu+DtAWZyO31Q0J4AvHjAC2aJWh\r\nuDNQFhDfuFF36v1cevN08H7e6eR++ffn/3XDEBnrj64lg37bwin9UAxYMRzY\r\n9t3D+S5qM+3uBniNZiFRxriZWmqjmz/r+U0RtWtuQpg3AF4EHiPQn0p4A5je\r\nJZUQOUYL4Iyea4Sp3jYot/fYADs8JzD4nVdRuP7RuFtlfTBDdEk+wKFiKQ1e\r\nACptnV8uSk9rYnF7GxfxFjSU76kiLRX9PfFB1Qu1188duk5jbuOqgm8w1vfH\r\njKbtT+39UScN3yFAlg/FimQYvrs5EFfWedS0FeZRouoKu8OuuhYmmu6HXwNf\r\np5GvNr/i9zFdLorUsTqwl26mknR9t7d1OzLqOP+vD4rnR+pZN8s1kPKQeA+d\r\nyuHNNBfPqMrnEgSbD/5R+gK/psRN7XffgyYtpBiohBCa1pAFA2RvPT+Hqldy\r\n/qrAdxUudrjuPF2VhyOdVeohgz+71fvUmWriqt1NLJLtOM/dvfz8swoaTHHH\r\n4aVjUvDcIm2mxMYcmMIFl+Vn+b0pcuUyXnENPrLKGEXetvgB160zOrULeFGc\r\n5YSoOB403d3ucU1A+F+rBy5g/GWo6BFVvYs=\r\n=lggf\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev?utm_source=github&utm_medium=clerk_backend_core\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <img src=\"https://images.clerk.dev/static/clerk.svg\" alt=\"Clerk logo\" height=\"50\">\n  </a>\n  <br />\n</p>\n\n# @clerk/backend-code\n\n<div align=\"center\">\n\n[![Chat on Discord](https://img.shields.io/discord/856971667393609759.svg?logo=discord)](https://discord.com/invite/b5rXHjAg7A)\n[![Clerk documentation](https://img.shields.io/badge/documentation-clerk-green.svg)](https://clerk.dev/docs?utm_source=github&utm_medium=clerk_backend_core)\n[![Follow on Twitter](https://img.shields.io/twitter/follow/ClerkDev?style=social)](https://twitter.com/intent/follow?screen_name=ClerkDev)\n\n[Changelog](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/CHANGELOG.md)\n·\n[Report a Bug](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=bug&template=bug_report.md&title=Bug%3A+)\n·\n[Request a Feature](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=Feature%3A+)\n·\n[Ask a Question](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n\n</div>\n\n---\n\n## Overview\n\nThis package provides Clerk Backend API core resources and low-level authentication utilities for JavaScript environments. It is mostly used as the base for other Clerk SDKs.\n\n## Getting Started\n\n### Installation\n\n```sh\nnpm install @clerk/backend-core\n```\n\n### Build\n\nTo build the package locally with the TypeScript compiler, run:\n\n```sh\nnpm run build\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities, without being platform/environment, specific such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendAPI](./src/api/ClerkBackendAPI.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendAPI` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n## Usage\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendAPI](./src/api/ClerkBackendAPI.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://reference.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendAPI.ts#17) implementation.\n\n## Support\n\nYou can get in touch with us in any of the following ways:\n\n- Join our official community [Discord server](https://discord.com/invite/b5rXHjAg7A)\n- Open a [GitHub support issue](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n- Contact options listed on [our Support page](https://clerk.dev/support?utm_source=github&utm_medium=clerk_backend_core)\n\n## Contributing\n\nWe're open to all community contributions! If you'd like to contribute in any way, please read [our contribution guidelines](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/CONTRIBUTING.md).\n\n## Security\n\n`@clerk/backend-core` follows good practices of security, but 100% security cannot be assured.\n\n`@clerk/backend-core` is provided **\"as is\"** without any **warranty**. Use at your own risk.\n\n_For more information and to report security issues, please refer to our [security documentation](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/SECURITY.md)._\n\n## License\n\nThis project is licensed under the **MIT license**.\n\nSee [LICENSE](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/LICENSE) for more information.\n","engines":{"node":">=14"},"gitHead":"3baca1f1152ec8be8e1df29e88472dbf174e9a1e","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.15.0+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.15.0","dependencies":{"tslib":"^2.3.1","@clerk/types":"^3.0.0-next.14","query-string":"^7.0.1","snakecase-keys":"^5.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","node-fetch":"^2.6.0","typescript":"^4.6.4","@types/jest":"^27.4.0","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.3.2"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.0.0-next.8_1659634675795_0.09207324117715032","host":"s3://npm-registry-packages"}},"1.14.2":{"name":"@clerk/backend-core","version":"1.14.2","license":"MIT","_id":"@clerk/backend-core@1.14.2","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"8da6c7deb18c39e9f8854140e5b3443eff1d69d0","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-1.14.2.tgz","fileCount":426,"integrity":"sha512-wJ09ydaVZewYRYKPHM0+3O3ZprWfPzzINc/Rwr9N70kwFc+KcHT2iR7K5ocAw1+DyKUPisEQ1NZuTsDzhK/wDw==","signatures":[{"sig":"MEUCIQDVik1uo9Wr3dHnkphs+92yltyM06dk1kS5REtx5TPZDAIgNtxUKszzL+yXNxG3BoV6agBLWBoTwUWztkEvyZiTaVM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":616210,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi7N3rACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo+VA/8CY64ciYGAMyUk6arFjTdrBbggQVxpwx/ar7MjTrPAl1wBLhg\r\n8Lp/f8ZfbMef+VlBEoy9BARV7UheIAqVAmm0FQIsgrZ36Dq1geUvHdBs/Mq7\r\nXUA6rgT5FfiE8BjF3yFWEUtFiMhOvYT2BU+HHZYlwX6B09RcTIEhMHkWdErO\r\nM4TI372trkNAZm08ZHepDsGroHPX808P9ki80pvrkYHtQdzUaOPN9NEW6y/t\r\nY73FLmWCSi8UK6YjGiI5lQgH0IdJIwDjoXCvPB/JPYIfZx/m89Xp8L0wo/a9\r\nDjU9ONQMK2+QKOkAmG56hgYqKphwHPfS4eAvMJmItppd9SY99LtkpXfwVL6L\r\nCF6cjJMOYl4h/GgZtYv/RwRNuW8CqfL8yYWlytaNeierMJMWEmY1Ow7DJZKG\r\nlS9MsArJ8DFzvPtL8mtJ2LG7uM0VgaWErjHHqTXZFMV3dFOThIrk1QHRSCz0\r\n3bBK4vCnZIW66ewa2lnS1pimnbwNrjbF62V82KGF9+qbyJ8JDQ9cqna2KGDA\r\nhye43U2i1Bm13NDxzwn3U1WAVrI8Wlv4ZA7xJ22Rp2YPO3AAG8evb++5Vf+D\r\nG+yZxiW9cGj9zenxrvXRTfu/ZJzW0uRcc2MgvMbNYpiRjegQnqde3Bknnlta\r\nd8jgZOlV+mS2U/gPzo0uJn6qe59/Ye1EM4I=\r\n=IMw5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","gitHead":"ec62c5fc22ac931a37e8c43879ecc3c39de7d051","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"igneel64","email":"p.perlepes@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.13.2+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.13.2","dependencies":{"tslib":"^2.3.1","@clerk/types":"^2.21.0","query-string":"^7.0.1","snakecase-keys":"^5.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","node-fetch":"^2.6.0","typescript":"^4.6.4","@types/jest":"^27.4.0","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.3.2"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_1.14.2_1659690475579_0.7272313497773248","host":"s3://npm-registry-packages"}},"2.0.0-next.9":{"name":"@clerk/backend-core","version":"2.0.0-next.9","license":"MIT","_id":"@clerk/backend-core@2.0.0-next.9","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"3265552275a2e0d8fed598b9155204cee63a3878","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.0.0-next.9.tgz","fileCount":648,"integrity":"sha512-09My+5PJtc0xCUMuOVwHF14cBftNSSiT+YPITTaML4dClzcUTN1GgVia68KDMWgWmR21e3Lf4qeQ2m/PxENk0g==","signatures":[{"sig":"MEUCIQCEGXc2SU8wIFTPPwgDaduOvP4VMXQ3jnoVz/8+/HSJpgIgUvhTCoFTBtTUBH6MeJoiI42EwxmBemJNcABV+wwoGoE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":859894,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi7TaxACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqJAg/9HeOiGlXYQzvj0F/jeAXlyXjk0d9p0WA7Jv3ogjb3n7hYLsBT\r\nKen3W7d57/uJ5PQ54FjsXq7Mhm3zJTfkeXNvjH9oE0YeySnu50YL/SJp6RGF\r\n56wuu45pfiyqfCKRBvkClL5laaHbHYMv52fbugir/rNbcaSqx+KTBfiAeMC1\r\nSSoMA6/l+uhxvFlAEZvWJKJ3Xp0vkhWHncNID7nnfdzLmUaEohn+GXsonXAV\r\n+iBwhSZgl9IKcCE6CzTp+guTvjBJ4gpmgTh9wYjGrnjJQ1D+rpMpUDvuhEkL\r\nGapD7CKhlLMpohbfixq1xFBMgwqCMYenI39ogrGYCEEvB6CoP2PDr67ZNlac\r\nFkGlW4cTjVduGBin12OQzN4XFbVOKjC79UMjCLnQV8R2xjsu2FN9+OzFqPLH\r\n1ve2tJQgJmvOHRtUyVbige6jtcTma3R7YNtEnJ7GKQgPE6qcY7iO6iNbMLq3\r\no0OV5SWJHXCmzdO98qaHoRnVb9S+Ktt4sb9yVtWtS0PaiLxi7Kk16yAwzEZT\r\nBolDxY8S9UCNYbno0Lh5yMu1uvVGwrdmtzbnZUESxb7anO1+XQvMvCpbqjvy\r\nJjuys5pqIXU67JHfqm1muhiFY2W5o+n9zMthx3xoTlRUJm8Pt5ohdiCgo/sI\r\nXyHc3x3otJmPVqZa8LGwPzwvl+70otflS8g=\r\n=uVQa\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev?utm_source=github&utm_medium=clerk_backend_core\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <img src=\"https://images.clerk.dev/static/clerk.svg\" alt=\"Clerk logo\" height=\"50\">\n  </a>\n  <br />\n</p>\n\n# @clerk/backend-code\n\n<div align=\"center\">\n\n[![Chat on Discord](https://img.shields.io/discord/856971667393609759.svg?logo=discord)](https://discord.com/invite/b5rXHjAg7A)\n[![Clerk documentation](https://img.shields.io/badge/documentation-clerk-green.svg)](https://clerk.dev/docs?utm_source=github&utm_medium=clerk_backend_core)\n[![Follow on Twitter](https://img.shields.io/twitter/follow/ClerkDev?style=social)](https://twitter.com/intent/follow?screen_name=ClerkDev)\n\n[Changelog](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/CHANGELOG.md)\n·\n[Report a Bug](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=bug&template=bug_report.md&title=Bug%3A+)\n·\n[Request a Feature](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=Feature%3A+)\n·\n[Ask a Question](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n\n</div>\n\n---\n\n## Overview\n\nThis package provides Clerk Backend API core resources and low-level authentication utilities for JavaScript environments. It is mostly used as the base for other Clerk SDKs.\n\n## Getting Started\n\n### Installation\n\n```sh\nnpm install @clerk/backend-core\n```\n\n### Build\n\nTo build the package locally with the TypeScript compiler, run:\n\n```sh\nnpm run build\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities, without being platform/environment, specific such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendApi](./src/api/ClerkBackendApi.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendApi` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n## Usage\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendApi](./src/api/ClerkBackendApi.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://reference.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendApi.ts#17) implementation.\n\n## Support\n\nYou can get in touch with us in any of the following ways:\n\n- Join our official community [Discord server](https://discord.com/invite/b5rXHjAg7A)\n- Open a [GitHub support issue](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n- Contact options listed on [our Support page](https://clerk.dev/support?utm_source=github&utm_medium=clerk_backend_core)\n\n## Contributing\n\nWe're open to all community contributions! If you'd like to contribute in any way, please read [our contribution guidelines](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/CONTRIBUTING.md).\n\n## Security\n\n`@clerk/backend-core` follows good practices of security, but 100% security cannot be assured.\n\n`@clerk/backend-core` is provided **\"as is\"** without any **warranty**. Use at your own risk.\n\n_For more information and to report security issues, please refer to our [security documentation](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/SECURITY.md)._\n\n## License\n\nThis project is licensed under the **MIT license**.\n\nSee [LICENSE](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/LICENSE) for more information.\n","engines":{"node":">=14"},"gitHead":"f3c4fa4323cbbe6b6fd0a97ddfd86503e4bb0772","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.15.0+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.15.0","dependencies":{"tslib":"^2.3.1","@clerk/types":"^3.0.0-next.15","query-string":"^7.0.1","snakecase-keys":"^5.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","node-fetch":"^2.6.0","typescript":"^4.6.4","@types/jest":"^27.4.0","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.3.2"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.0.0-next.9_1659713201674_0.11997520173371057","host":"s3://npm-registry-packages"}},"2.0.0-staging.1":{"name":"@clerk/backend-core","version":"2.0.0-staging.1","license":"MIT","_id":"@clerk/backend-core@2.0.0-staging.1","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"520c2d4b04943ed4b716c80f7d6e96594ab79536","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.0.0-staging.1.tgz","fileCount":648,"integrity":"sha512-TE90bO97vJIzuaakPgf37aIHZnTDx69mwrmQcXs7tND3qHv8jb4MAGflU2HTgi2/0FrzjoNrfJ13xlDJWETqxA==","signatures":[{"sig":"MEQCIDfqlvPJoUaXHtRg2Ymqdt7Y+Hm2oOAyvYghfMoG0B8WAiBzrTR6KOW7tRRFSuPNHfg4355uFlF9lxfzVr3xRt8m8A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":859899,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi7YmnACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmocwRAAkq+m8/n443zcERrn34iNiCAnoprL+GZnAgr9dMRxK8pI+a5R\r\n95msKCDizTgqR5i2uwwVIEVYGkIlfR7EDKnFLyEvAxslJb8VxiSMdQfZUd+O\r\nyNI3f/Ea/+LSEf9c6jVy0w6WGG2V3yXLhYgAfXgJfMZPKWiNT0hkhADrYTk5\r\nFY/T7Cyyw2RjQe1ZpTBGf/NvxOyTaRTsWV0uwj574hED4L1du8XlZEaUX0DN\r\nJkJHX5VOt0UrvNRL/xfaM6E+VSjOlzoodvoLNNpfj+dpmEFaBlJmvzJAVyF4\r\nX6fqPne11ju+uBJ51gsGAb7dKuMqHN9svuJL14UHliM23BoCcsdsxzgoVgN/\r\ndrBRyEoPQ8hZpzPoQXn+HjbdD6IW1QlgitQGtAyuI2VK6jUmgAgac9ggz7y6\r\nnEb9sOVapUHx4r1t/scFQUfm0Ci9hOerJDZQbNclcsyuDkLMbusV2/lTcclH\r\n0Q2VmjuHu3JSl93OrZf6aDcFXhI1rIncuPNKrdthyaInXzrw+FR/uCgY8sne\r\ns3nFsyblL9iEFmJRxEBK0laHjJ4ASugPZIKLmSF7fNVc/+KB/Q4k0Mo40Nxn\r\nItwmsrLBMhhSS+5mpFoLCYbyItoWpIf8t68o13dR4hOPFvilfFeROz+2E8HE\r\nu21ev7QjpKqDTArGW5eJXfmZT4cRWs4/EvM=\r\n=303K\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev?utm_source=github&utm_medium=clerk_backend_core\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <img src=\"https://images.clerk.dev/static/clerk.svg\" alt=\"Clerk logo\" height=\"50\">\n  </a>\n  <br />\n</p>\n\n# @clerk/backend-code\n\n<div align=\"center\">\n\n[![Chat on Discord](https://img.shields.io/discord/856971667393609759.svg?logo=discord)](https://discord.com/invite/b5rXHjAg7A)\n[![Clerk documentation](https://img.shields.io/badge/documentation-clerk-green.svg)](https://clerk.dev/docs?utm_source=github&utm_medium=clerk_backend_core)\n[![Follow on Twitter](https://img.shields.io/twitter/follow/ClerkDev?style=social)](https://twitter.com/intent/follow?screen_name=ClerkDev)\n\n[Changelog](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/CHANGELOG.md)\n·\n[Report a Bug](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=bug&template=bug_report.md&title=Bug%3A+)\n·\n[Request a Feature](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=Feature%3A+)\n·\n[Ask a Question](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n\n</div>\n\n---\n\n## Overview\n\nThis package provides Clerk Backend API core resources and low-level authentication utilities for JavaScript environments. It is mostly used as the base for other Clerk SDKs.\n\n## Getting Started\n\n### Installation\n\n```sh\nnpm install @clerk/backend-core\n```\n\n### Build\n\nTo build the package locally with the TypeScript compiler, run:\n\n```sh\nnpm run build\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities, without being platform/environment, specific such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendApi](./src/api/ClerkBackendApi.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendApi` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n## Usage\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendApi](./src/api/ClerkBackendApi.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://reference.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendApi.ts#17) implementation.\n\n## Support\n\nYou can get in touch with us in any of the following ways:\n\n- Join our official community [Discord server](https://discord.com/invite/b5rXHjAg7A)\n- Open a [GitHub support issue](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n- Contact options listed on [our Support page](https://clerk.dev/support?utm_source=github&utm_medium=clerk_backend_core)\n\n## Contributing\n\nWe're open to all community contributions! If you'd like to contribute in any way, please read [our contribution guidelines](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/CONTRIBUTING.md).\n\n## Security\n\n`@clerk/backend-core` follows good practices of security, but 100% security cannot be assured.\n\n`@clerk/backend-core` is provided **\"as is\"** without any **warranty**. Use at your own risk.\n\n_For more information and to report security issues, please refer to our [security documentation](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/SECURITY.md)._\n\n## License\n\nThis project is licensed under the **MIT license**.\n\nSee [LICENSE](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/LICENSE) for more information.\n","engines":{"node":">=14"},"gitHead":"a4eb2dc10fd880684a54adef52b49f6d51e72e77","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.15.0+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.15.0","dependencies":{"tslib":"^2.3.1","@clerk/types":"^3.0.0-staging.1","query-string":"^7.0.1","snakecase-keys":"^5.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","node-fetch":"^2.6.0","typescript":"^4.6.4","@types/jest":"^27.4.0","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.3.2"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.0.0-staging.1_1659734439370_0.3825254236469815","host":"s3://npm-registry-packages"}},"2.0.0":{"name":"@clerk/backend-core","version":"2.0.0","license":"MIT","_id":"@clerk/backend-core@2.0.0","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"efe2ed9591c5a6c2a5fd06e579ff6c2c4c94a0ee","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.0.0.tgz","fileCount":648,"integrity":"sha512-EBjIOwiE+GHrJQaIVFaVZXFh7hm/WyZRkYpRfyJr+idn/J61AhcL8t5LhJefQ4WGO/z9vqqhPfi31HKbPyCRtw==","signatures":[{"sig":"MEUCIQDBpLK1j3FQih+xU+wftJk26jSBTtQqut8CZO1vKBRYdgIgOUjjK2FvUy93i2E3KBLt6lCTfFQca32WFC+ifJ1tUnU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":860077,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi7Ys2ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp6kg/+JLZ0sf7//oHp15vxdz14Gi0uDZud82l/rBKNjbHu2p3SZpGL\r\nmVm/ISte/cdf7ebd90EpBJD+7FYeVoBXu64b0tCFNFSQiVYXR/HVXzWPJnA7\r\nlnXUxB2IuiOI8j2YdZjbyAi0o2mdYXnQ02MLjyPy89Bw42fS4BsHSIP6MrGL\r\nCyENH0Wn18OIFKkYtsev6J2mYETnKFAGnu23MlW9u8OJ00EM+MIZL0fzNabq\r\ng09Ks4JAxWxK7O9AaUfjc8LzI5YrjYTeQkUoJrB+zWlok7rOB6hkXvS9keeL\r\n3JeDEen+R4nN3TEshet9hJazik/+FylXfb+5XY+TLmv+YDCPM+UApTOTDUwq\r\ndotTsautjaxufN/KOaIc0ggm2FsM/b7e/60JCU6MNEZb8XfA7knzo12FhpoK\r\n++m1v9/14j0/27jzOmOxAuiVQd+xBuMDSi2Dna7/mSBPTF5um2bXGqS/eMAB\r\nWQDSE+EMHQpsUOYLY1v51b0FfnnJG/MmzeF4WQIpWAYtQb7eIhNidenfDfKY\r\nry5m143wcUS24PitwSULH3d2ZJ6xNf8D4l/1LmCce8Ke0S0plw9ztjdcavBR\r\nS2uN9vHN/HNDrotvqig2Gf2OABHdnUAt7Rx/bteb2ED45VRvUX5+b4dyTr87\r\nXqd9BSxvPEPYaDoAIiy2NcxUJhAtk6Ex8qE=\r\n=xID5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","engines":{"node":">=14"},"gitHead":"aac87a5de8171dd27965dfecc5fabdf12b63216f","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.15.0+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.15.0","dependencies":{"tslib":"^2.3.1","@clerk/types":"^3.0.0","query-string":"^7.0.1","snakecase-keys":"^5.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","node-fetch":"^2.6.0","typescript":"^4.6.4","@types/jest":"^27.4.0","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.3.2"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.0.0_1659734837983_0.3693875908407849","host":"s3://npm-registry-packages"}},"2.0.1":{"name":"@clerk/backend-core","version":"2.0.1","license":"MIT","_id":"@clerk/backend-core@2.0.1","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"48f26b00a30767a263a6d1013283222f261ecc90","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.0.1.tgz","fileCount":426,"integrity":"sha512-F2TnofMYb793bUQhH2S+u40SbOhipbvFKEJnLmdKAmMOGQVJR9pZb/wmDfALOGD6FTMYpEqRxD+cjV+u8li53A==","signatures":[{"sig":"MEYCIQD8IndkGYqHERV9sz12/KU8vAY3ZmEjrDRi5Uql/4u5xwIhAIeVO9y2oIFd0gv0TqOwFmU5XsZwrKaVe5kV37HdvJ0A","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":616634,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi7/mFACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqkNg/+MAKhnzoO8+yMIqsVQHr7TKf7aQ905wuggKOiDEka+KSyGszG\r\nruzgjtlbEjDO6xdfvNk682madTW4KFr+jFo018DaajhDA4FZ7nXSJfZUD05X\r\nuqESvw0jflXG8odI9xNz1dMMtZbAZxjBdtfury8l9phk3W9RkPVWDt8I3OAz\r\nw430cbqZZuhVUC9Oz9rLSfksTw3e2OW1Q65UPZiz0RV/jR1H6VEsgm4XDmIf\r\naNM/dPMtwZhAVayb0m43aerTQZdMdtWhmjYecbcdgltl/2Ns31qK15QACdkm\r\n6ukwcc5fzS/sFh1Kx4Rw3QkDoCPgbZ0dFUmvy6+raD/dUCPgP116YHh+iLzi\r\nVKLEcQwch4686e1S7sjRT4UqkIONjzyMEUCGrfgJeKCwHYNJqkBpALp+sXle\r\n9xeTl03HDJklWRol07VO6D+Hd9ARaglx4vhD5uvBkbRbP6nCP+dFLiSnzqa1\r\n8cx+UUGa7WG4vLKdz3rlqFazh+Fciyrfrdx0OwE2pS2Cjea17dOiPTTmR3i/\r\nvbRDuvqqNyi/m1hJdZHx+tio2yDbT/7RcCoUNPfbInUQR8EoJOPnY+BdtgOH\r\nUrCq85+7zHKHAxXqH3fBhqPm8cWEMFSc48NQc4H3YbeEtSPDSFhWKNbaNX5o\r\nxwNCRVOpP8F/iOMyZDzGS/itTzQJfCT9r/E=\r\n=vRY/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","engines":{"node":">=14"},"gitHead":"c347493374ec497321b8d1dc43f52c4f1f4c8c5a","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.15.0+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.15.0","dependencies":{"tslib":"^2.3.1","@clerk/types":"^3.0.1","query-string":"^7.0.1","snakecase-keys":"^5.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","node-fetch":"^2.6.0","typescript":"^4.6.4","@types/jest":"^27.4.0","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.3.2"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.0.1_1659894148830_0.929626194417625","host":"s3://npm-registry-packages"}},"2.0.2-staging.0":{"name":"@clerk/backend-core","version":"2.0.2-staging.0","license":"MIT","_id":"@clerk/backend-core@2.0.2-staging.0","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"008f5fb66cdcf9d420d12749ca3292af7297d96b","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.0.2-staging.0.tgz","fileCount":426,"integrity":"sha512-kd5leY64EP/TuF4UAbEckSUFpX92RxQJ8B9MT6ifIfgB9ep5h3Vy1w8T2Pztxqovl4JVoOaK5TGTwkThWZQcuA==","signatures":[{"sig":"MEYCIQCa86HwvGEIjtBXjKP8NgoDgiAJPyR2RsdFODYh0ZQDPAIhALDwylM49xTD1FaFPWA0vvwhLRzzN44YoHRkDKhWs1RD","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":616654,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi8jC0ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpOoBAAhdolxwSEoSu6QkgjTO0jHsXWW45vhHVUPu4emTCLSVZ5duV5\r\nO0kltfUHm2W5iP/Mn2CWEEinXRyMLELiNoIUpmWWTK0VGh0e028cz3wo5zLb\r\n8TFL656fp9nLm7EJ8wC276UQLR2L9qiXJhHEgpxKtdGm12AjQvzVqtoVDKgh\r\nUwXYfPDmG616MzdTudcrkgC5WOM4KJ8lZRp076AkNAzRtNxURFawAelEonMa\r\nELdIR4L2QCvBtOONi8oy74ikr7rU1bpY+W4BZ3AFCrVrGtgFNYCCoL2Jb5Q4\r\npOtSKVJdWKIEoo/0uNTefekp5Z05pJjkdBoOUM1CkkaXJmDR1TJ6jph92ORF\r\nJrG6dMR7H5fj3kv4yISUA/L8RR/Z0aeJ7Lw7KK9ZNxHsVNL06sE4pSa8mQlD\r\naM4koUQMWzOa/bPdQGTaR6IurZC0MMR5djQzsYFCRyRCXGa9hK81eQOtajXT\r\nSTJYT2IWoItqubWtTRQI/xqMlI5sDWVbRTDem/f/+z+jpV2fkSlhgnK9CohK\r\nDzWOYOUylCo3kBcyj4H6maXJjvjvkQ+sQ6HWUCImTORPAPVyVjCkm0YvSGJn\r\n8JqN8469qFphYz7HUwTEmn5gW9KjFSepWYky/mokIM7p8wJFrb842VfXPqNG\r\n/hRoHb00G+aWoIW5KP3tWNVzFJeq7Wdkm/I=\r\n=rvDW\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev?utm_source=github&utm_medium=clerk_backend_core\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <img src=\"https://images.clerk.dev/static/clerk.svg\" alt=\"Clerk logo\" height=\"50\">\n  </a>\n  <br />\n</p>\n\n# @clerk/backend-code\n\n<div align=\"center\">\n\n[![Chat on Discord](https://img.shields.io/discord/856971667393609759.svg?logo=discord)](https://discord.com/invite/b5rXHjAg7A)\n[![Clerk documentation](https://img.shields.io/badge/documentation-clerk-green.svg)](https://clerk.dev/docs?utm_source=github&utm_medium=clerk_backend_core)\n[![Follow on Twitter](https://img.shields.io/twitter/follow/ClerkDev?style=social)](https://twitter.com/intent/follow?screen_name=ClerkDev)\n\n[Changelog](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/CHANGELOG.md)\n·\n[Report a Bug](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=bug&template=bug_report.md&title=Bug%3A+)\n·\n[Request a Feature](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=Feature%3A+)\n·\n[Ask a Question](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n\n</div>\n\n---\n\n## Overview\n\nThis package provides Clerk Backend API core resources and low-level authentication utilities for JavaScript environments. It is mostly used as the base for other Clerk SDKs.\n\n## Getting Started\n\n### Installation\n\n```sh\nnpm install @clerk/backend-core\n```\n\n### Build\n\nTo build the package locally with the TypeScript compiler, run:\n\n```sh\nnpm run build\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities, without being platform/environment, specific such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendApi](./src/api/ClerkBackendApi.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendApi` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n## Usage\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendApi](./src/api/ClerkBackendApi.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://reference.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendApi.ts#17) implementation.\n\n## Support\n\nYou can get in touch with us in any of the following ways:\n\n- Join our official community [Discord server](https://discord.com/invite/b5rXHjAg7A)\n- Open a [GitHub support issue](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n- Contact options listed on [our Support page](https://clerk.dev/support?utm_source=github&utm_medium=clerk_backend_core)\n\n## Contributing\n\nWe're open to all community contributions! If you'd like to contribute in any way, please read [our contribution guidelines](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/CONTRIBUTING.md).\n\n## Security\n\n`@clerk/backend-core` follows good practices of security, but 100% security cannot be assured.\n\n`@clerk/backend-core` is provided **\"as is\"** without any **warranty**. Use at your own risk.\n\n_For more information and to report security issues, please refer to our [security documentation](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/SECURITY.md)._\n\n## License\n\nThis project is licensed under the **MIT license**.\n\nSee [LICENSE](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/LICENSE) for more information.\n","engines":{"node":">=14"},"gitHead":"88da47645bde390837aa53ce243ed7d3c4f557d8","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.15.0+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.15.0","dependencies":{"tslib":"^2.3.1","@clerk/types":"^3.1.0-staging.0","query-string":"^7.0.1","snakecase-keys":"^5.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","node-fetch":"^2.6.0","typescript":"^4.6.4","@types/jest":"^27.4.0","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.3.2"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.0.2-staging.0_1660039348143_0.4740293446529549","host":"s3://npm-registry-packages"}},"2.0.2":{"name":"@clerk/backend-core","version":"2.0.2","license":"MIT","_id":"@clerk/backend-core@2.0.2","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"b770b4c96ab92e2991d07b420f359e886bbc6aa7","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.0.2.tgz","fileCount":426,"integrity":"sha512-N0Rct5AofdfNA3KXAzQXFJj/cg9C7cyJS3EnBjHdOhdNEOhMW9b/eWwak7ATV9hupVxZdxfsDjpppkSx4p0EnA==","signatures":[{"sig":"MEUCIQDkQtZNWzbeDOHur5KOB/pF0M2itnYv0dJ6v11TXdir6wIgdTGr669jwTbRDSmeMaFdOIm2j4UPxprnonuQWbfZqas=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":616833,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi8kuRACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrCUhAAicpj4stvvwLG0Ph+9JKq04C3SRjrV3h0i1jPyuPsDc8ltjRU\r\n15ZnKLRTc64c6BU8FSYiQBk5CnbUKw5sFmGHBS2T2QVI5xlqCAHZQbfZMrrc\r\nm5Y8p6J0et/D7Trclr7vC3TJhRUexw70N58/Vs2/NY6sPVl+L2AQzoYX+9Xr\r\n0mkazfjtoIhnHSrzRyGqZcIt4hzP5d+E9+bJ7OLN3sTz2rXmkEfyVsEK9nTk\r\nn01MqKw/lypEGDSkWavWy4eDkV8wD5AzQZkWfChoF2BB/QEGHmSTguAjSsKw\r\nNHLQ15oMm1oouX2vGeSzIxnTsPX55ufJ8COUu8GXp5hfxOcSFqf2Xe0rwFFt\r\n3ThtHtgSqGNWYoHTQRHu8y4Ru8Ef6V0EpCMwi7iviEjAGcYXDyF//RgDD7+n\r\njgoVE+XcwFEeRTAntTKvPKuxHyGUYefvO/Tt3BV9l8Lmw9nljiyfKT+ncao/\r\nxN4xijD8NaXxp7zQmRScIzFxvUOJaEnMyGH7NZW+BAmU0ZuFbgVnK5Pe3aFJ\r\n6lVK4jQKX7iaIzjv4v71LwzZyKrmfq80Qoa02Sy9IFsa4T/9trGlnvBA6bJw\r\naA81XruuLzEHm41BADVGjeo5ExSCuI62I2m/c4PWC6GFPBLlvmUnBpo/37u1\r\ncU3A7frsaXy23QltSHFz5WVkOh+ZQ6vvCjY=\r\n=Tvai\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","engines":{"node":">=14"},"gitHead":"8ddcce7e61197284c5bb3c991d67613b2679d7ba","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.15.0+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.15.0","dependencies":{"tslib":"^2.3.1","@clerk/types":"^3.1.0","query-string":"^7.0.1","snakecase-keys":"^5.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","node-fetch":"^2.6.0","typescript":"^4.6.4","@types/jest":"^27.4.0","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.3.2"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.0.2_1660046225263_0.5631095450020951","host":"s3://npm-registry-packages"}},"2.0.3":{"name":"@clerk/backend-core","version":"2.0.3","license":"MIT","_id":"@clerk/backend-core@2.0.3","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"d2ae9a4e8bcef39aaebf8f55fe7789b3ed44480a","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.0.3.tgz","fileCount":426,"integrity":"sha512-O3krtyGi99vgdh+5iphSC1STXy86GtNJP2cc0U6zsz2kmdahsH5nnEGQ4n/HluAhIKkqFBZxRaXFD4hqbRGd9g==","signatures":[{"sig":"MEYCIQDJTMa9J9KxaqdWy8ES5/qu91rcFpObt5Vannq2POjigwIhAPfsE2b/CVxZMh3LsqM7Dmlk5WpPE/rKckKRpGuxBkMv","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":617022,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi+7QdACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq0rQ/+M1Y5S2fvp33k8BekqAS4aqDzvs66Z8BaQDGviD6Vc7LA/5an\r\n+cIIkT60a73oYsjhOz+FZWeFEGaF0Gm0cbz/u+lXYESadwSGn+cjHsDwOlJ9\r\n53HbMykuDRN1n6U8xyDZLBTfqKL9A+62mV4navS8yEdyC5fgBKISJk0Ec/Y1\r\nvURDkr+jRYwfnrV8C+MZtawncPMXiwcWk2GEJ38V3fNOd940ReNYdOks5mWb\r\nDTAgzdt5xoS7or5+JKG7RhLuMFQiPoPkzMK81FZ3RVy1UnAFRxejp2H4oq/i\r\nGf4yH1pU+2f2dj5awxXXXUnmDufqFJHqW40FfwM+LmoO+xeq8BYvE0D0Aho8\r\n4l8/2yzqhrdotgQIQXWPeJU5AfnhIBf9B1SbIX5wHYneCJQgEA9M/vySVaQa\r\nwZgONkBkHCdNmzVl/iHRgYwj7n6BimFXljHRc9hQsXgo8FbbAFQF6E57jgOP\r\n6V++JHAkpn9zD+YD8hDJC/U4eKf8Xl6WACDeID4wjWkd+8fufpPctJPcSW0o\r\nvwF2EjlLMREiggAeD8fMXNXGBFHTNAEXw1ZODD7uD/YeB2vnmfugT5/VCwz1\r\nQfVLg81MAz9exr6xrlXjob03x9l3nQUduXvScoubn/OaomoM4L8VXkBNs65S\r\nRD1Da0osiSTacfybwtJV8aZKEg5tTfYUtr0=\r\n=jOia\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","engines":{"node":">=14"},"gitHead":"08ec35eb08bf0371e7da26631b34f814997d7d18","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"sokratis","email":"sokratis.vidros@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.13.0+x64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.13.0","dependencies":{"tslib":"^2.3.1","@clerk/types":"^3.1.1","query-string":"^7.0.1","snakecase-keys":"^5.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","node-fetch":"^2.6.0","typescript":"^4.6.4","@types/jest":"^27.4.0","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.3.2"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.0.3_1660662813129_0.2003040458719374","host":"s3://npm-registry-packages"}},"2.0.4-staging.0":{"name":"@clerk/backend-core","version":"2.0.4-staging.0","license":"MIT","_id":"@clerk/backend-core@2.0.4-staging.0","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"3844187fa1a148b5762a2d3d448f1841857cc54a","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.0.4-staging.0.tgz","fileCount":426,"integrity":"sha512-3OMId9dNCQbA7WBkw8Hx97pCOZQMnbfI4RIwhFna8oauz3Bdh72328jUPDacj8w6ICE5+LM1cA6YjG27gr+M+A==","signatures":[{"sig":"MEYCIQCwFmxCpTbPyQvFiLHa2j4zvACJy7hem9rH+sfZdM6RTAIhAPvWznS8MDSV5VsOWVCG7UcLOW9CyJgKmLJHomr/3ZY9","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":617042,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi/h/aACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoPtA/+NtMGe21pms7vkFgrJGzueCGVPlmko5T+WXQdJUjqM0QspBAD\r\nJYqPpvwdgLxfLazaWaLcwuRc+Esq4sx71mbIImejjDvM8JyPh398kNwrbdMa\r\nKysrhYj0v/RaPmEKT1M7lGS0tfq0GYikZonOawkzj3ro6/i4NKVXfxpd0ATB\r\n99ygmPzImd/DcMxzKT3pQa5pIdIJyQ2ksnT0X/cK6VMwDbv74KUIriOm4RwV\r\ndnFMWnb28lTEud6ZlyO/bQom+H74v7j17gFREnzBi8OFjrELkcovhjTEVv6g\r\nQSOtCP7csRQi2wFyUlzwSHy3daOMVQ993qG3cHs1rkFAfhN+ZgqOQpa+Q03/\r\nr8RK6QKyH64u43p2YaySt5ozBCf0pEo75/FXGptXKl3ClV7baTQPia0eCaWI\r\nj4NkMDTyoORUDoFp6HIFUiPA7E8Sq4lR9GCTe4TKDbfcsiWsTlRU+MsAMsuk\r\ngRNj8dND1JvQocc/TED/J6enLTzKKLhOKB6+5eCS2c6wBRirBuwytMIZz353\r\nLWpeuRul4F4pTLpoPXaUDhA4kZGnkKf+IGx7aKqZl7QUSyrjWWRcfxzuBQKc\r\nmn0xOPI8f47A25z2s5uWNRoJxXtiD1MrThwEHneejmZ0GMiMhCl98O7JZyN8\r\ngHVvysEGlaO4PMTj9PO5V2f6Wjei0xsH9pY=\r\n=qbEV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev?utm_source=github&utm_medium=clerk_backend_core\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <img src=\"https://images.clerk.dev/static/clerk.svg\" alt=\"Clerk logo\" height=\"50\">\n  </a>\n  <br />\n</p>\n\n# @clerk/backend-code\n\n<div align=\"center\">\n\n[![Chat on Discord](https://img.shields.io/discord/856971667393609759.svg?logo=discord)](https://discord.com/invite/b5rXHjAg7A)\n[![Clerk documentation](https://img.shields.io/badge/documentation-clerk-green.svg)](https://clerk.dev/docs?utm_source=github&utm_medium=clerk_backend_core)\n[![Follow on Twitter](https://img.shields.io/twitter/follow/ClerkDev?style=social)](https://twitter.com/intent/follow?screen_name=ClerkDev)\n\n[Changelog](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/CHANGELOG.md)\n·\n[Report a Bug](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=bug&template=bug_report.md&title=Bug%3A+)\n·\n[Request a Feature](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=Feature%3A+)\n·\n[Ask a Question](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n\n</div>\n\n---\n\n## Overview\n\nThis package provides Clerk Backend API core resources and low-level authentication utilities for JavaScript environments. It is mostly used as the base for other Clerk SDKs.\n\n## Getting Started\n\n### Installation\n\n```sh\nnpm install @clerk/backend-core\n```\n\n### Build\n\nTo build the package locally with the TypeScript compiler, run:\n\n```sh\nnpm run build\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities, without being platform/environment, specific such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendApi](./src/api/ClerkBackendApi.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendApi` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n## Usage\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendApi](./src/api/ClerkBackendApi.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://reference.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendApi.ts#17) implementation.\n\n## Support\n\nYou can get in touch with us in any of the following ways:\n\n- Join our official community [Discord server](https://discord.com/invite/b5rXHjAg7A)\n- Open a [GitHub support issue](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n- Contact options listed on [our Support page](https://clerk.dev/support?utm_source=github&utm_medium=clerk_backend_core)\n\n## Contributing\n\nWe're open to all community contributions! If you'd like to contribute in any way, please read [our contribution guidelines](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/CONTRIBUTING.md).\n\n## Security\n\n`@clerk/backend-core` follows good practices of security, but 100% security cannot be assured.\n\n`@clerk/backend-core` is provided **\"as is\"** without any **warranty**. Use at your own risk.\n\n_For more information and to report security issues, please refer to our [security documentation](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/SECURITY.md)._\n\n## License\n\nThis project is licensed under the **MIT license**.\n\nSee [LICENSE](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/LICENSE) for more information.\n","engines":{"node":">=14"},"gitHead":"fb2ec6c7fd49151353e98c7da7d094cc758764b2","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.15.0+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.15.0","dependencies":{"tslib":"^2.3.1","@clerk/types":"^3.2.0-staging.0","query-string":"^7.0.1","snakecase-keys":"^5.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","node-fetch":"^2.6.0","typescript":"^4.6.4","@types/jest":"^27.4.0","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.3.2"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.0.4-staging.0_1660821465704_0.07753091847055527","host":"s3://npm-registry-packages"}},"2.0.4":{"name":"@clerk/backend-core","version":"2.0.4","license":"MIT","_id":"@clerk/backend-core@2.0.4","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"8afef88f4b610115cdd7b27ab4280abc62d25403","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.0.4.tgz","fileCount":426,"integrity":"sha512-kzZil3l6xy+ai4c4/ulwYhAAV79XxQiJ/lXYXGGPRNIWT6MDXWScymTLrh5fhhbIsdNqNaicjKQ41cROGFGzQA==","signatures":[{"sig":"MEUCIBX4EEA5hOszzzW7YQ4R4ZoepzX/9fLsgz+H4whYoWOFAiEA/PjYgjZqAWn16wdXUWBhuTq/rW3+rJ9F6cvk2eVUafQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":617221,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi/i6gACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoydRAAoPiJ0xjfofR3x9rBVGa2ja4IiNbv6lAUKF08PAJ+oftPw0n9\r\n0OeA4Z4ar5i/3iiW0czp8F0H7ePScNBsqRLUjn6jlSE7ZAWrdbPYStptA3RW\r\npYTXvgyptRQFxZsDBaL3sZtA4lO6Ax5vIZ/gA6n3FzWUW3yx9UW+0tvSIR/q\r\nVlyoxowE+JO1ux8ZwW3/rlOP265cSSM/QGj+8OEGWiXXL7tI0KghE8od1BfE\r\nuvM6DF+dKkOZG5P6FGsXx9+gC5UrNRW8Ff2qArE4gBoc+9uIdAJlBT3V7es8\r\nse1ZOcc7XCsyn+PCUOu6TLXGSR3Fo6oi1Gzjz6oxxAHj+1I9P+b2JGTBBO9e\r\n27wORSl7AkdRxJ8YBA3FtyfDZFbcZtPLLGae1ZCq8zlQnEqXObrUoE2Je015\r\nFmSNS82assdXYEP1jR8LA7YJtuMWG+QfPnIHxeJndeYxpKEOagWdpp3aDAG9\r\n5JU9WYnCqPJlSedTi58JZB7/AFjazRdwhc9+s9guMacXalaPYJutSUNQ9WMP\r\nwpvKLhhgTsaKbme1FBA3k4s+kRH6tNBIUY2n4huHrVH7swnN2rngGvgIXhPD\r\nNcAWTJABts7c3v8JBbGW5tH0Nb1xDPSufdz7d9+l8vMHlpac9AhSG+i2o6aK\r\nB4K0dDxiKhaT6s8QLFlBGXbGZR0WeS2FT90=\r\n=UOwh\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","engines":{"node":">=14"},"gitHead":"a9c6c1ada89669180c0078f09854b6ed76782a86","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.15.0+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.15.0","dependencies":{"tslib":"^2.3.1","@clerk/types":"^3.2.0","query-string":"^7.0.1","snakecase-keys":"^5.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","node-fetch":"^2.6.0","typescript":"^4.6.4","@types/jest":"^27.4.0","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.3.2"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.0.4_1660825247848_0.9631299545590413","host":"s3://npm-registry-packages"}},"2.0.5":{"name":"@clerk/backend-core","version":"2.0.5","license":"MIT","_id":"@clerk/backend-core@2.0.5","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"cf3073dfdc2093d035231ad0120758269e5e046c","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.0.5.tgz","fileCount":426,"integrity":"sha512-XOQgEGAVn06s87/GP226TaVqk9Hx3FzkyIvkByPMCs0gnOtf4AJf06/FRUMINOr4YR+LuID7wuv7yAU5ZwlMeg==","signatures":[{"sig":"MEYCIQC/6M2tjcjKoWz/LnEv+vT47Rio+IrblVNsRjCm5SIziAIhALq7vWoj/ZWvP+PAAGte/8O04kUc2Flh0v0W+l7Oeg4l","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":617410,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi/kWHACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo7TQ//T4yqJXUfPf/xaNtqcBe3iP897S/9nQayYSmshxc3EyRxC6yM\r\nPkV4Ip7AVF2n6VytUul5ryJERfua7W98afwbA1SkrRq0r0cVY2CcFKu0n9ln\r\n83o+Rosx2T4zkzAfkGdD1oqv5eDkegiPQnbY4ENPBEbnU5Q5NOHw8fdFZzWQ\r\nF3RcRW3MHQuclf6U3V+/Uy5+7ZKPUVjwOIQQ0TOkI4sbBUc3prScYKFM1axF\r\n8im/L7M6cGlbgYXLJpkYVF2pZCFJHVi73v6iiq6aG/el7jcLDAfhiiLpEpTM\r\nUvNsfzRR7A8jVeotOyp81mEN8J1Faxt5ah3wZSjmLvayr4rlAFmJIueXUbus\r\nAW1mC0ohF21uho8yC6cGxhGkSg0oPuQU6qyF5+hgueRlZsXMKcIJpZwwkkDB\r\niu8qvKv8jatCL5MXSEUGunLSx7hkLEKSb5FG1MV3feJ1CqeoztY1WvmQQBc1\r\ncbfKiZI8z2xaA4575UKni608YI4FuRkVJB3ZP46S9aqHJo6aaPKdU2rkpFHh\r\nngvJ8e3QdcAS3EFHbVb09XZ6DJGd+7I38qdWJb7nV1XluZy4WBE2UWAzty5u\r\nXbrAu89oXq+LecuKn/WsT0NoBOg7+fVpg0JrOj5lTcDwQG33wp2bjLje5B7+\r\nmjLMVVGsPD/rOL5HguIC9rSX7zG+h9khVLA=\r\n=DjKm\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","engines":{"node":">=14"},"gitHead":"52c9b8e1bacc495f987b73f2fa5d7648c9788fe7","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.15.0+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.15.0","dependencies":{"tslib":"^2.3.1","@clerk/types":"^3.3.0","query-string":"^7.0.1","snakecase-keys":"^5.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","node-fetch":"^2.6.0","typescript":"^4.6.4","@types/jest":"^27.4.0","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.3.2"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.0.5_1660831111083_0.18786352676334506","host":"s3://npm-registry-packages"}},"2.1.0":{"name":"@clerk/backend-core","version":"2.1.0","license":"MIT","_id":"@clerk/backend-core@2.1.0","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"c5de862462f5ac2d03f8d4b65cb6853d13fe51e5","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.1.0.tgz","fileCount":426,"integrity":"sha512-TIRtlpvH78CwY+D+/E68w239muOGXCtfwq4n413ukLIkF93Of3sbmCWyxEUXR80UJRLTRac4gPSFFwqzgAZaZw==","signatures":[{"sig":"MEYCIQCLzYB2l7Y9BS5EkXxA9D4gTeUqVCCVjoiPn7Z47qov4AIhAMT2fj24ZldeIIT++XBkIUGpvFCt7Csk6K/NewcvHHkv","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":618039,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi/lUQACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoFVxAAmo0Mta90K0GQ8DBzA3Sa3W/aEC52Jtv3XSJRPrhmSOmDFaB1\r\nHLSSamHotrtvTitRnk08KTHS5FElRW92Ky3FFSXgRCxhE75GdPVbDeDVjEPc\r\ni488Yo+SWkgo0ZhS/HvZVg4NBpkz8z1GVD5kosc7+X06TEJq/VLMQU5743xH\r\nlcu55TLpTgCv+TBvBJwq/B8artxe914kp8eZHnMjNWgxxytfB/oNfB2tnaHk\r\ngZXpMT9ZTUFjDjDGiakGm6ENfnHQsg+yTBmgkcY0pPYayGji5LCdRgxanL1U\r\nxrgF5pi2y6Nvdf/J1+Phaxi6clGeC2S5f86TJCaGryrnMSvXno29mJM8xgRy\r\nFmsqrWHUCxZ/kkBwq/yfRW5pDinRMo/gWp98hGzvijLybbWTaVxTypWNkuW7\r\n5HJockZW8cyU3OA9OpCDhQwGwWBDxuMgnEDsD0ZQuLtqXNF4RRuBUxo9qQPn\r\nqkqigISpmevrarGWj2BsN+VJ+YCoH93/FTInT4wXn4vs2Kfp1U1c4T0iRGNJ\r\nCHISCghdP0QQYfejy4IfAifo2Tr6xEPa56aX7PWjuXwck5N7f3XRzEdf/Tna\r\npxvVYiGzAfxqYdBYvwM1nIjqHJzzfGzngK0yVzIX3GDzgSybsBYb5GC5/6EB\r\nXp304LLG4WgMdSOooWQXaK6go1UZ80fDj5s=\r\n=DlKv\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","engines":{"node":">=14"},"gitHead":"7ca9eb864d22349158674f754303534ce7de5bf5","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"sokratis","email":"sokratis.vidros@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.13.0+x64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.13.0","dependencies":{"tslib":"^2.3.1","@clerk/types":"^3.3.0","query-string":"^7.0.1","snakecase-keys":"^5.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","node-fetch":"^2.6.0","typescript":"^4.6.4","@types/jest":"^27.4.0","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.3.2"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.1.0_1660835088319_0.22158170453837145","host":"s3://npm-registry-packages"}},"2.1.1-staging.0":{"name":"@clerk/backend-core","version":"2.1.1-staging.0","license":"MIT","_id":"@clerk/backend-core@2.1.1-staging.0","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"34dc1250532265ecae449b3dd09148e2a2736e4c","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.1.1-staging.0.tgz","fileCount":443,"integrity":"sha512-AuxVUFDsNpamfBOO1tWjefpShzD98YnSqbAkJD0ZNGR9og2r9uPVDHVP65QbnCD+hH7WSsmJaAegvZi1g+fttw==","signatures":[{"sig":"MEUCIGKxdDEbOFBFZSL8cU8JfzREvSE7762L7tMspuQY7DYXAiEAp09iUqmqGBOl6fg+FK3pw2yHw5dwSH+h09/mh+yoIfU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":683981,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjBe4AACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmrrbw/+KV03wQfR+3zBSiigg32DZzYNITTUI3vTO0NmRK2Zy9F+pSiX\r\nrVpIUCjfewP25khIeB9NpIi/CBiNpjEqI8HN7RK6OQII09rJIfhkOLn8GTZj\r\nesJrhKmK+Ph4x3qt10TnsUuOr8XDAL45IIo0O9a7JFRgDVSbSkczWcaYB2IQ\r\nbq5v/k+6eD3Lw9efRoXbn+4i5XtiXIEE31SQgF5c3wJcrz6JDSCUCJ6tcOBc\r\nw5b69twap34dqI5grulmMH2Wh3bDnzEafQRr1+QQmL7hiiyQ/jvFoFb5wThD\r\nGGDISHyWEgvMNqssnjBU+cPcSVj4b/1A4UwFiFDlblCmMY1tR/pjfFl8frrR\r\nnqELPE/vOfTLlgCH1Aw//Q2ZeglD6Lp9tdxulyPftKjFLgNvUxfsaAknLXNh\r\njpOafl6EcPJYXpmP6UJjK0PJWPXG2ttpt3FBb87sst59LWrE/EDKYCo/+dfV\r\nh9toHMON/XknNSH6wVd7sXNWNrcPrGRKpPVPhBiSb72m2zPt4p3pFbQeV91s\r\n69mXyRt/WURjJMti4bpEu8Em92jGj8wuhAVOi3MqxA5RwSsRI7MNfjKEWIjP\r\nlgk3y1iqJtG6svmLGBUgM1PXscFmftDGZBIVn5/L9DOYY8gqtm9PvVfTUQkY\r\nN47rs3LFEKMSm3f0lgUX/+l4dGVECo8Br8c=\r\n=3XTr\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev?utm_source=github&utm_medium=clerk_backend_core\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <img src=\"https://images.clerk.dev/static/clerk.svg\" alt=\"Clerk logo\" height=\"50\">\n  </a>\n  <br />\n</p>\n\n# @clerk/backend-code\n\n<div align=\"center\">\n\n[![Chat on Discord](https://img.shields.io/discord/856971667393609759.svg?logo=discord)](https://discord.com/invite/b5rXHjAg7A)\n[![Clerk documentation](https://img.shields.io/badge/documentation-clerk-green.svg)](https://clerk.dev/docs?utm_source=github&utm_medium=clerk_backend_core)\n[![Follow on Twitter](https://img.shields.io/twitter/follow/ClerkDev?style=social)](https://twitter.com/intent/follow?screen_name=ClerkDev)\n\n[Changelog](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/CHANGELOG.md)\n·\n[Report a Bug](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=bug&template=bug_report.md&title=Bug%3A+)\n·\n[Request a Feature](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=Feature%3A+)\n·\n[Ask a Question](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n\n</div>\n\n---\n\n## Overview\n\nThis package provides Clerk Backend API core resources and low-level authentication utilities for JavaScript environments. It is mostly used as the base for other Clerk SDKs.\n\n## Getting Started\n\n### Installation\n\n```sh\nnpm install @clerk/backend-core\n```\n\n### Build\n\nTo build the package locally with the TypeScript compiler, run:\n\n```sh\nnpm run build\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities, without being platform/environment, specific such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendApi](./src/api/ClerkBackendApi.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendApi` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n## Usage\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendApi](./src/api/ClerkBackendApi.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://reference.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendApi.ts#17) implementation.\n\n## Support\n\nYou can get in touch with us in any of the following ways:\n\n- Join our official community [Discord server](https://discord.com/invite/b5rXHjAg7A)\n- Open a [GitHub support issue](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n- Contact options listed on [our Support page](https://clerk.dev/support?utm_source=github&utm_medium=clerk_backend_core)\n\n## Contributing\n\nWe're open to all community contributions! If you'd like to contribute in any way, please read [our contribution guidelines](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/CONTRIBUTING.md).\n\n## Security\n\n`@clerk/backend-core` follows good practices of security, but 100% security cannot be assured.\n\n`@clerk/backend-core` is provided **\"as is\"** without any **warranty**. Use at your own risk.\n\n_For more information and to report security issues, please refer to our [security documentation](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/SECURITY.md)._\n\n## License\n\nThis project is licensed under the **MIT license**.\n\nSee [LICENSE](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/LICENSE) for more information.\n","engines":{"node":">=14"},"gitHead":"8b90982ccddc47f59f81890903a1d1303a743078","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.15.0+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.15.0","dependencies":{"tslib":"^2.3.1","@clerk/types":"^3.3.1-staging.0","query-string":"^7.0.1","snakecase-keys":"^5.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","node-fetch":"^2.6.0","typescript":"^4.6.4","@types/jest":"^27.4.0","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.3.2"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.1.1-staging.0_1661332992395_0.7263434296862408","host":"s3://npm-registry-packages"}},"2.1.1":{"name":"@clerk/backend-core","version":"2.1.1","license":"MIT","_id":"@clerk/backend-core@2.1.1","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"783e283e520dc579c8dfbd004d95c350118088a5","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.1.1.tgz","fileCount":426,"integrity":"sha512-hkI+F2ED/o/6XwTa+JU9dgtjx/xz4t0iqvr+DkjPuFLon4FH+e0erhgtQmNAwiCqIWnfWP5nllrx5jbZ52WSCA==","signatures":[{"sig":"MEYCIQDJWxFCU480q8U60IK9QoZbN5gph/90m2ZxRLQ20OtwZAIhAMOP38JwciRZ0xsxqrk00rHkpzAPCc+xib2nduTtSCN+","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":618238,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjBfgcACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr9nw/8CbQc+AyrIfc0JkhIjw8D7jcDVMi4yiMh0LPY13Jxab0ngmns\r\nrigStVFMKqG7uW//XJC7e73aKOeFYXVL9dczqIt3LWVyeDJgZaCam0e6tDNA\r\nQ/SCZnWeHDg+sMSFZeWObvkq2yzZ4MH5CihLAC2wMuwL5uD4puQZkDoxVtoj\r\nmpuNCBvFd6b9w6Ce/RSkeeNLLuoLSJR41MUT6ry4thy7OvEb31yXFup9wjHN\r\nIYhlv9WE3bRlq2Yz6Cwi1etlEy6d1hVyf0j2ojr6vfSFVMR5P8FROd3kZyTv\r\nOwMVazxPCW3tWOXAoj3M57lQtnzPKH4uRO7Zgwi4mb30tIqyr0YePRTW8Gs7\r\nTFMmN284ijroH9DJWCRfn8Lz1mCwmTFXLsdjzSEcV7T+73cgO4Dp3+Uc7Gc/\r\nTl0TOK9Rj+vhSp90mltm5YWcDUrBDwnuuG9QlgpLLMx087LMGovt7xqvNoNx\r\nXE5+0nK54z4f9QlFZqI4MkrRuEbt4SZquKs4JtEINNhpQWJjPOjc9+CJaqlX\r\nuc/5Oukr91Ql17EWZitJNqiVOEXKyxw7dw3VejyXja1xAkpBVMajJZtF08a3\r\nH0itPYNGK4M+MKZINHdUJwZMIXtfC3v1mmpcdPNHuuW8pbC7/6/Y6LSzGut9\r\n7MnGby90J19cz7QsXEnjYi+Ke0uI+rOrgEI=\r\n=jZ9W\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","engines":{"node":">=14"},"gitHead":"52e2d03a6e88c7e3a1724425a4b5c893f7d7a276","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.15.0+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.15.0","dependencies":{"tslib":"^2.3.1","@clerk/types":"^3.3.1","query-string":"^7.0.1","snakecase-keys":"^5.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","node-fetch":"^2.6.0","typescript":"^4.6.4","@types/jest":"^27.4.0","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.3.2"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.1.1_1661335579804_0.7776349513626819","host":"s3://npm-registry-packages"}},"2.1.2-staging.0":{"name":"@clerk/backend-core","version":"2.1.2-staging.0","license":"MIT","_id":"@clerk/backend-core@2.1.2-staging.0","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"cffba02a2e6f3f2f25af457bf71b04c77644510a","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.1.2-staging.0.tgz","fileCount":426,"integrity":"sha512-TrlQm+avVTVn352Knws3Gx3tKRbUskAR34JK8iMtggLstVm6lT3a/EXMnPhhwhIEBW/AhfDyYNC0yZtPi8VOxA==","signatures":[{"sig":"MEUCIQDeiS80T3LXYwq2oBXtiqELrcqqb0/SuhEbqlD8rtLS0gIgT128vE/oTJkkIbH4dNc+UxksaVEm/3w60LVvSaFM9sk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":618267,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjBizuACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrJxA/9FgMNSWmxIyrfsNJAIKPxxPHRd/aKzWGsEE2gm1mG5HSbc613\r\n2yNVzGPhStMFi01OrkZtMw8kRbpl3wa3s4ekrSqNtZ6spi+5CbKoTGWo8vlf\r\nlRZxqFKkB4C/GSYBZdDjncA+bmDfVIjyWkJFHuhYTJOEBN0o8ESfLpa7BL+n\r\nseRDYN/sgLnYCLm9wz2TkMuuhGZkjHtP7j5ZAArEHoHGsxs4HXEz872YpzEJ\r\nqQF33zqEciJUHPRbVFt4LVmU2V3fJKL/xJFxQkUlHpf0iYEcYRKfEc0z4AKX\r\nWcuLjV72XUjnWD2FWeEqTgEr+907HYgJvVKVKaNMMhnOlLiEYz4eHxc0tjd3\r\n0yO/i8aoBOblSw1+HMO4rYpOoIhbxq/8q7nfrTgt+ai3rVtrvyiSMbcZ3kla\r\nf+HaTKxQauYUPy/yZPzRGrenfX923HFOp7p5ZvuWqzbS4HLf9jPAFz9CKRvL\r\nmz5YFP0w83eaKXXfHxnUKxx7Xy483bh0fAeqSI1/uQjjygudEtqqet3yI+Pf\r\nn+KjgDKvpVHL8OSNw9tEAvxybSEVAELtsNdHed6PbjcVEY+VlMpMUlIItL9E\r\nJNtg/FTfJ8oYX4MgELCumoQF/cc8l7Lfw6QJvgcEC+SjV8NWf5PjVuHidi8h\r\n9mUMScYtBShtbzdxU8CEBxt+Flfw3wyRa6Q=\r\n=t7dj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev?utm_source=github&utm_medium=clerk_backend_core\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <img src=\"https://images.clerk.dev/static/clerk.svg\" alt=\"Clerk logo\" height=\"50\">\n  </a>\n  <br />\n</p>\n\n# @clerk/backend-code\n\n<div align=\"center\">\n\n[![Chat on Discord](https://img.shields.io/discord/856971667393609759.svg?logo=discord)](https://discord.com/invite/b5rXHjAg7A)\n[![Clerk documentation](https://img.shields.io/badge/documentation-clerk-green.svg)](https://clerk.dev/docs?utm_source=github&utm_medium=clerk_backend_core)\n[![Follow on Twitter](https://img.shields.io/twitter/follow/ClerkDev?style=social)](https://twitter.com/intent/follow?screen_name=ClerkDev)\n\n[Changelog](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/CHANGELOG.md)\n·\n[Report a Bug](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=bug&template=bug_report.md&title=Bug%3A+)\n·\n[Request a Feature](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=Feature%3A+)\n·\n[Ask a Question](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n\n</div>\n\n---\n\n## Overview\n\nThis package provides Clerk Backend API core resources and low-level authentication utilities for JavaScript environments. It is mostly used as the base for other Clerk SDKs.\n\n## Getting Started\n\n### Installation\n\n```sh\nnpm install @clerk/backend-core\n```\n\n### Build\n\nTo build the package locally with the TypeScript compiler, run:\n\n```sh\nnpm run build\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities, without being platform/environment, specific such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendApi](./src/api/ClerkBackendApi.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendApi` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n## Usage\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendApi](./src/api/ClerkBackendApi.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://reference.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendApi.ts#17) implementation.\n\n## Support\n\nYou can get in touch with us in any of the following ways:\n\n- Join our official community [Discord server](https://discord.com/invite/b5rXHjAg7A)\n- Open a [GitHub support issue](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n- Contact options listed on [our Support page](https://clerk.dev/support?utm_source=github&utm_medium=clerk_backend_core)\n\n## Contributing\n\nWe're open to all community contributions! If you'd like to contribute in any way, please read [our contribution guidelines](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/CONTRIBUTING.md).\n\n## Security\n\n`@clerk/backend-core` follows good practices of security, but 100% security cannot be assured.\n\n`@clerk/backend-core` is provided **\"as is\"** without any **warranty**. Use at your own risk.\n\n_For more information and to report security issues, please refer to our [security documentation](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/SECURITY.md)._\n\n## License\n\nThis project is licensed under the **MIT license**.\n\nSee [LICENSE](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/LICENSE) for more information.\n","engines":{"node":">=14"},"gitHead":"b567fb03e67e23af9a5a565dd384d6986bf36888","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.15.0+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.15.0","dependencies":{"tslib":"^2.3.1","node-fetch":"^2.6.0","@types/node":"^16.11.55","@clerk/types":"^3.3.2-staging.0","query-string":"^7.0.1","snakecase-keys":"^5.1.2","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.4.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","typescript":"^4.6.4","@types/jest":"^27.4.0"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.1.2-staging.0_1661349101866_0.1350955798209703","host":"s3://npm-registry-packages"}},"2.1.2-staging.1":{"name":"@clerk/backend-core","version":"2.1.2-staging.1","license":"MIT","_id":"@clerk/backend-core@2.1.2-staging.1","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"cf615f440c1bb40afe4c2ab565023fb6e313961b","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.1.2-staging.1.tgz","fileCount":426,"integrity":"sha512-+Gokc5ljrDFxHpi80JojsqeNiq+I/xZUr+izuXTB/1Kuax8EHE1DKKrv8cFBVk7kCvsUplRXQ8r1junmNIFlPg==","signatures":[{"sig":"MEQCIElW2ylOLe4L7q7ci+Q0XPdH0sPVdX3WsixcxiaYeIcLAiAZ9ywWkvhG75OYYhMQNf681tWEq3gsr56Dlf4Gp3XuKw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":618267,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjB4/tACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpIQQ//QWLy4lMW6LEBlsOejMSNT7vio+q6GuX+nJdUge7lCzaGBKHa\r\np8CccAiLfbzJcqE/aBxolyDHAb2X5T6WVNZIf7SQRHnMHavVw1oXMlxpk7Cv\r\nnVCdEWlQKMSHxqRPGkcLhLxY2Pslsa1yVNwOEQLo8P2c/urkMgvMItiKqkbR\r\nTE8fQwCxAXCYZlx0iKDb6DZpObdP1I8Md3iLfZdJx3E3bx4INExPkryq4h+l\r\nZielis+RZpY4XJWQz4qolfCcI5KCMTuS1cxidSQnm1x+Mox2GAAq9CDZ06iZ\r\no8A+6DtfhLrVwx5exMNCVesm2WRY/UeWjXPvbb4Q7t9AB1Vmc1H/jWpDAYl1\r\n40PtJb0VGHH7gSmBuMYVCv+r0ltdpOSuLHfOFUC01xAB7jXb2SyuwHCUw5xj\r\n3cRE8jNIKj+6XZo0cdaGzvx3kd79XBO+F5l3QmETm2sXwYFWSYI82EYhT/9x\r\n0pCVdYEdnSP0sdOIWy+d6SUNv3pKxtjtgaH4tDXTnZqbEqfd5LzXGLXnWIRs\r\nW6ksUkBrDbkhrvhF27e46IpTTM2/6D0B/QBn2xhA25cHVHEPNPKaUAymJpTj\r\nZKqFit6lJyZ9lo2hsHSn93RjXG+SBYJ2GwrI3/flr/UyGGPbiLqgJbA34wU8\r\n2KNluoR8QxyC8PIhQ1Pv2EhVo6IVy2uHkvY=\r\n=JhEp\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev?utm_source=github&utm_medium=clerk_backend_core\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <img src=\"https://images.clerk.dev/static/clerk.svg\" alt=\"Clerk logo\" height=\"50\">\n  </a>\n  <br />\n</p>\n\n# @clerk/backend-code\n\n<div align=\"center\">\n\n[![Chat on Discord](https://img.shields.io/discord/856971667393609759.svg?logo=discord)](https://discord.com/invite/b5rXHjAg7A)\n[![Clerk documentation](https://img.shields.io/badge/documentation-clerk-green.svg)](https://clerk.dev/docs?utm_source=github&utm_medium=clerk_backend_core)\n[![Follow on Twitter](https://img.shields.io/twitter/follow/ClerkDev?style=social)](https://twitter.com/intent/follow?screen_name=ClerkDev)\n\n[Changelog](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/CHANGELOG.md)\n·\n[Report a Bug](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=bug&template=bug_report.md&title=Bug%3A+)\n·\n[Request a Feature](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=Feature%3A+)\n·\n[Ask a Question](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n\n</div>\n\n---\n\n## Overview\n\nThis package provides Clerk Backend API core resources and low-level authentication utilities for JavaScript environments. It is mostly used as the base for other Clerk SDKs.\n\n## Getting Started\n\n### Installation\n\n```sh\nnpm install @clerk/backend-core\n```\n\n### Build\n\nTo build the package locally with the TypeScript compiler, run:\n\n```sh\nnpm run build\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities, without being platform/environment, specific such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendApi](./src/api/ClerkBackendApi.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendApi` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n## Usage\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendApi](./src/api/ClerkBackendApi.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://reference.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendApi.ts#17) implementation.\n\n## Support\n\nYou can get in touch with us in any of the following ways:\n\n- Join our official community [Discord server](https://discord.com/invite/b5rXHjAg7A)\n- Open a [GitHub support issue](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n- Contact options listed on [our Support page](https://clerk.dev/support?utm_source=github&utm_medium=clerk_backend_core)\n\n## Contributing\n\nWe're open to all community contributions! If you'd like to contribute in any way, please read [our contribution guidelines](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/CONTRIBUTING.md).\n\n## Security\n\n`@clerk/backend-core` follows good practices of security, but 100% security cannot be assured.\n\n`@clerk/backend-core` is provided **\"as is\"** without any **warranty**. Use at your own risk.\n\n_For more information and to report security issues, please refer to our [security documentation](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/SECURITY.md)._\n\n## License\n\nThis project is licensed under the **MIT license**.\n\nSee [LICENSE](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/LICENSE) for more information.\n","engines":{"node":">=14"},"gitHead":"41f18442e4fae540f5f9d9191c933114cdfa04b8","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.15.0+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.15.0","dependencies":{"tslib":"^2.3.1","node-fetch":"^2.6.0","@types/node":"^16.11.55","@clerk/types":"^3.3.2-staging.1","query-string":"^7.0.1","snakecase-keys":"^5.1.2","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.4.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","typescript":"^4.6.4","@types/jest":"^27.4.0"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.1.2-staging.1_1661439981149_0.3802683825874482","host":"s3://npm-registry-packages"}},"2.2.0-staging.0":{"name":"@clerk/backend-core","version":"2.2.0-staging.0","license":"MIT","_id":"@clerk/backend-core@2.2.0-staging.0","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"2618413657b131e322ebed97fcafad354f274f44","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.2.0-staging.0.tgz","fileCount":426,"integrity":"sha512-WPruf9u9+GtGX+yjhJQZNdjGTJUpABoQG5110Coyp8jtRfjHPcxIjYOTopKYBdCIFEjHX3EK2/Q7zo0IBqCGVQ==","signatures":[{"sig":"MEUCIEyVV7Hk1OqkAytx4opURwVvXA1OGqWNROCHfVAMFvzIAiEAgznfxg/Rwz4nc+hxBLmYyUCxeJVINqfa+3yLv+6/rlU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":620661,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjCH8dACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp5Zg/8DkhvXk3t+BU17Jr/HGsy2PRTVePCaFxmG/6YG+ZzSSIlUYk/\r\nAkz+KSrw+YZ70XS0Mh2qrlA1ic325G4yzrYqWTVAEj7jXp0JYzUI3/ngKi1d\r\nFBC7x/Q29IAhWw6HOhJiWvjvVOgD/HFL+25Sp3U76d7nuy2RlwbAmale3/jt\r\ny3zi+Q5vNIVkoUlpvFNOS5U0jTNOIpKmaxR/hK+fM1brP1zJRb+K0Q7JTKZI\r\nk985TC93YhdLF2VSXJcaF9Hl+dnbbbcAlvqNeklKZyUUwJmx3U3pYEQUfs1I\r\nm5afoTGggJOk+B4MJEDHSlFcdk/lIdNdKtFyTKnI8iPWkUpQYJx9bctc8CRZ\r\n/7r/QMcaflTnBNmeURrQHgnH01dWz4+KHrzkiFllRy86ATCgOuo2pDPPScvO\r\nzxWZM7WcUWtuYi8DgSSDBONXJk6X3BV3eSxfva7oQySidkpj72W3D0vov77T\r\nV3IXCietUue3fvEPcsnNuN2+OiVyteXaCB0UtkmFoTAVM3hvSODkJIg2it/X\r\nUXoxrYwImtoUYHHE0j1tPAstgxObFtfZtu8v+1mGtk8o617epGw2akEbGDOj\r\n58Eme0Na+XeF8Iehstxk+UoVcjUomyQPREFVQm9Lorruuu+s8++saefxU/BB\r\ne2mYbAbP9D8MlyYChY9b4mq7pQibZUtMsAA=\r\n=iIK0\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev?utm_source=github&utm_medium=clerk_backend_core\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <img src=\"https://images.clerk.dev/static/clerk.svg\" alt=\"Clerk logo\" height=\"50\">\n  </a>\n  <br />\n</p>\n\n# @clerk/backend-code\n\n<div align=\"center\">\n\n[![Chat on Discord](https://img.shields.io/discord/856971667393609759.svg?logo=discord)](https://discord.com/invite/b5rXHjAg7A)\n[![Clerk documentation](https://img.shields.io/badge/documentation-clerk-green.svg)](https://clerk.dev/docs?utm_source=github&utm_medium=clerk_backend_core)\n[![Follow on Twitter](https://img.shields.io/twitter/follow/ClerkDev?style=social)](https://twitter.com/intent/follow?screen_name=ClerkDev)\n\n[Changelog](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/CHANGELOG.md)\n·\n[Report a Bug](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=bug&template=bug_report.md&title=Bug%3A+)\n·\n[Request a Feature](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=Feature%3A+)\n·\n[Ask a Question](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n\n</div>\n\n---\n\n## Overview\n\nThis package provides Clerk Backend API core resources and low-level authentication utilities for JavaScript environments. It is mostly used as the base for other Clerk SDKs.\n\n## Getting Started\n\n### Installation\n\n```sh\nnpm install @clerk/backend-core\n```\n\n### Build\n\nTo build the package locally with the TypeScript compiler, run:\n\n```sh\nnpm run build\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities, without being platform/environment, specific such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendApi](./src/api/ClerkBackendApi.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendApi` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n## Usage\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendApi](./src/api/ClerkBackendApi.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://reference.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendApi.ts#17) implementation.\n\n## Support\n\nYou can get in touch with us in any of the following ways:\n\n- Join our official community [Discord server](https://discord.com/invite/b5rXHjAg7A)\n- Open a [GitHub support issue](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n- Contact options listed on [our Support page](https://clerk.dev/support?utm_source=github&utm_medium=clerk_backend_core)\n\n## Contributing\n\nWe're open to all community contributions! If you'd like to contribute in any way, please read [our contribution guidelines](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/CONTRIBUTING.md).\n\n## Security\n\n`@clerk/backend-core` follows good practices of security, but 100% security cannot be assured.\n\n`@clerk/backend-core` is provided **\"as is\"** without any **warranty**. Use at your own risk.\n\n_For more information and to report security issues, please refer to our [security documentation](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/SECURITY.md)._\n\n## License\n\nThis project is licensed under the **MIT license**.\n\nSee [LICENSE](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/LICENSE) for more information.\n","engines":{"node":">=14"},"gitHead":"205e1c56a3c9416f8305a919a68ab7ac4158a563","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.15.0+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.15.0","dependencies":{"tslib":"^2.3.1","node-fetch":"^2.6.0","@types/node":"^16.11.55","@clerk/types":"^3.4.0-staging.0","query-string":"^7.0.1","snakecase-keys":"^5.1.2","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.4.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","typescript":"^4.6.4","@types/jest":"^27.4.0"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.2.0-staging.0_1661501213118_0.5477987152119954","host":"s3://npm-registry-packages"}},"2.2.0-staging.1":{"name":"@clerk/backend-core","version":"2.2.0-staging.1","license":"MIT","_id":"@clerk/backend-core@2.2.0-staging.1","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"5d5c1cd496120b6155ba350411fe1dc4fbfd6969","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.2.0-staging.1.tgz","fileCount":426,"integrity":"sha512-B8gSfCIg5O8uHFIKEHacoTkgXSNnQzNtvR04BY1QQixQLCc384L0ZHBn9rW8nzVJPgNzzfz8O9gyp2A02s0mIw==","signatures":[{"sig":"MEQCIGAwzTT9hwKycQuiwM7JzTFgf4zHbtzR3E0NAVunakhjAiBHurvgCBufs4k3o9CQRlqRtPglLdT35tcg4VwQtHqyrA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":620560,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjDHshACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmowfA//fWsUheD42IEDthswIfiAijllu/tpOoccOQuM4IqHpdiby2HY\r\nE8RyvXhdk+MDnh4GVkx6NffMfCiF7NIUN2ojz+5ljNICxNU1E2MmsuCF88BR\r\n5h5m9S8AbSEfxBpBoSKZyVvDdj2mhgg66bgOceT5WxMoqNs4mb7Sy7SzPAOF\r\nJpom39apeq5jWMd8vQ4//GXGXy50/KSTe/eiGinhcTjuse9rQvvNtE4nkkR4\r\n0wSDawCKwnT21AM8j+QyIIZ7i/RsOapkS2rG9pPetHOiOuTi6a7EUYzDy0Wd\r\n0gOZ5Iy8Hh0C5ODOhx52r49Kuq0C6FnqzQDDuT7ZLvuPSCRv4rLYKwXWUr3E\r\nz/FnT6UfAKbHtG9DuT3w/UBvxENfC5/h96rGcYhtC+C8v82PaGbghYSv7Wan\r\nWZHxX/vof1s2oRJAP55ai98pGVRST2akWaVcaQ2Rf5m9FRzjmFBx+L8EzNsJ\r\nzWmAJTqKKg0kWf4LQKtbXsFs/B0RNYCO8Kx93hisLh5F2x0biYVO7v0Zcv9E\r\nhZYYiLTSfnqTr11wGW+s6sZOYDwdWucTMld5DmZXDiEAQAbq79Rx/cmBZh8j\r\naIrbUfBCQaNZaW40husC1nJCZLHPuhNiqrtr+CVGVV259oicDxuaNhoMKKE/\r\ngJUY1kTYf/tKgf/FlRUyI9O9wU6hF8CiL5M=\r\n=8JDg\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev?utm_source=github&utm_medium=clerk_backend_core\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <img src=\"https://images.clerk.dev/static/clerk.svg\" alt=\"Clerk logo\" height=\"50\">\n  </a>\n  <br />\n</p>\n\n# @clerk/backend-code\n\n<div align=\"center\">\n\n[![Chat on Discord](https://img.shields.io/discord/856971667393609759.svg?logo=discord)](https://discord.com/invite/b5rXHjAg7A)\n[![Clerk documentation](https://img.shields.io/badge/documentation-clerk-green.svg)](https://clerk.dev/docs?utm_source=github&utm_medium=clerk_backend_core)\n[![Follow on Twitter](https://img.shields.io/twitter/follow/ClerkDev?style=social)](https://twitter.com/intent/follow?screen_name=ClerkDev)\n\n[Changelog](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/CHANGELOG.md)\n·\n[Report a Bug](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=bug&template=bug_report.md&title=Bug%3A+)\n·\n[Request a Feature](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=Feature%3A+)\n·\n[Ask a Question](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n\n</div>\n\n---\n\n## Overview\n\nThis package provides Clerk Backend API core resources and low-level authentication utilities for JavaScript environments. It is mostly used as the base for other Clerk SDKs.\n\n## Getting Started\n\n### Installation\n\n```sh\nnpm install @clerk/backend-core\n```\n\n### Build\n\nTo build the package locally with the TypeScript compiler, run:\n\n```sh\nnpm run build\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities, without being platform/environment, specific such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendApi](./src/api/ClerkBackendApi.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendApi` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n## Usage\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendApi](./src/api/ClerkBackendApi.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://reference.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendApi.ts#17) implementation.\n\n## Support\n\nYou can get in touch with us in any of the following ways:\n\n- Join our official community [Discord server](https://discord.com/invite/b5rXHjAg7A)\n- Open a [GitHub support issue](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n- Contact options listed on [our Support page](https://clerk.dev/support?utm_source=github&utm_medium=clerk_backend_core)\n\n## Contributing\n\nWe're open to all community contributions! If you'd like to contribute in any way, please read [our contribution guidelines](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/CONTRIBUTING.md).\n\n## Security\n\n`@clerk/backend-core` follows good practices of security, but 100% security cannot be assured.\n\n`@clerk/backend-core` is provided **\"as is\"** without any **warranty**. Use at your own risk.\n\n_For more information and to report security issues, please refer to our [security documentation](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/SECURITY.md)._\n\n## License\n\nThis project is licensed under the **MIT license**.\n\nSee [LICENSE](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/LICENSE) for more information.\n","engines":{"node":">=14"},"gitHead":"354e3bc6e19dea8c56346de45daab24d93ea7e80","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.15.0+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.15.0","dependencies":{"tslib":"^2.3.1","node-fetch":"^2.6.0","@types/node":"^16.11.55","@clerk/types":"^3.4.0-staging.0","query-string":"^7.0.1","snakecase-keys":"^5.1.2","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.4.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","typescript":"^4.6.4","@types/jest":"^27.4.0"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.2.0-staging.1_1661762336873_0.705605823286052","host":"s3://npm-registry-packages"}},"2.2.0":{"name":"@clerk/backend-core","version":"2.2.0","license":"MIT","_id":"@clerk/backend-core@2.2.0","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"d6359e121075a7f9e96a2fb47f307b652481b3f4","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.2.0.tgz","fileCount":426,"integrity":"sha512-oLJUQUQeaaTRN8HbqPJWNbAvBg0aFVUu3hVQgHfQxXPzHQJKvAQwp4C00Os7NECWD/UP11sMVAhiFoDgrFZ4uw==","signatures":[{"sig":"MEQCIEaIhvkXha3ydZYkXn0lbAzj2eLrsaRmkDYFiu8fDBuBAiAA/uzYPHty5ner0qrqNthVCY+TdY8Q3hkxLIM/ravTDw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":623448,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjDH8XACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo6Qw//Z4tDiGO3ndcokwzu7C0jtVEcOGaU5TKOzKYc2ckeVpJtPZS7\r\njPsmpD9Gw3MDRgtqEfEUbfYH5SAGXEWiXtgdmnt4T+hBvit5VKZvT/VbroHT\r\nT899G+iFqYP8VbXf+8fohqaF+gm76O88aWMFVgypE/iWpRcqEpc2Qt8qQlw5\r\nWFyUbJLgPGJ6HxUZC3Wk1w+sgM9lzvcWv2wnVXu068stW6XOawiYDtIKMqgc\r\n4ETFO9XDjYXiZkZ2oZppkLGxIXUuVFPG9f5yxUs5C1FXab4wxfHr8sX+mpEs\r\nQwvdAjH7T3BvwrIwdcLC/mHdXtDhHvekBlO5D2XjFTYrxswhNIyxxoC8A/Sr\r\nRljVdOYPWAx0R1iBN1i/Q4r0HLgQJfQRdo8hhuT4QXlvtmfJBk+GVtM0wZ5K\r\neBAgI6B8MV+YckcMYRvOI+XfNNv4GKIWEbobL13Co1oqfqdlofHqJIIwtUOX\r\n2GqyKHJteT5TK2LRKby6DUk6PcYJ/uEXr7xHzSXtzouXDQQjSnwmuc6+a9lh\r\nsMpRasXuK2U7gNdTcV2hvEtjJI2mAfLu+Svq3dONWAtIaFnc2v6iYwVIQ9Pm\r\nLqhDwbQWk4hevwWuvdc057e4rnQb35CyiNghsx/ItVAh+W2b7DkFEN+zdG74\r\nWlr8y65BXboddZclhOw1XxIRgC8A7kpIE8w=\r\n=vQK/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","engines":{"node":">=14"},"gitHead":"c3d01a8ceb8eb57f1eca0f7d055f70b2abb866d9","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.15.0+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.15.0","dependencies":{"tslib":"^2.3.1","node-fetch":"^2.6.0","@types/node":"^16.11.55","@clerk/types":"^3.4.0","query-string":"^7.0.1","snakecase-keys":"^5.1.2","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.4.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","typescript":"^4.6.4","@types/jest":"^27.4.0"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.2.0_1661763351115_0.8618140529379852","host":"s3://npm-registry-packages"}},"2.3.0-staging.0":{"name":"@clerk/backend-core","version":"2.3.0-staging.0","license":"MIT","_id":"@clerk/backend-core@2.3.0-staging.0","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"113118e7d4feeb793ef15d2f9c719e1ddd6e71f0","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.3.0-staging.0.tgz","fileCount":426,"integrity":"sha512-8yE5C14J5dGsdSmMFwEssPU5AXv1UKghQZwid4X7qUev3f6OagzUl6HjivKEA8jXIKydItL4zwCMwCdnpTOryw==","signatures":[{"sig":"MEYCIQC14d06Ek1SCf5qcf/su+y154fYpfJI5V1xizEXbtlUlQIhAMK0OjOCZKuaHFIegipr3RwByhngBbTd8qMRfqMDC2e0","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":624023,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjDKuZACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp1/Q/9EKU9BC38EJbeDp2IXuiLiNL7YJMZmPNrcCVreCNK4TjpoqBn\r\n5qfQfE6EO+lryT1fUSzb4H7iHCXtXbXMUJ6WzAG9KvdEc6mx0kEr6FbgMLCz\r\nWNoRT+ecRI5TaqDvMk8ck7vMWQ7wHtm0fxFIhwoWX/Hnl4eYA+rr5aTvj4lT\r\nc4Ecw7s+ITEGHO+Mw56nCKWhiz/nZMBOK0trfqjaKjZAQOK+3mfcgZ7T6SWr\r\nFenwN61NQljjfsgUTd5/yLmBfV7eNKzNe4LS7elSP5yJaIH8Beviieh0/kRp\r\ntF3jh/Nqf698a8Zkvt+6QsAEPS2lniLyZMyAD9Aee00PrNMbFbcPKF9N/NAJ\r\n3if6ZR+5tUOrXlRnFD/UH8iec+I8LuEKveb0IBToZmMhGDQTnrA9YfgqXR5g\r\nqbTGPUpn4udwOBPQ9L8h6in7oH4B1T8AObhg6w1xaZx2VPXcZp0JgbQPzz/f\r\n5QCIisFThht68Sze94wlBBIFE+zQaBvmz2Z6AxBFF1JiCrPRSWK4DWF5/7fd\r\n1qaycEUIjkFr0SRm14rJHq85Byl7ogx+/OF5d3PliIb88suPmvZV1+aEmhTP\r\nsMrKR3g2q8ILt+66AVaqsuKxSVgo24gl2Aq6RebE+xzhzHTfokPnig0i5rQN\r\np86sfEgX8wJcznfkUvZzT4I4AOZOAAn+5Ws=\r\n=pQNA\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev?utm_source=github&utm_medium=clerk_backend_core\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <img src=\"https://images.clerk.dev/static/clerk.svg\" alt=\"Clerk logo\" height=\"50\">\n  </a>\n  <br />\n</p>\n\n# @clerk/backend-code\n\n<div align=\"center\">\n\n[![Chat on Discord](https://img.shields.io/discord/856971667393609759.svg?logo=discord)](https://discord.com/invite/b5rXHjAg7A)\n[![Clerk documentation](https://img.shields.io/badge/documentation-clerk-green.svg)](https://clerk.dev/docs?utm_source=github&utm_medium=clerk_backend_core)\n[![Follow on Twitter](https://img.shields.io/twitter/follow/ClerkDev?style=social)](https://twitter.com/intent/follow?screen_name=ClerkDev)\n\n[Changelog](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/CHANGELOG.md)\n·\n[Report a Bug](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=bug&template=bug_report.md&title=Bug%3A+)\n·\n[Request a Feature](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=Feature%3A+)\n·\n[Ask a Question](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n\n</div>\n\n---\n\n## Overview\n\nThis package provides Clerk Backend API core resources and low-level authentication utilities for JavaScript environments. It is mostly used as the base for other Clerk SDKs.\n\n## Getting Started\n\n### Installation\n\n```sh\nnpm install @clerk/backend-core\n```\n\n### Build\n\nTo build the package locally with the TypeScript compiler, run:\n\n```sh\nnpm run build\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities, without being platform/environment, specific such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendApi](./src/api/ClerkBackendApi.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendApi` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n## Usage\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendApi](./src/api/ClerkBackendApi.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://reference.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendApi.ts#17) implementation.\n\n## Support\n\nYou can get in touch with us in any of the following ways:\n\n- Join our official community [Discord server](https://discord.com/invite/b5rXHjAg7A)\n- Open a [GitHub support issue](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n- Contact options listed on [our Support page](https://clerk.dev/support?utm_source=github&utm_medium=clerk_backend_core)\n\n## Contributing\n\nWe're open to all community contributions! If you'd like to contribute in any way, please read [our contribution guidelines](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/CONTRIBUTING.md).\n\n## Security\n\n`@clerk/backend-core` follows good practices of security, but 100% security cannot be assured.\n\n`@clerk/backend-core` is provided **\"as is\"** without any **warranty**. Use at your own risk.\n\n_For more information and to report security issues, please refer to our [security documentation](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/SECURITY.md)._\n\n## License\n\nThis project is licensed under the **MIT license**.\n\nSee [LICENSE](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/LICENSE) for more information.\n","engines":{"node":">=14"},"gitHead":"6c48104c8625c87a0d003117020af4d989768416","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.15.0+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.15.0","dependencies":{"tslib":"^2.3.1","node-fetch":"^2.6.0","@types/node":"^16.11.55","@clerk/types":"^3.4.1-staging.0","query-string":"^7.0.1","snakecase-keys":"^5.1.2","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.4.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","typescript":"^4.6.4","@types/jest":"^27.4.0"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.3.0-staging.0_1661774744999_0.685591531199385","host":"s3://npm-registry-packages"}},"2.3.0":{"name":"@clerk/backend-core","version":"2.3.0","license":"MIT","_id":"@clerk/backend-core@2.3.0","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"bc73e9bb4eb13c8beb3eb9fc9d79159e7199bcae","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.3.0.tgz","fileCount":426,"integrity":"sha512-9pHFRLV4NIyTIej6HjUueGKZkci04YSihk2b/mV/MeM4Wo6GJDUNtwxCnP8i+XPLLMGC1yFNcCMWwqHraCCyqw==","signatures":[{"sig":"MEYCIQDnT8F/jP01lC4K3i7sErXpg6gcdAxWZ4eT2r44CYCFmAIhAMPh5tv90TBt8OMrp6QQY1lqjbdTQ9mGm/ZdmBdicnzB","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":624491,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjDK7yACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmou4w/+Ma7fTPityt6v4D02UetHA6AgY2OLf1LZt04CQInps88c5WzV\r\nxrnUkJpvuPPio+nNP2SkA8FAPWs6Bf1b2yirKrmi9byPZICebw5qSUiXV6EY\r\nzqUebQc7TQIo5H9UvVxzeNNkLGnm2M9svmSc+vKlbvh160re12YsCzgH/Pdr\r\nhoF41oiSH6gFC7W81W+e7vSm1yBpD3j9f0Vky0oN5M1FfO50Hlcrk4rv0w0f\r\n0h77inT8cPcVKHlBwdrK1DhA//6dAgFpn9dh4vR+q6zOno8H1XeygDRWEtus\r\ntYS+MmBH7lGV3EICvHMteAmcrVowPM7WpMfREXRqh0viycSts+jmvAN3SPDl\r\n2vNLNhumaGbSdl9WIa/ZbktyK0vGsOZiRK6ikn6YZhJHn95pscq/hKrH96MB\r\nwyLyU99QtahUImvORh5kNE+8s2QhcUs/i8uVhDFBBwRAPtAb2SQ5LgwA2pYL\r\n8PduXE6p5onLuzskZOulAY0GESGlOLX2mn/9clTUjqJGyp+8a5/cyl4Zt4Gj\r\nrsPD17CKa0b6jrq+pB31hxm5F/zZVHJeW0/3uEuPxF6TUtlRHRfuBgXqjsBt\r\n8iOdfp3FrGGdmytGFIUh3PVwXDg/pdPDZt43haXQ1LuROoOpegxYGFgmIN9d\r\nZrf5AQozmV9SkBAI7FVT+CzgnjzzAygMCEI=\r\n=yRTq\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","engines":{"node":">=14"},"gitHead":"eb90e8cd6bd584b920f99a92b50f93d53f65f291","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.15.0+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.15.0","dependencies":{"tslib":"^2.3.1","node-fetch":"^2.6.0","@types/node":"^16.11.55","@clerk/types":"^3.4.1","query-string":"^7.0.1","snakecase-keys":"^5.1.2","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.4.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","typescript":"^4.6.4","@types/jest":"^27.4.0"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.3.0_1661775601848_0.17713755721427793","host":"s3://npm-registry-packages"}},"2.4.0-staging.0":{"name":"@clerk/backend-core","version":"2.4.0-staging.0","license":"MIT","_id":"@clerk/backend-core@2.4.0-staging.0","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"b50ee8a06535ccf608652705906786fed3e5a9f6","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.4.0-staging.0.tgz","fileCount":426,"integrity":"sha512-NaXM1pJ2vijZIH/1mDPerlJ+QluTrsjn2NjwwJc2eWKzTpFOXiKodbnqMFoY6PAGT1W05X9U5NK4nNdb1A/edw==","signatures":[{"sig":"MEYCIQC25RmvHKgL5p86TyA3YQBoPXsH+rWITJyNYqHeLX2fTgIhAIgnnEKlnPpdC00Tp0KfjcA85XR4axLZD55aFgWm+po4","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":625719,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjFzHhACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpRdBAAjaD8k2iHFExG9k4Xz+Lh99hOROLaj1yCBV0/S+SZqso56B++\r\nZlpl2Ff3T4abtuxtvOItLI/QU+5X/xpFPdBvQwjNCq4hKIjTEJLRtHvbGgRz\r\nxCBIBkcITbZLORlBULrJ4rVxOsTMRIrEF64Mf09PterUT3NrpZVR5ZPLURjg\r\nIXf7ETghOx3Zk070C+4EE9LRDNQY/Ih9CVg0Eui7SwAu8op8ZABlFcg92Ncg\r\nUrHhavXjWVX8nQzq8vEUBYhPGj04X5c9PUxFpio3jzeEkxMqM6NF+4Zqk73A\r\nOYHqhIYaWgpMMbQlARSJZxZgH4lEwR0wIeYTJd4VMXfO7LDlkydE01e5sHs8\r\nGL+rfs9An6ftgJMgpxpB+5OfY3/4BjRTUN7nRSBaKfEsa3UwAd+NHl63n2GQ\r\nclbRIn4wIexgVvY6QL7hwWp69KEzOeq8Qtj5agdoRXNbWxvowYTBENnv3FFc\r\nbccIROL78qmGo0UcjOIuQ5Hji6IvKos2L4hmZ1BzFLQ+ocEvkfslfITHswrU\r\nXdqIG/NEJf7yMtHkFifrIBEOWIjKw5pdG2YMVVT4xh7+SccWamIdRwIw3YPf\r\nx+3jc/e0Vk/Vq8NzBmkTnQ6yeUXhi+h77mAfjd3uffyE9RKfZja1/0Q+xfA0\r\nPPooxJmYB+kdOooNRJVEYYUQuicK9iqIsBo=\r\n=BeV1\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev?utm_source=github&utm_medium=clerk_backend_core\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <img src=\"https://images.clerk.dev/static/clerk.svg\" alt=\"Clerk logo\" height=\"50\">\n  </a>\n  <br />\n</p>\n\n# @clerk/backend-code\n\n<div align=\"center\">\n\n[![Chat on Discord](https://img.shields.io/discord/856971667393609759.svg?logo=discord)](https://discord.com/invite/b5rXHjAg7A)\n[![Clerk documentation](https://img.shields.io/badge/documentation-clerk-green.svg)](https://clerk.dev/docs?utm_source=github&utm_medium=clerk_backend_core)\n[![Follow on Twitter](https://img.shields.io/twitter/follow/ClerkDev?style=social)](https://twitter.com/intent/follow?screen_name=ClerkDev)\n\n[Changelog](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/CHANGELOG.md)\n·\n[Report a Bug](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=bug&template=bug_report.md&title=Bug%3A+)\n·\n[Request a Feature](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=Feature%3A+)\n·\n[Ask a Question](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n\n</div>\n\n---\n\n## Overview\n\nThis package provides Clerk Backend API core resources and low-level authentication utilities for JavaScript environments. It is mostly used as the base for other Clerk SDKs.\n\n## Getting Started\n\n### Installation\n\n```sh\nnpm install @clerk/backend-core\n```\n\n### Build\n\nTo build the package locally with the TypeScript compiler, run:\n\n```sh\nnpm run build\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities, without being platform/environment, specific such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendApi](./src/api/ClerkBackendApi.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendApi` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n## Usage\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendApi](./src/api/ClerkBackendApi.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://reference.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendApi.ts#17) implementation.\n\n## Support\n\nYou can get in touch with us in any of the following ways:\n\n- Join our official community [Discord server](https://discord.com/invite/b5rXHjAg7A)\n- Open a [GitHub support issue](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n- Contact options listed on [our Support page](https://clerk.dev/support?utm_source=github&utm_medium=clerk_backend_core)\n\n## Contributing\n\nWe're open to all community contributions! If you'd like to contribute in any way, please read [our contribution guidelines](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/CONTRIBUTING.md).\n\n## Security\n\n`@clerk/backend-core` follows good practices of security, but 100% security cannot be assured.\n\n`@clerk/backend-core` is provided **\"as is\"** without any **warranty**. Use at your own risk.\n\n_For more information and to report security issues, please refer to our [security documentation](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/SECURITY.md)._\n\n## License\n\nThis project is licensed under the **MIT license**.\n\nSee [LICENSE](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/LICENSE) for more information.\n","engines":{"node":">=14"},"gitHead":"21c3191a834f58d7bf6a8522c90f6b3cb3537735","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.15.0+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.15.0","dependencies":{"tslib":"^2.3.1","node-fetch":"^2.6.0","@types/node":"^16.11.55","@clerk/types":"^3.4.1","query-string":"^7.0.1","snakecase-keys":"^5.1.2","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.4.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","typescript":"^4.6.4","@types/jest":"^27.4.0"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.4.0-staging.0_1662464481266_0.6933009571224555","host":"s3://npm-registry-packages"}},"2.4.0":{"name":"@clerk/backend-core","version":"2.4.0","license":"MIT","_id":"@clerk/backend-core@2.4.0","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"f712b8640b62bda2f82cbdf56b25db9b60015512","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.4.0.tgz","fileCount":426,"integrity":"sha512-FZ46W/skJ39jec8TROqer7GCg6YLsuks1uFmrARmZ5y+b/jc3i5tkUD06+dT6dC6VkQW224ExA0rFADTgCJzag==","signatures":[{"sig":"MEQCIDCKcBtz2KlRhdcqk14wjmGea5269MiHYFFbs2mZaP5KAiAAj76o/bz8HxqFNMGojLxqfC4B1bXEILktLtgVHBPXwg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":626210,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjGE/uACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp60g//V1klxQsffrjxDhaTeaIpGXJ6TjJNBRF/L/wbAqRMh6iaBOcc\r\ni0W6OxRJ1KylmUBB5oAhwWulCVNqddtqjlij1BwiR5OMNHiyFJAih7tgN90/\r\nkToNmjo1vr2RL1S7wYA75YbEBCMFxEenlVWqC/zzxAr9fsx7XrF0xTf45HqP\r\nrbGma30ZOliYMNdNJZvhALYxBQo51Xb8yw69hNxAADGuRgYr7EQ9ywBGbwmU\r\nErQ01VfNqRJWWv1noFJ2/sPq6fa+aPEKXN9YXeIEcTm3mpb4Y4JfOyERZxZi\r\na/nZfkkZSO0PxNkNf0qX2zMWu0Bb5SDgmb1IyCYrSg7aTmXffea+/p0BHfgU\r\nv7eW+fsHq2lLgLnLv7BzkUzvfVeaGeFfsb21rVWkeZbJHRLWF30FPY6iwsJz\r\nGeJYYk3KAV/53N4oiq7EgkLJNzYV0HClf5EC+NgR9jZyYlBW8F2SjZRi/mUz\r\nfMmBdXwE1WO5yJyRW0GKzUzRnFlvxdVXz2GpCayKg3stc+MLRhvScNLgPz6/\r\n/4uorDPzD8mgj2pf+ZsJfNFGd3aGEmAYXspYFNYrf0ZuVwfbldXny3pt0CV5\r\nKrfx1/v+/9DKZiDRJaMPCxm7rIu+E4WQxSA8Ih/ZWgigo/Da0EJDMKROy2l6\r\nBea1uCv1MJtm5bwj2JYKD7gpDcOpmxuALsM=\r\n=uoPf\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","engines":{"node":">=14"},"gitHead":"4655d6944cc5c2f80abc10112c0c3b02c9054150","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.15.0+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.15.0","dependencies":{"tslib":"^2.3.1","node-fetch":"^2.6.0","@types/node":"^16.11.55","@clerk/types":"^3.4.1","query-string":"^7.0.1","snakecase-keys":"^5.1.2","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.4.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","typescript":"^4.6.4","@types/jest":"^27.4.0"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.4.0_1662537710283_0.9804219389121664","host":"s3://npm-registry-packages"}},"2.4.1-staging.0":{"name":"@clerk/backend-core","version":"2.4.1-staging.0","license":"MIT","_id":"@clerk/backend-core@2.4.1-staging.0","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"e618b8b6789233e5d10c391f3a7c930a209b82ce","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.4.1-staging.0.tgz","fileCount":426,"integrity":"sha512-/JP6oX7OmNHUF2kQTXgSgmEjarXURqEjo2ihy4XlriunL2PUn6fuUP/643QG/DHnnZNpyhzWSePidb8+sdYRSQ==","signatures":[{"sig":"MEUCIQDbinE+qXkNPfzHkhfJ0DHqvnGy2jCSB4AOnsy6xo7qEAIgfBY88hd/8eEVS5wu+NVB5K0uvSoDNcahpc1/jlRcxhU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":626230,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjGKZEACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqblw//fbZoVqXOE/1QTi3wc7FyKkrXEXbLjaUH5NvKS+eO/xwEMboy\r\nDsZkLdNddMapNyfEKImf3ciZZFTfO9KQP7HdAvkLcvPo7KrkxE6JFuOLhBaA\r\nrIzixG0Vsbr7jCubMNhMEI6ekSPrToKx66ELTN99VrmQVrmCSsnm0G/wVwmo\r\nx8z+NM6c0SHBqTm40NXp/8T5E24kZ/CLbXVFzw2fMaHP+GsmvyMqY8G10W7P\r\noDkHm1p+uvu0QToNKV3WYZ88Dg9bJNHW8bvXR6fwnqcg8zMqPfxJVXy8pAaZ\r\nuxGP9fOfZsNk95PUpJgMHXNQuqCFBevyEqkhMDojz3FUL6J3NinthPS+HPEP\r\ng/s1hXlmsYtJvCafcY8YF3NZ7+AUxmZuUJsBmQQjRhCFYotewqFiusvmlCyf\r\nXodN97kyOpijg4+VhDy0bbVNBc4E2TU7VPAGvzxaU9fywh1eUfy7d50Pz3I7\r\njGQ11R8p1yCGEq4pWuBaYjpNYgY2wOYC/jluJr/oQ0VWeB27hgghJILTpd9Z\r\nD6jvrAflt0rIjbvHV1RTUKfIKlcelfhJGXn2TTBVz7N692/gnDD2I2MfeS2C\r\n4zWrXqfO8xCRp/gZiu9jaDHwcXsQySNMLW4n9fE2m/HXAIs0dGlrEgZM/H7S\r\n9hMF8h+bElrWFTqLFLcNeCdKk5PqiwxD+DM=\r\n=ezcl\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev?utm_source=github&utm_medium=clerk_backend_core\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <img src=\"https://images.clerk.dev/static/clerk.svg\" alt=\"Clerk logo\" height=\"50\">\n  </a>\n  <br />\n</p>\n\n# @clerk/backend-code\n\n<div align=\"center\">\n\n[![Chat on Discord](https://img.shields.io/discord/856971667393609759.svg?logo=discord)](https://discord.com/invite/b5rXHjAg7A)\n[![Clerk documentation](https://img.shields.io/badge/documentation-clerk-green.svg)](https://clerk.dev/docs?utm_source=github&utm_medium=clerk_backend_core)\n[![Follow on Twitter](https://img.shields.io/twitter/follow/ClerkDev?style=social)](https://twitter.com/intent/follow?screen_name=ClerkDev)\n\n[Changelog](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/CHANGELOG.md)\n·\n[Report a Bug](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=bug&template=bug_report.md&title=Bug%3A+)\n·\n[Request a Feature](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=Feature%3A+)\n·\n[Ask a Question](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n\n</div>\n\n---\n\n## Overview\n\nThis package provides Clerk Backend API core resources and low-level authentication utilities for JavaScript environments. It is mostly used as the base for other Clerk SDKs.\n\n## Getting Started\n\n### Installation\n\n```sh\nnpm install @clerk/backend-core\n```\n\n### Build\n\nTo build the package locally with the TypeScript compiler, run:\n\n```sh\nnpm run build\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities, without being platform/environment, specific such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendApi](./src/api/ClerkBackendApi.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendApi` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n## Usage\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendApi](./src/api/ClerkBackendApi.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://reference.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendApi.ts#17) implementation.\n\n## Support\n\nYou can get in touch with us in any of the following ways:\n\n- Join our official community [Discord server](https://discord.com/invite/b5rXHjAg7A)\n- Open a [GitHub support issue](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n- Contact options listed on [our Support page](https://clerk.dev/support?utm_source=github&utm_medium=clerk_backend_core)\n\n## Contributing\n\nWe're open to all community contributions! If you'd like to contribute in any way, please read [our contribution guidelines](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/CONTRIBUTING.md).\n\n## Security\n\n`@clerk/backend-core` follows good practices of security, but 100% security cannot be assured.\n\n`@clerk/backend-core` is provided **\"as is\"** without any **warranty**. Use at your own risk.\n\n_For more information and to report security issues, please refer to our [security documentation](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/SECURITY.md)._\n\n## License\n\nThis project is licensed under the **MIT license**.\n\nSee [LICENSE](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/LICENSE) for more information.\n","engines":{"node":">=14"},"gitHead":"ad42a2fc1660a7f1c5eede596daf40de390534f8","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.15.0+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.15.0","dependencies":{"tslib":"^2.3.1","node-fetch":"^2.6.0","@types/node":"^16.11.55","@clerk/types":"^3.4.2-staging.0","query-string":"^7.0.1","snakecase-keys":"^5.1.2","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.4.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","typescript":"^4.6.4","@types/jest":"^27.4.0"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.4.1-staging.0_1662559812173_0.6693510023894158","host":"s3://npm-registry-packages"}},"2.4.1":{"name":"@clerk/backend-core","version":"2.4.1","license":"MIT","_id":"@clerk/backend-core@2.4.1","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"56fd9ca958bc954c5a2b955c607a6a7b5f2c87ee","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.4.1.tgz","fileCount":426,"integrity":"sha512-DN70gcNQk0ROxTYzAfwAH1Li2bg2t9vuVgSvE9TKFemp8Lwq4CfZwOz+D9Ikp18NDjLqEp9KbFAiIjzU8IxqcA==","signatures":[{"sig":"MEUCIQDCjWmKnANmWjlrKIM9PsVo4XoC3cYMWdAWv0EX3/URYAIgG8EMUC85Eddj8WRu8ibVB75xXzOLsTdHlJN5rZerF+8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":626409,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjGMviACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp65A/5AVD+BDHsM4nGWJtzFqi2wFC5LakQTzvb/8JtiG7Fj/tbk7OF\r\nJeKuBnxMH2BqW8bjfPRIR6wp81yWa5cOqtfbjGWVjLS9AeTG9GLrs+wk2H80\r\n1wRG+wqtEsJkHRMIZp1ZxeviGcaUco8h3hikWyWwWgT4P2zOguk/jkNWueue\r\n6220K4B7TFAuysYWQrnguiY2GYNBHuBlFzpIyjrJOKFti6zwSwVcJoEC8XCE\r\no/eTMyiaJmGvuM02DUbGPgi5sTC7mAgDRriWBgFv+gSSJ+cS3N7TpSqX7gsJ\r\n6u4wdTjV8QPU6/bBtgsgdp9WCKldQXdLmo1CGZLEvf4DxIl6Fe7GmsFN761k\r\ngZIchSqLdmpG/oEjUAvLgxBvrGWLpCW1pAusG/mFiNV5ouZoCYl1pLXitrXy\r\n9IaXAi/TUX/lGWc6rV8NFoU+cWooTZh5ozHdU9R+H0+xaK0XXhbNq58HefhO\r\nvTTgIt1IIGQaiW+2Jp96eC/QNGhEMP7OWKjxcaFwV4WY8uzrgg/tnD0D9fmM\r\nGF/U5qYF/2LAMLpkOYfu6clsrTzEjIW/NkkBlSh0fvQbrCW5mRUbv38A36+J\r\nRBownIifXOuTNspPCjXq+nP8hpUMiWicjjBoqv09Xmgzk0UrwoyKLDKySO+6\r\nWk4zOOYZ9hVHAkv9N9haGsIzeqUvFL4Wo8A=\r\n=R1hI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","engines":{"node":">=14"},"gitHead":"6eb74db23eaa2ed782877744fae9e6c4dbfe7c96","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.15.0+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.15.0","dependencies":{"tslib":"^2.3.1","node-fetch":"^2.6.0","@types/node":"^16.11.55","@clerk/types":"^3.4.2","query-string":"^7.0.1","snakecase-keys":"^5.1.2","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.4.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","typescript":"^4.6.4","@types/jest":"^27.4.0"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.4.1_1662569442258_0.5458580118083509","host":"s3://npm-registry-packages"}},"2.4.2-staging.1":{"name":"@clerk/backend-core","version":"2.4.2-staging.1","license":"MIT","_id":"@clerk/backend-core@2.4.2-staging.1","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"1a703b5c094e43d80219d5651fe7af40ec9caab2","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.4.2-staging.1.tgz","fileCount":426,"integrity":"sha512-YYkJ3U4Uji8ZI4A1PPQZ24cgaphAtrxqlPnYOc5lOxDq8VXgkQDldUtFhtB7P00z+6j3UJAg4eAzMcCH81m4rw==","signatures":[{"sig":"MEYCIQCwH5aW1zCkO+ZZry686qWmGa44SWBrS86Pxl40HwmZAAIhAO9T6XcLgIPsb7jOZHWz6AYm3hWrT/Bh74mhyRvtqY9g","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":626429,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjHwUHACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr8Qg//TGHrDXsscinKL7RiXdorcRq49l9r3T6AzeIyJ18EHghK2c1y\r\n3kL5T2YEU9J567K+kauSUdIo722Rjq4DCfGN4wCq8fB48NWnZTv3phhye+ou\r\n/1ZzxWE5MMYAKrzb7IYT7AQZuRTm3LMhEK2U4DS1seM5fB6WvIrpEMGK5r9I\r\nA5W1qBuUN6hdeMbZ2pdibtsT7JVeOC7fUqkq2a3V4ySKo65rUdcyJkVoVui9\r\nw6WUNlTmj2jGI7H08IV0JtG7Tdyl6z/R4lVIe1/AjSWpQ8CqZ1di8uVAS6k3\r\nMrl9IyRvMLf+TDzzci6vtcl9Pgg6ZhSHsRIoLc90/vWV1UpztQ/PaeHBfJq0\r\n+54LAVCgdVEwzgcP4kmptOSr9bKznVCLbrBa9Ljj/u5Fy8OFot37sUdMIbTv\r\ncbz/Ng6fA6mu5SHJsby1zzuvLpQO/n8hPiG7Ki1mnW4vHwGqtIlbhABuIkT5\r\ne5Q6aHVWWi+vsgTO7BsXt87WuP/36puqtRCz2b9rKLQTuAL7A7giVzAFrByp\r\nJ9BG5Zxf0DHL9FWdqp7icc/n0iX6UNAeEpFAkYzxhaZ/HnDfgoP9i1CSFBQG\r\npI3Zfjw9xmnBWT8egSONIUsX9oy+FipaYvDAXQalG9floNJd3+0mv/LSSgWL\r\nU2MsqW53LGJRS3IazvexNCiZ0hOYZQmQfCs=\r\n=UE1l\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev?utm_source=github&utm_medium=clerk_backend_core\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <img src=\"https://images.clerk.dev/static/clerk.svg\" alt=\"Clerk logo\" height=\"50\">\n  </a>\n  <br />\n</p>\n\n# @clerk/backend-code\n\n<div align=\"center\">\n\n[![Chat on Discord](https://img.shields.io/discord/856971667393609759.svg?logo=discord)](https://discord.com/invite/b5rXHjAg7A)\n[![Clerk documentation](https://img.shields.io/badge/documentation-clerk-green.svg)](https://clerk.dev/docs?utm_source=github&utm_medium=clerk_backend_core)\n[![Follow on Twitter](https://img.shields.io/twitter/follow/ClerkDev?style=social)](https://twitter.com/intent/follow?screen_name=ClerkDev)\n\n[Changelog](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/CHANGELOG.md)\n·\n[Report a Bug](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=bug&template=bug_report.md&title=Bug%3A+)\n·\n[Request a Feature](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=Feature%3A+)\n·\n[Ask a Question](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n\n</div>\n\n---\n\n## Overview\n\nThis package provides Clerk Backend API core resources and low-level authentication utilities for JavaScript environments. It is mostly used as the base for other Clerk SDKs.\n\n## Getting Started\n\n### Installation\n\n```sh\nnpm install @clerk/backend-core\n```\n\n### Build\n\nTo build the package locally with the TypeScript compiler, run:\n\n```sh\nnpm run build\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities, without being platform/environment, specific such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendApi](./src/api/ClerkBackendApi.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendApi` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n## Usage\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendApi](./src/api/ClerkBackendApi.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://reference.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendApi.ts#17) implementation.\n\n## Support\n\nYou can get in touch with us in any of the following ways:\n\n- Join our official community [Discord server](https://discord.com/invite/b5rXHjAg7A)\n- Open a [GitHub support issue](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n- Contact options listed on [our Support page](https://clerk.dev/support?utm_source=github&utm_medium=clerk_backend_core)\n\n## Contributing\n\nWe're open to all community contributions! If you'd like to contribute in any way, please read [our contribution guidelines](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/CONTRIBUTING.md).\n\n## Security\n\n`@clerk/backend-core` follows good practices of security, but 100% security cannot be assured.\n\n`@clerk/backend-core` is provided **\"as is\"** without any **warranty**. Use at your own risk.\n\n_For more information and to report security issues, please refer to our [security documentation](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/SECURITY.md)._\n\n## License\n\nThis project is licensed under the **MIT license**.\n\nSee [LICENSE](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/LICENSE) for more information.\n","engines":{"node":">=14"},"gitHead":"45fe76f61a27cd4e8dd4dae0bda72ddaa5196d88","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"giannis-clerk","email":"giannis@clerk.dev"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.15.0+x64 (linux)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.15.0","dependencies":{"tslib":"^2.3.1","node-fetch":"^2.6.0","@types/node":"^16.11.55","@clerk/types":"^3.5.0-staging.1","query-string":"^7.0.1","snakecase-keys":"^5.1.2","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.4.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","typescript":"^4.6.4","@types/jest":"^27.4.0"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.4.2-staging.1_1662977286984_0.7431410548813144","host":"s3://npm-registry-packages"}},"2.4.2-staging.2":{"name":"@clerk/backend-core","version":"2.4.2-staging.2","license":"MIT","_id":"@clerk/backend-core@2.4.2-staging.2","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"959cab7bb6a19392f6c61962fa7439dbd81c36af","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.4.2-staging.2.tgz","fileCount":426,"integrity":"sha512-wjreF7hhqMp67yomjVdqwiJp/vmAdGczdezcP9G+GoB/X8NCQipTF6Z5NrdIUpnOAUJ/5lQZUCaDeF1RAJTHqg==","signatures":[{"sig":"MEQCIHphbs41lwnMVpmrq4p7/OjzfRuU81gl9cYzRQOd/MMYAiBXM96nyJU4dstEUeOen82uq/JbY24rj2Zy77QAdyIaJQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":626429,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjH01/ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqxWQ//YKHNFu0B1XCGaPs4eMfmusE/0kpQp2ymscIUV95Y3BdaGBNw\r\ni1cvMQ4zX6TCwRxsGO7IPd433aY/ipjwiOW0TyUyJy/YxjKCudNVBvXH4Amd\r\nOLkslkrSb8EIKPcFJ3rquJiHF4vHPSsTEJgvo9+mkd2K3+IribrwgvVCC2IG\r\n+PZfcRUfeFcNjTIqR1lb5PBRL78u4Df5xElgiqve9cFptV+TJmnw4gIWFa4X\r\nIj7zUOXZi4+D7xw+JwRj9cu3Ny7rsprLSMpslCrtNklVRhNl2z2mD5kHzD9C\r\npox/GnE/jTMSKfL+H2zhIzhYqMy3EhwweqQyvrPoGYsgYO+pNmGc2YFDDZN9\r\nAOFTQU0QLw7Ay2Glv7x7tBQZs0C4x81ds/iQIDt37KLZQerb6a3m6zgqNDiy\r\n3PB/Ut7b5QWirZdskncjg4y+vmai91s3g+8fsrxoofAxfg8KILZDtIfKRdLM\r\n7JRr/B/1cDOph8DplHXgspFQDuuJDA0rFghL8lqLM8yb3X/WNuogqousPno9\r\nQn6GAB3V0WZR8p7mD7bunBCx6aukuMMayU3oUfn0nL7zFPQlxTxv6R17Igbf\r\nx9ScmXjz+17xjUYQ4SSq7yPoz3RnqO5AtVo/7bEPUAdg/IDGQLuljAMBhqWB\r\nXgnlz4wdQQSySPBVCjPS0Ys91ITS7v3dq9Y=\r\n=kGcF\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev?utm_source=github&utm_medium=clerk_backend_core\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <img src=\"https://images.clerk.dev/static/clerk.svg\" alt=\"Clerk logo\" height=\"50\">\n  </a>\n  <br />\n</p>\n\n# @clerk/backend-code\n\n<div align=\"center\">\n\n[![Chat on Discord](https://img.shields.io/discord/856971667393609759.svg?logo=discord)](https://discord.com/invite/b5rXHjAg7A)\n[![Clerk documentation](https://img.shields.io/badge/documentation-clerk-green.svg)](https://clerk.dev/docs?utm_source=github&utm_medium=clerk_backend_core)\n[![Follow on Twitter](https://img.shields.io/twitter/follow/ClerkDev?style=social)](https://twitter.com/intent/follow?screen_name=ClerkDev)\n\n[Changelog](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/CHANGELOG.md)\n·\n[Report a Bug](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=bug&template=bug_report.md&title=Bug%3A+)\n·\n[Request a Feature](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=Feature%3A+)\n·\n[Ask a Question](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n\n</div>\n\n---\n\n## Overview\n\nThis package provides Clerk Backend API core resources and low-level authentication utilities for JavaScript environments. It is mostly used as the base for other Clerk SDKs.\n\n## Getting Started\n\n### Installation\n\n```sh\nnpm install @clerk/backend-core\n```\n\n### Build\n\nTo build the package locally with the TypeScript compiler, run:\n\n```sh\nnpm run build\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities, without being platform/environment, specific such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendApi](./src/api/ClerkBackendApi.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendApi` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n## Usage\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendApi](./src/api/ClerkBackendApi.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://reference.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendApi.ts#17) implementation.\n\n## Support\n\nYou can get in touch with us in any of the following ways:\n\n- Join our official community [Discord server](https://discord.com/invite/b5rXHjAg7A)\n- Open a [GitHub support issue](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n- Contact options listed on [our Support page](https://clerk.dev/support?utm_source=github&utm_medium=clerk_backend_core)\n\n## Contributing\n\nWe're open to all community contributions! If you'd like to contribute in any way, please read [our contribution guidelines](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/CONTRIBUTING.md).\n\n## Security\n\n`@clerk/backend-core` follows good practices of security, but 100% security cannot be assured.\n\n`@clerk/backend-core` is provided **\"as is\"** without any **warranty**. Use at your own risk.\n\n_For more information and to report security issues, please refer to our [security documentation](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/SECURITY.md)._\n\n## License\n\nThis project is licensed under the **MIT license**.\n\nSee [LICENSE](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/LICENSE) for more information.\n","engines":{"node":">=14"},"gitHead":"274d49d884c5bc7dde3e337f82ced1b9e46b2071","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"giannis-clerk","email":"giannis@clerk.dev"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.15.0+x64 (linux)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.15.0","dependencies":{"tslib":"^2.3.1","node-fetch":"^2.6.0","@types/node":"^16.11.55","@clerk/types":"^3.5.0-staging.2","query-string":"^7.0.1","snakecase-keys":"^5.1.2","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.4.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","typescript":"^4.6.4","@types/jest":"^27.4.0"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.4.2-staging.2_1662995838911_0.07196724973602109","host":"s3://npm-registry-packages"}},"2.4.2-staging.3":{"name":"@clerk/backend-core","version":"2.4.2-staging.3","license":"MIT","_id":"@clerk/backend-core@2.4.2-staging.3","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"6fb6411322d37ca93459d9a1a3f254076111ae2c","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.4.2-staging.3.tgz","fileCount":426,"integrity":"sha512-KDXYo4h09r7Ok+4ikX9p66p1ytKYje+4pNbUTm4JDloLcv2zjOEJcOCT1HOhR5RPTUonZJC1c0LiKlnU0yRHzg==","signatures":[{"sig":"MEUCIQDgT+be2HpUYRjEFuxSXGdlo9HCR5xkZdGDh+Oj4HGPxwIgEwqKTl5pSYFMxiOvr80kLFuHVkU0RkjuEi98Fd3hvLA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":626429,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjIfbzACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpZgg/+KJkbDe1liuTDzvGdxGg/y+enSDUgmA0QY/Np6jHmEKVk1/uz\r\nT5NWIvdhXTZjlKaJF5jgGyTkyloyrNaLg1o3O2Y9oVrLCr8hzT5gPt9QJm3v\r\n1jMwSZxA7adOLMFKE/lSiC0+f74z/SYxdig5rNcDyrsS46EQvBG9C2+Cig//\r\nBUVuqHenJnDMm9f4cwzy75WTStVBISg6hbQh17Q/xkrkPJdtkb0SjM/y6bpx\r\nsuObRruhLRm1r8ifu9GFmWAMROfELk2uTmZn1WvpVOUmO/UJbTI4/S6V7kAS\r\nNIWMlmCJbqpp6Cfqg1yohOaURI8ly0nXip6oKs98CIpZheEZu7BfXivtRuL0\r\nGCIKNWskIJWP4CFgJUwsKwZfOcqxF3wD3yEEXbAdm+OjZb8JD4pS0WVaP8ed\r\npgz02ypMIN9rC9FcvcgBlSrwRCCEx5aIum4ZRj/HS3/lVaVE8uN0LFMbCqYl\r\ndYpVEoNu0C1/Vk+1ydNrWXubf1OzczUgRxoTQWskGrpGVI1Enl1T5/BZiZqg\r\n5FnCMr25tDhLE2p3hn7MubRTLI/jgSQg/vklSRaFyzQErQMsaVOZ38klpaXf\r\njKPj+bnfFIORjHTiro0mP506mNWAj7yOWZ4GSxK+crY2GiIKlKvO74ka7Txs\r\n8h1yVs/zjyhKEYD6FIyG4CI9jrbAhefUOpg=\r\n=2DlK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev?utm_source=github&utm_medium=clerk_backend_core\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <img src=\"https://images.clerk.dev/static/clerk.svg\" alt=\"Clerk logo\" height=\"50\">\n  </a>\n  <br />\n</p>\n\n# @clerk/backend-code\n\n<div align=\"center\">\n\n[![Chat on Discord](https://img.shields.io/discord/856971667393609759.svg?logo=discord)](https://discord.com/invite/b5rXHjAg7A)\n[![Clerk documentation](https://img.shields.io/badge/documentation-clerk-green.svg)](https://clerk.dev/docs?utm_source=github&utm_medium=clerk_backend_core)\n[![Follow on Twitter](https://img.shields.io/twitter/follow/ClerkDev?style=social)](https://twitter.com/intent/follow?screen_name=ClerkDev)\n\n[Changelog](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/CHANGELOG.md)\n·\n[Report a Bug](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=bug&template=bug_report.md&title=Bug%3A+)\n·\n[Request a Feature](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=Feature%3A+)\n·\n[Ask a Question](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n\n</div>\n\n---\n\n## Overview\n\nThis package provides Clerk Backend API core resources and low-level authentication utilities for JavaScript environments. It is mostly used as the base for other Clerk SDKs.\n\n## Getting Started\n\n### Installation\n\n```sh\nnpm install @clerk/backend-core\n```\n\n### Build\n\nTo build the package locally with the TypeScript compiler, run:\n\n```sh\nnpm run build\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities, without being platform/environment, specific such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendApi](./src/api/ClerkBackendApi.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendApi` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n## Usage\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendApi](./src/api/ClerkBackendApi.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://reference.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendApi.ts#17) implementation.\n\n## Support\n\nYou can get in touch with us in any of the following ways:\n\n- Join our official community [Discord server](https://discord.com/invite/b5rXHjAg7A)\n- Open a [GitHub support issue](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n- Contact options listed on [our Support page](https://clerk.dev/support?utm_source=github&utm_medium=clerk_backend_core)\n\n## Contributing\n\nWe're open to all community contributions! If you'd like to contribute in any way, please read [our contribution guidelines](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/CONTRIBUTING.md).\n\n## Security\n\n`@clerk/backend-core` follows good practices of security, but 100% security cannot be assured.\n\n`@clerk/backend-core` is provided **\"as is\"** without any **warranty**. Use at your own risk.\n\n_For more information and to report security issues, please refer to our [security documentation](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/SECURITY.md)._\n\n## License\n\nThis project is licensed under the **MIT license**.\n\nSee [LICENSE](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/LICENSE) for more information.\n","engines":{"node":">=14"},"gitHead":"714a236aff6cbbf90a3ebb4c2084b6449cca13a6","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.15.0+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.15.0","dependencies":{"tslib":"^2.3.1","node-fetch":"^2.6.0","@types/node":"^16.11.55","@clerk/types":"^3.5.0-staging.3","query-string":"^7.0.1","snakecase-keys":"^5.1.2","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.4.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","typescript":"^4.6.4","@types/jest":"^27.4.0"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.4.2-staging.3_1663170290694_0.12408940820884595","host":"s3://npm-registry-packages"}},"2.4.2-staging.4":{"name":"@clerk/backend-core","version":"2.4.2-staging.4","license":"MIT","_id":"@clerk/backend-core@2.4.2-staging.4","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"985414603aff7bc9318050531ab90b3fa16707c3","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.4.2-staging.4.tgz","fileCount":426,"integrity":"sha512-+R7Ng7sGdhsIFJD7ZINIR8BcIh+CmFssVAah+v/RTRagQ43FZJUAZyr1xq4NoKFTCu+ub1H2FxNnEBtmYBdMgw==","signatures":[{"sig":"MEYCIQCWbFOgadjhN+Y6OPMVGdJlNhZVVWIQmSBmTSkz0hiBNwIhAJsWSOM2jRVhkMA5Q6qGtUacNnGAtVW9gvNlWEmvnogo","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":626429,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjIw73ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqI9Q/9FCPvGun0HYwbJiKEhtDIx47YXKRjY8qIQFEYCG/Y8ar3wn+F\r\nH17OxzpWJdpb/i1j+NIdPK55+YH9ebZytl6zDzKsoNWJTjz0fJ8ZO0W3sJ3b\r\nNtHAou35JD92QECRI85MSUWONPLl+tOKhaThNpTXWRWLCbg6MlKop4KFS1P0\r\nrmecruU2Y5k0RasxykRNq2WiXn/+29Ol3EuNXoYxMCgRo/GCHouN1GReeeC6\r\nFh58s9THkhJiKtXfYeUXZ5a5iiVAuFwAHCB7/ypx3udmrr0EZN0+M9/Sy6mC\r\nfd6N8XxTYmIGbkY1u2qkdoiQs77gjN9guhEzwdM3knNy77a8etserfXRiJJH\r\nSBsJlRNolUvRDpvf14Yc3rCdS4Wj/nsOrN17cwTb0zcVRUUiFJED/LqNNOac\r\n/9mCEzD0lFHtUPMp/LaTfNZ8dGi2Zjnk77uV3Sg4ppy6CAv30rrkxe0YyOMm\r\nVA54YLP1tRxhxTEoKwiTLNmQBND4gwBtDqWq0A/B34Zp+F77Ku3DS/XAxhYd\r\nx5XGDri/jzSNmqRB8YWXZgVUQTXudAxwD0Oq6utoMrkBmwKsVjTx1eKrN/M5\r\nogvFUpiZ4O0GbhyIbNPJK/cz13SIUW+ME/mN1pyUWhI0ylaeEydnxUNzlNIo\r\n7KRKJmakZt+w6DqsMnhNzVu/xsRukJEbXPQ=\r\n=s947\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev?utm_source=github&utm_medium=clerk_backend_core\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <img src=\"https://images.clerk.dev/static/clerk.svg\" alt=\"Clerk logo\" height=\"50\">\n  </a>\n  <br />\n</p>\n\n# @clerk/backend-code\n\n<div align=\"center\">\n\n[![Chat on Discord](https://img.shields.io/discord/856971667393609759.svg?logo=discord)](https://discord.com/invite/b5rXHjAg7A)\n[![Clerk documentation](https://img.shields.io/badge/documentation-clerk-green.svg)](https://clerk.dev/docs?utm_source=github&utm_medium=clerk_backend_core)\n[![Follow on Twitter](https://img.shields.io/twitter/follow/ClerkDev?style=social)](https://twitter.com/intent/follow?screen_name=ClerkDev)\n\n[Changelog](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/CHANGELOG.md)\n·\n[Report a Bug](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=bug&template=bug_report.md&title=Bug%3A+)\n·\n[Request a Feature](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=Feature%3A+)\n·\n[Ask a Question](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n\n</div>\n\n---\n\n## Overview\n\nThis package provides Clerk Backend API core resources and low-level authentication utilities for JavaScript environments. It is mostly used as the base for other Clerk SDKs.\n\n## Getting Started\n\n### Installation\n\n```sh\nnpm install @clerk/backend-core\n```\n\n### Build\n\nTo build the package locally with the TypeScript compiler, run:\n\n```sh\nnpm run build\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities, without being platform/environment, specific such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendApi](./src/api/ClerkBackendApi.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendApi` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n## Usage\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendApi](./src/api/ClerkBackendApi.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://reference.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendApi.ts#17) implementation.\n\n## Support\n\nYou can get in touch with us in any of the following ways:\n\n- Join our official community [Discord server](https://discord.com/invite/b5rXHjAg7A)\n- Open a [GitHub support issue](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n- Contact options listed on [our Support page](https://clerk.dev/support?utm_source=github&utm_medium=clerk_backend_core)\n\n## Contributing\n\nWe're open to all community contributions! If you'd like to contribute in any way, please read [our contribution guidelines](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/CONTRIBUTING.md).\n\n## Security\n\n`@clerk/backend-core` follows good practices of security, but 100% security cannot be assured.\n\n`@clerk/backend-core` is provided **\"as is\"** without any **warranty**. Use at your own risk.\n\n_For more information and to report security issues, please refer to our [security documentation](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/SECURITY.md)._\n\n## License\n\nThis project is licensed under the **MIT license**.\n\nSee [LICENSE](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/LICENSE) for more information.\n","engines":{"node":">=14"},"gitHead":"46a7fba0a26b045da091205c34c3aaf54a60ac8d","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.15.0+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.15.0","dependencies":{"tslib":"^2.3.1","node-fetch":"^2.6.0","@types/node":"^16.11.55","@clerk/types":"^3.5.0-staging.4","query-string":"^7.0.1","snakecase-keys":"^5.1.2","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.4.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","typescript":"^4.6.4","@types/jest":"^27.4.0"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.4.2-staging.4_1663241975274_0.5096140245353429","host":"s3://npm-registry-packages"}},"2.4.2":{"name":"@clerk/backend-core","version":"2.4.2","license":"MIT","_id":"@clerk/backend-core@2.4.2","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"b3f2ffbc0834baef28eba6b4b5dc5bf56d65e1e9","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.4.2.tgz","fileCount":426,"integrity":"sha512-NxtCB4o0GLYr2nB5EliaK7fWlpKuGyiwvWccdhYibJTFuKTEx4AN8dJ03a7wm/v7ciOhzPD9mCvg+AI5tRrIqA==","signatures":[{"sig":"MEUCIQChAZ9zp69FdrZO6tj61NEvFAFscFEJiLryAWjYx7ku4AIgGHiPRW0683jJAlJQtzsh21J4K3Nma1LDsR3QAn88zk0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":626608,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjJIFZACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp9BxAAnRtK81xkMIpctUtKUJINk+rcLf+Cv6yg2YOJLV8Fhika6BEj\r\nJIA5rZ0FTo4+jiHqNtuf+6Ok8Ufr1AxPM47JGiG6dj1LgLWfL3mG/OakeZuI\r\nlHrg4xxmysj96CHum1EMYUFK/N/Elj4keBPRX3qm/Rp/ELuQNmFUspULs+X2\r\nGEOwUQ4VYN+XcZdioumcM8weAkM6mPzAjPrdXDPek95SKHTpNkoOhab6NGt1\r\nRBPIJG6SQ+iUvUSvSjTr2fRyb/qCpCJS7D+jbRWPY33KyZx/3hOdr5z/rhue\r\nLb4TJHKPoFVVjBJQhpDp1eZKCg7FR96LGI1qFDEWthx3j4g+ei08mNn1dyf2\r\n95L8ZIe/Ma1OYaQgxIM7hwElUxfWAWn3FXOqN+69oirrICwRbF9iStvt1RQH\r\n01J/WKS2deHg6gBxfg2ZUMsvrD8ve2cnifu+s22mNqx86PbZlVEwwE8Y37AE\r\nbuAkkxFBWkY9pijf8yygzKgC4ooGQWN3jhVy/GLP4iYARzZusUJfqXhvyiGY\r\nFj8rWrQxQecqXasqkNgoIvhYc1yWIpyvg+7m0O3+iw1NGx9ig56SwfXGdeD3\r\nCZ4G2igxr8MjaM8VIBpEEKTJypJnqwrAZqopVQyVJmMQhEg0r5VdRLcK/lMP\r\nFCvfVUyuugI/I5gIdamHHtbjKNNLN0Cxhws=\r\n=s2Vh\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","engines":{"node":">=14"},"gitHead":"f1f0d933ddbc74eed0f687b944d20539d814477b","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"sokratis","email":"sokratis.vidros@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.13.0+x64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.13.0","dependencies":{"tslib":"^2.3.1","node-fetch":"^2.6.0","@types/node":"^16.11.55","@clerk/types":"^3.5.0","query-string":"^7.0.1","snakecase-keys":"^5.1.2","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.4.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","typescript":"^4.6.4","@types/jest":"^27.4.0"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.4.2_1663336793062_0.7582980207451819","host":"s3://npm-registry-packages"}},"2.4.3":{"name":"@clerk/backend-core","version":"2.4.3","license":"MIT","_id":"@clerk/backend-core@2.4.3","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"cee9f5b07b1073de331077c9409a8709767fe8c3","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.4.3.tgz","fileCount":426,"integrity":"sha512-cdVThpux7n2H6z1cocY7ae895FUkH1DS4NZLq9X7i2+D1MVBEjnmaSIpdwyzFDeTrtJIDNl2qMFO5LcrDhzaTA==","signatures":[{"sig":"MEUCIQC4D1yxgngkBIQU3U6BZhO7/lgfdByI/c2Mqq6r3EYXGAIgNQBGpTgVnNXS4i/T3ue+XQdx0tbcOpaB0ArtT15nM9U=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":626807,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjKPXNACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoASA/6AhYY7/X8lCtoAyNA6YKR3lh6pXW+5eZ1CA2eIZ4TBoJ8LI/U\r\niHSY0hyb7sJ+HmdUp0z4O0OvKXs4E5RshyTKjkhN5RxpPdELfKYuWoEuXYSE\r\n10InBt9+x4gdhCBVd8ZZnYMYo7T3c/cV8+NjWNAbF13u6DYubiVCMkDgNekr\r\n7RyFiaBLs5f7imsLo/5TzUxN9G2gP0VH64r/rR91DlRcdr09v7rTc6aiqJsG\r\nWiwbecgIs+crGeTyQw0laLm9MKlrtrMqvZuSJc0bqmjuOlM1UCu3NLtYyWL+\r\nXIksyfgs02RHQ1gkQ+chUspECicu3QZVSEQmLij8RzeOURj+34O1gFjbRHAz\r\n9intuaoWrhZp2ZziUVDRQDPxLOqfvlri3lYw8C1iHyztfyhYgjSNizo3uxtU\r\nV/3xtuE2BL490l0s0ul+x7rbpWneZHQtaBnroT/Mx/7CQBJ+snQMmd87PPio\r\nVKpltu0Hl81vqLESIfzZUN+70whpE6AUxswnFeTUgBrADp+1zhgN/dPLaoVw\r\nXRui4KE3ZmXQe5VQY/KtICci/UJKslKorEmyXMOrmrYzip2QgyH9oFbGG74q\r\nhgQ0q6Ut9nqu62Ih/EfPcN7DhZXkA3GoMJPXXgZNQ5CSYxkkrou0ww7p+J9v\r\npEbn/3sTDpdH+I6fQXfnfTt705Ecu/6MPmE=\r\n=sCOC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","engines":{"node":">=14"},"gitHead":"00a54ed6b807e1d48b56753a8ec1bba228ea5dce","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.15.0+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.15.0","dependencies":{"tslib":"^2.3.1","node-fetch":"^2.6.0","@types/node":"^16.11.55","@clerk/types":"^3.5.1","query-string":"^7.0.1","snakecase-keys":"^5.1.2","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.4.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","typescript":"^4.6.4","@types/jest":"^27.4.0"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.4.3_1663628748861_0.6312248657470807","host":"s3://npm-registry-packages"}},"2.4.4-staging.0":{"name":"@clerk/backend-core","version":"2.4.4-staging.0","license":"MIT","_id":"@clerk/backend-core@2.4.4-staging.0","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"7418b3b227ea8d12ad8c59968c90ea0e2be9a2ca","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.4.4-staging.0.tgz","fileCount":426,"integrity":"sha512-QSJGGM9aseViP407YzBhaibUKCzs/KhtBgtpbXBPFOFALh0H3TdmHc+vTh5H2YA3nwgezl6rpAN/+9HT5VMRyw==","signatures":[{"sig":"MEQCIAP16ZOu7ImdUyiES0bU3DFjRWtfQFoUWMIbT5n9kxM+AiBvk8OVIUdurJDxeDwL3WU3vbv3kkpluppaXbSob6q0DQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":626827,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjKs7kACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpRzg//YyZt1hI0pdiEbp9ZVBFdrptvB5iCtbGbzIS8/vY7WzRmYJNN\r\nOv6W+QI2dIC7366lqT+Lwtllj75/QvsTogM905vwi3qoDFXutZwwfeZbWr1y\r\nVOE6ljv8CvCQxGnmFX5IFVMAl4qltksuLCj9acy61iLiR2HYzdAqgdwagmMU\r\nIuMIF6t++N9XeO+KQudCBU8trl3et7SeREfVWXZzDS9WOMVOKE19PbcSZtG9\r\nC85aORi9pj9PuTeBRy0hzzJZeTZKVcpBSkX0tJFNtd3ghSefKeEo7JjgJR8l\r\nrgZENWM6zpSLpeBBwZA2J5/AOMDiM43PvKifM7FNcKqRmdTTGobjV4uC5IDa\r\nfz2PgTdnf32grFNumyge8wYQNf9RKXYtfEKEWVk5TpecKJXisnSia7GMGZHj\r\nGnH1s3ZTtsAoQfjzgJJl5kU2ECa4WDyBdXQD9lt4SvrrsGD9i+j1BGxwelCl\r\n4IkRk73M4HZdzIkwVqMSM28ZWtn8J2KH76DmAKpzyRgi6Cq07HJNJTap/zVI\r\notwt3V+4bMYYBZTC9uF1yxeptAmiVcOSaop6tO8tDMNx3queh3PI5yeOGJOV\r\nVHxAcl+8cljod7c+78ot+CL9h1KnfSLFsjyJor33EEG2zN/hQLX1SIny92ls\r\n8AGIbP8ea9XqPaKXIEfPFamDBzvgMHIak7Y=\r\n=o3Jk\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev?utm_source=github&utm_medium=clerk_backend_core\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <img src=\"https://images.clerk.dev/static/clerk.svg\" alt=\"Clerk logo\" height=\"50\">\n  </a>\n  <br />\n</p>\n\n# @clerk/backend-code\n\n<div align=\"center\">\n\n[![Chat on Discord](https://img.shields.io/discord/856971667393609759.svg?logo=discord)](https://discord.com/invite/b5rXHjAg7A)\n[![Clerk documentation](https://img.shields.io/badge/documentation-clerk-green.svg)](https://clerk.dev/docs?utm_source=github&utm_medium=clerk_backend_core)\n[![Follow on Twitter](https://img.shields.io/twitter/follow/ClerkDev?style=social)](https://twitter.com/intent/follow?screen_name=ClerkDev)\n\n[Changelog](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/CHANGELOG.md)\n·\n[Report a Bug](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=bug&template=bug_report.md&title=Bug%3A+)\n·\n[Request a Feature](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=Feature%3A+)\n·\n[Ask a Question](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n\n</div>\n\n---\n\n## Overview\n\nThis package provides Clerk Backend API core resources and low-level authentication utilities for JavaScript environments. It is mostly used as the base for other Clerk SDKs.\n\n## Getting Started\n\n### Installation\n\n```sh\nnpm install @clerk/backend-core\n```\n\n### Build\n\nTo build the package locally with the TypeScript compiler, run:\n\n```sh\nnpm run build\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities, without being platform/environment, specific such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendApi](./src/api/ClerkBackendApi.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendApi` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n## Usage\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendApi](./src/api/ClerkBackendApi.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://reference.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendApi.ts#17) implementation.\n\n## Support\n\nYou can get in touch with us in any of the following ways:\n\n- Join our official community [Discord server](https://discord.com/invite/b5rXHjAg7A)\n- Open a [GitHub support issue](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n- Contact options listed on [our Support page](https://clerk.dev/support?utm_source=github&utm_medium=clerk_backend_core)\n\n## Contributing\n\nWe're open to all community contributions! If you'd like to contribute in any way, please read [our contribution guidelines](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/CONTRIBUTING.md).\n\n## Security\n\n`@clerk/backend-core` follows good practices of security, but 100% security cannot be assured.\n\n`@clerk/backend-core` is provided **\"as is\"** without any **warranty**. Use at your own risk.\n\n_For more information and to report security issues, please refer to our [security documentation](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/SECURITY.md)._\n\n## License\n\nThis project is licensed under the **MIT license**.\n\nSee [LICENSE](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/LICENSE) for more information.\n","engines":{"node":">=14"},"gitHead":"ceead793195c99d9bd01073afb54118f7a33dff6","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.15.0+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.15.0","dependencies":{"tslib":"^2.3.1","node-fetch":"^2.6.0","@types/node":"^16.11.55","@clerk/types":"^3.6.0-staging.0","query-string":"^7.0.1","snakecase-keys":"^5.1.2","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.4.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","typescript":"^4.6.4","@types/jest":"^27.4.0"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.4.4-staging.0_1663749860588_0.9753908495428558","host":"s3://npm-registry-packages"}},"2.4.4":{"name":"@clerk/backend-core","version":"2.4.4","license":"MIT","_id":"@clerk/backend-core@2.4.4","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"2ba2722df6fe6bbb9aa5949d18f3efb24a20d35b","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.4.4.tgz","fileCount":426,"integrity":"sha512-XEzH4/nRv5HvMrooLaoFTWVi1lhnk+iuVall/J76Sy59wK0SmxJcVnom3kHuZWiVC1mhgWUcQVA9SL/fszZSVg==","signatures":[{"sig":"MEQCIEf66t9D5P3SuUlHRQ1mY1W1ZA/NP/jHTUMAXdIcFu3aAiBX82okaEmF0+lJwJF0ZdHI0AsqTywtUkTc1gCdL5oWFg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":627006,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjLE94ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoCHw//Tccm5Fhf8UgGwD3vSjwuqyd84RSoPeikDE2cyjTc/cQeBlz4\r\nPJKNUb6FEJelFFdbQR3c3137KWNuWf4aXheKjy0biFOVfaBMYaxPtehud6lE\r\ne6qcNIUaKUbCLfUyiSOFrmUe2NXkyE24JO//SxLPBqpCvD59j6y/5el56smC\r\nfurBhL0uipBU0ot51uJi3BuMacxc0+XOKVLWXSx4RgOG4vGo3DEj9q7V3tqi\r\nQBJuAo6bK7x4kY+Kfjah57q5wjP10lCCzVmiYhcnaRvd3GOAGpeEjhseY9L1\r\netxYVVhDGMx7+xdmCAzvRjlWG5K31OLiHYyvYLJ3THlF2JkIgayApKfmu2NS\r\nUZnzoXrMqazmFGpse7Qk+TOear9SlQlf79Ty4BhH3TaU0aRwnoecocc7IA6p\r\n+LgWavtVv8kyIGhCoKqKN5IzlFZuQjv1sG4L5TVXSIFFFb/T2aRY3aO9aXM0\r\n6PpWsNXnaxnDppkXgFaIj1T+xJxWCMWkoFy4pdzepo8tB1tEKBmJ4GGdYDrx\r\nA/FTtOar0B9Yw4vss/LFYvTlJvL2otC/8pkuGNJyHkZ3PG8OQZCvnt018Ae0\r\nUNfAo73wuuECPGp6K+LpLwlNMXSdCAdwjZ5xX2mEg3LUhWz3TXl270XTyg2z\r\nKBNHILkGEDhoNG/2z03w6DXN6gQbZI2Upoc=\r\n=fCwX\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","engines":{"node":">=14"},"gitHead":"47ad843a6822c1eda6bcf2e6778a3a02526e7bae","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.15.0+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.15.0","dependencies":{"tslib":"^2.3.1","node-fetch":"^2.6.0","@types/node":"^16.11.55","@clerk/types":"^3.6.0","query-string":"^7.0.1","snakecase-keys":"^5.1.2","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.4.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","typescript":"^4.6.4","@types/jest":"^27.4.0"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.4.4_1663848311859_0.5479032272566744","host":"s3://npm-registry-packages"}},"2.5.0-staging.0":{"name":"@clerk/backend-core","version":"2.5.0-staging.0","license":"MIT","_id":"@clerk/backend-core@2.5.0-staging.0","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"839b7bb1336cacc41f596a059083a19f127744e5","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.5.0-staging.0.tgz","fileCount":426,"integrity":"sha512-xIInYkW0Rm376lVvR8zV7c49bsacZvfyhySh4PudTS9jXAgJ6UWlZ0piQMfu/VAC9TNiEhrxsAzZSp6BLLqH+w==","signatures":[{"sig":"MEUCIGNfE4dPLtALVOYI+1HpXipym25JXnQOQiDoqAHtM0H9AiEAvtU2lwVdaTnBd00KP8SSEkjNha6MjZoIWtO5L2KciPk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":626500,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjL0ylACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqFWg//b4YdoF9StNzyoHnFlfip/rpdLjwz8xz0tdXDEWc1SdYs5/EP\r\nkWx6huE8MHthtJmWRPVyIdk+c7rhIc0DnB5jIkE3YQlwXCPPICUVu46UlIj9\r\nmLLEkIQDtaqnv3ibnV0qr7zCC6l2C4eJeM09mSp5bsJw94xyeFD2+iTHdjGQ\r\nOHOSr9FxwVCI2lG8Y6MGUZJaAHyL/X8FfAY8ka0bSOPHeLBeDjDU0QKPAyvr\r\nzccxlJ9FdcCUC3KMOxyb+VA3J8dAY07ZODJmpBM9qraEFXz7NoMTucWezJu5\r\nPdhaVqhSijbjpeuV3HEdLkcVIin8l6SfXFRgtxaFVQpn4Tqqnt+ecJaEsnOD\r\nPuQ4rq/J4ZcPhib5mRcmhuEiIPy7v7zan4DCT48079z++dOVDLSfVG+zvyH7\r\nxYHz7kYS8ueK8+AxHCnfyY66qyRZBDhzph6+3qf5jqCgl7CnBbaZkSVW+k2O\r\nIahPLVl+IEb2ORd0nBOKB/dIEX8QPqFY1UBKoanZgd+I5wbqT5oUUqqGIU16\r\n7hWv6ozMuEk4pI1/u9MxTNtIS7Y7aGa7aoNG7tn2ISQQehAFnL882LXuM4Vp\r\nlYnxaOq0/Kz4DGD0QpftkHd86LAKKC/1TeKGxKhCgw3CTL9CmzPzuluxQ9K/\r\nZ+yFVARA/GzdGpW2f+xjFAGWu+3+zDudt0c=\r\n=9gcF\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev?utm_source=github&utm_medium=clerk_backend_core\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <img src=\"https://images.clerk.dev/static/clerk.svg\" alt=\"Clerk logo\" height=\"50\">\n  </a>\n  <br />\n</p>\n\n# @clerk/backend-code\n\n<div align=\"center\">\n\n[![Chat on Discord](https://img.shields.io/discord/856971667393609759.svg?logo=discord)](https://discord.com/invite/b5rXHjAg7A)\n[![Clerk documentation](https://img.shields.io/badge/documentation-clerk-green.svg)](https://clerk.dev/docs?utm_source=github&utm_medium=clerk_backend_core)\n[![Follow on Twitter](https://img.shields.io/twitter/follow/ClerkDev?style=social)](https://twitter.com/intent/follow?screen_name=ClerkDev)\n\n[Changelog](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/CHANGELOG.md)\n·\n[Report a Bug](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=bug&template=bug_report.md&title=Bug%3A+)\n·\n[Request a Feature](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=Feature%3A+)\n·\n[Ask a Question](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n\n</div>\n\n---\n\n## Overview\n\nThis package provides Clerk Backend API core resources and low-level authentication utilities for JavaScript environments. It is mostly used as the base for other Clerk SDKs.\n\n## Getting Started\n\n### Installation\n\n```sh\nnpm install @clerk/backend-core\n```\n\n### Build\n\nTo build the package locally with the TypeScript compiler, run:\n\n```sh\nnpm run build\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities, without being platform/environment, specific such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendApi](./src/api/ClerkBackendApi.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendApi` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n## Usage\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendApi](./src/api/ClerkBackendApi.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://reference.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendApi.ts#17) implementation.\n\n## Support\n\nYou can get in touch with us in any of the following ways:\n\n- Join our official community [Discord server](https://discord.com/invite/b5rXHjAg7A)\n- Open a [GitHub support issue](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n- Contact options listed on [our Support page](https://clerk.dev/support?utm_source=github&utm_medium=clerk_backend_core)\n\n## Contributing\n\nWe're open to all community contributions! If you'd like to contribute in any way, please read [our contribution guidelines](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/CONTRIBUTING.md).\n\n## Security\n\n`@clerk/backend-core` follows good practices of security, but 100% security cannot be assured.\n\n`@clerk/backend-core` is provided **\"as is\"** without any **warranty**. Use at your own risk.\n\n_For more information and to report security issues, please refer to our [security documentation](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/SECURITY.md)._\n\n## License\n\nThis project is licensed under the **MIT license**.\n\nSee [LICENSE](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/LICENSE) for more information.\n","engines":{"node":">=14"},"gitHead":"1e0b0e5dff9fbb3149b265c1c9a9875960539402","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"sokratis","email":"sokratis.vidros@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.13.0+x64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.13.0","dependencies":{"tslib":"^2.3.1","node-fetch":"^2.6.0","@types/node":"^16.11.55","@clerk/types":"^3.7.0-staging.0","query-string":"^7.0.1","snakecase-keys":"^5.1.2","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.4.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","typescript":"^4.6.4","@types/jest":"^27.4.0"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.5.0-staging.0_1664044197136_0.738377600361626","host":"s3://npm-registry-packages"}},"2.5.0-staging.1":{"name":"@clerk/backend-core","version":"2.5.0-staging.1","license":"MIT","_id":"@clerk/backend-core@2.5.0-staging.1","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"1e8a078cfc18d9f49a949e0493bd5bd211f443a5","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.5.0-staging.1.tgz","fileCount":318,"integrity":"sha512-A0y94gbxlUFgs3R1+Sh3q+RUxqsoJjfZqtZPgoBqtOWUiA+DXgP0zSXC8Hp04D0efwvpWJVmaiPYtsaKrtD/iQ==","signatures":[{"sig":"MEQCIEBpVXlYWX5qP06V0fty9E80HIxbwWJZMIyMk3300iSXAiB8Abb7B9r+RxxiQCKiyqArr4q9c7Cd53DW7rw5ZoUsbA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":545009,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjL1IAACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo5PA//dSWh+bGufK/JvNp9sD2nZddo+6IlqIvwhBgkh4wbrqhiLqr/\r\nWB+Roykbya8kIjsxfcgnkhCDHOZ40IKpvnmkmtMPquoYE/kkvlgHF8O315iQ\r\nngiG8rFGfT+R8E8LHzg+YjpHYR0uHaNoObleZW2+0fZ+VsCBDCSChlLPow/v\r\nb1qVx1TmpP2n3B4oO+3LznFfiX3cZw0lEkYmfzMZvVIzaFEXYL4X0zi5hd5V\r\nV9EUbJHrWP1tm4K83qjUFiZFk4oPFUuWDH+7so7X9OKmUBMAbOx0/frMyuJB\r\nivz/RJ54OkYM2HWEbFQCt7551LHPcGZCLi43oqEx3NwzlFovKl8EN0iUMk5n\r\nVeW/VOAenSNSHNkUkmB5K3DI5ae5fKXPjRdQlLemJ1UWuJzy8jchaTIJloPg\r\nT5aUxP8A1fDfLP7FmRWxet7QvFeOrCpWmz9qWi+l1att03sysFnn7uXpfE5T\r\naXQTnZoFzji+PmC0VcflFrjFucRy/twP7wvQ0aE8ZtQG3yvER78lqewFhHwh\r\ndnNZSOB+3HtAD7xHqYbvOhw57gVlqWD2djlslqbYdETr4bHIgrhhpFOuNkNR\r\n0KLeX4tj1l3aP2X0/zhfHo9ovG0iyL1TymiAQtMYqKfC2WjkIN7/PcbrKT2p\r\nfxJCgwvDbezShpOtDZ8vkptN0PZJJoJX5CA=\r\n=AHAl\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev?utm_source=github&utm_medium=clerk_backend_core\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <img src=\"https://images.clerk.dev/static/clerk.svg\" alt=\"Clerk logo\" height=\"50\">\n  </a>\n  <br />\n</p>\n\n# @clerk/backend-code\n\n<div align=\"center\">\n\n[![Chat on Discord](https://img.shields.io/discord/856971667393609759.svg?logo=discord)](https://discord.com/invite/b5rXHjAg7A)\n[![Clerk documentation](https://img.shields.io/badge/documentation-clerk-green.svg)](https://clerk.dev/docs?utm_source=github&utm_medium=clerk_backend_core)\n[![Follow on Twitter](https://img.shields.io/twitter/follow/ClerkDev?style=social)](https://twitter.com/intent/follow?screen_name=ClerkDev)\n\n[Changelog](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/CHANGELOG.md)\n·\n[Report a Bug](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=bug&template=bug_report.md&title=Bug%3A+)\n·\n[Request a Feature](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=Feature%3A+)\n·\n[Ask a Question](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n\n</div>\n\n---\n\n## Overview\n\nThis package provides Clerk Backend API core resources and low-level authentication utilities for JavaScript environments. It is mostly used as the base for other Clerk SDKs.\n\n## Getting Started\n\n### Installation\n\n```sh\nnpm install @clerk/backend-core\n```\n\n### Build\n\nTo build the package locally with the TypeScript compiler, run:\n\n```sh\nnpm run build\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities, without being platform/environment, specific such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendApi](./src/api/ClerkBackendApi.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendApi` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n## Usage\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendApi](./src/api/ClerkBackendApi.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://reference.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendApi.ts#17) implementation.\n\n## Support\n\nYou can get in touch with us in any of the following ways:\n\n- Join our official community [Discord server](https://discord.com/invite/b5rXHjAg7A)\n- Open a [GitHub support issue](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n- Contact options listed on [our Support page](https://clerk.dev/support?utm_source=github&utm_medium=clerk_backend_core)\n\n## Contributing\n\nWe're open to all community contributions! If you'd like to contribute in any way, please read [our contribution guidelines](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/CONTRIBUTING.md).\n\n## Security\n\n`@clerk/backend-core` follows good practices of security, but 100% security cannot be assured.\n\n`@clerk/backend-core` is provided **\"as is\"** without any **warranty**. Use at your own risk.\n\n_For more information and to report security issues, please refer to our [security documentation](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/SECURITY.md)._\n\n## License\n\nThis project is licensed under the **MIT license**.\n\nSee [LICENSE](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/LICENSE) for more information.\n","engines":{"node":">=14"},"gitHead":"1082e1677be59441a536f413829efdfee28bab26","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"sokratis","email":"sokratis.vidros@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.13.0+x64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.13.0","dependencies":{"tslib":"^2.3.1","node-fetch":"^2.6.0","@types/node":"^16.11.55","@clerk/types":"^3.7.0-staging.1","query-string":"^7.0.1","snakecase-keys":"^5.1.2","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.4.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","typescript":"^4.6.4","@types/jest":"^27.4.0"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.5.0-staging.1_1664045567965_0.5360628349343235","host":"s3://npm-registry-packages"}},"2.5.1":{"name":"@clerk/backend-core","version":"2.5.1","license":"MIT","_id":"@clerk/backend-core@2.5.1","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"f1e7bc4bbdf3213feed9a2ba5b5d16e36e49ce3d","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.5.1.tgz","fileCount":318,"integrity":"sha512-zeN7ZZhejCbxMMWFEjvT2XbryAtowYVGwS5YzqXuoZ8yQIKR1PMINXt1ASAPq/gG0EPj3UnYeHusAYUJYYHdSQ==","signatures":[{"sig":"MEUCIQDbbZtqcCk6Iq3H5aN8B3a+H1zMduOulHZAtPncSvb7DQIgdQWJSLZWfcdH8k6htONXgNCiFXhIWKHD51rT7IwqWNw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":545376,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjL/j6ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpBxBAAgpxShKB5odoZG9LG9o2kbIFg7UYi6PQENTsszXYyWBPMVe+L\r\nYC/7yIV1YDYSWSeSSD4q3fBzR9yw/2c4YgIbw0LZX+2vti7GUz8kNDVWCzz+\r\nsFIf3yapbSmiU73qet6giR4aTWelE5QOdIQmZ8fFLwsXO+xfXAd/g6/mmfBA\r\nfZGyVfXU0fGQ9kAA+JwRQ2z32ClEEGm2Pm1/Hp8mOaSmi8atP4i0IquUN8YK\r\nl2o4pnrstDiI8KZaszN6pjG2FEB/eHEYWWEpFaA0FAgueN5Q/NLUpwZRl21i\r\nwOBDYk8MB7BsqMPvDJ1cUich9K9tA0DJY3yeYiM6DNxHWVjG+gEDPZfM+/I6\r\nf7W5LR418qn6FCdm0KD6fCKOc9OU9b3EkeFp834O91jjBB4xnST7QDYPOLYH\r\nfKHr0/fRhdiJbjXF8Fp6CJJ9KkCvXLw3Uc8C2rKC5uzl76LvwqxZZL+kRqaY\r\nWC1AArCIdeEJlQsHsAMrWDJkkTN9c5Qsne/Djb3NF9mCOZRmUbN6ZQF7hV2G\r\ngsfYD59WcbVIUAyAi+t1lEDY2jMUCajL+SFabIPWTMfvwWbj2wcpy9OnKKOb\r\nJAUC8910/5CDhFUSAoQGjQnFSKfudTakNYDpkYvebhJXgQiaLJQWECZVS4sG\r\ncRQTd/xi1sjDG86YjcGEny60tAtRUu4e7rc=\r\n=XLDw\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","engines":{"node":">=14"},"gitHead":"fc37c17e5aee0a8f44c406c7511e0521903ad9c7","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"sokratis","email":"sokratis.vidros@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.13.0+x64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.13.0","dependencies":{"tslib":"^2.3.1","node-fetch":"^2.6.0","@types/node":"^16.11.55","@clerk/types":"^3.7.1","query-string":"^7.0.1","snakecase-keys":"^5.1.2","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.4.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","typescript":"^4.6.4","@types/jest":"^27.4.0"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.5.1_1664088314722_0.5854777188029383","host":"s3://npm-registry-packages"}},"2.5.2-staging.0":{"name":"@clerk/backend-core","version":"2.5.2-staging.0","license":"MIT","_id":"@clerk/backend-core@2.5.2-staging.0","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"05b16250faf5c17eb235f0a6c5b952ca0d53433d","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.5.2-staging.0.tgz","fileCount":318,"integrity":"sha512-c8X5dsz7sSdGRrcplAX0qIuLn0TH35oUaPgOeAioO4QmMaNzx+4rkzf/ALV/Brd7T+hsLbbwbyhpQ6LNwJA31g==","signatures":[{"sig":"MEUCIQD3KRRF+cOT/sW7WomOUyelVONauU/+RYz5b0gDJqPqYQIgYmFO1PB0uDs1tyhoBJIHvrtfzp+FBbQRmDf/OWb6QPE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":545396,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjMYs3ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp46g/7BMlfBus57HCAX2udBw/8rVsST4MLSw9B8aWDrSb/2Hxj7ZOl\r\nXJE9qxzrUqjJ8wq1cSSkNcDCPJ0aw3pHAD5DP3g3QHbD5/BiEZ6X6Yp9S0Ud\r\nvGz4z2SYxqgmrZ9AaPNi5zbkWaKFeZz5KkyPKFdY4eX/UgYkqhZMzlbpTQgU\r\nCw1+DOGTy0alrHGPbk7IaGcKTod24kLKkwkDYq/zojvak3N9VdNYJSe4bfX6\r\nxlYtp0sGhR+lQzu4LhWeBeKFfxFXvybG6ygzULxc1NJ2+dznKtadm/Tvmb5a\r\nElr/VkRMLhKUt/NPzpO+L8vOlan8rsBPNdklic/s9nFlEur+OYjd78ffIwEl\r\n1Uxrgj0UxlrqD8Pa/Etz5c68GEkSZdo/BgjEoSwL+XmdazFimlPWd9ZZisJw\r\nF5eBl0QLzjz1at9R9zQRiEIA1tMOB/RaTd5+W9OM1IGkP1lgUORSq3YNWtQM\r\nGUtAQBJx1ZIEKKOwdcfW0N1c9gk5ClhndqXutQ27wSwW+XycxLVxZMU4o3GX\r\nBURdXJeb0ASjrvD0UmTFMx5kUbOq3nG/PuerpG///omQWFKemlOy7kronQ3Z\r\nY4vFW8Gdo34M0SQNEv+u2bD/3FZGw08ROXzTyUPW8xEfGuKTjAwgipCMtLms\r\noWyioGSubbgTRLXmyd52yxVcJL8kCzAZh88=\r\n=DuW7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev?utm_source=github&utm_medium=clerk_backend_core\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <img src=\"https://images.clerk.dev/static/clerk.svg\" alt=\"Clerk logo\" height=\"50\">\n  </a>\n  <br />\n</p>\n\n# @clerk/backend-code\n\n<div align=\"center\">\n\n[![Chat on Discord](https://img.shields.io/discord/856971667393609759.svg?logo=discord)](https://discord.com/invite/b5rXHjAg7A)\n[![Clerk documentation](https://img.shields.io/badge/documentation-clerk-green.svg)](https://clerk.dev/docs?utm_source=github&utm_medium=clerk_backend_core)\n[![Follow on Twitter](https://img.shields.io/twitter/follow/ClerkDev?style=social)](https://twitter.com/intent/follow?screen_name=ClerkDev)\n\n[Changelog](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/CHANGELOG.md)\n·\n[Report a Bug](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=bug&template=bug_report.md&title=Bug%3A+)\n·\n[Request a Feature](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=Feature%3A+)\n·\n[Ask a Question](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n\n</div>\n\n---\n\n## Overview\n\nThis package provides Clerk Backend API core resources and low-level authentication utilities for JavaScript environments. It is mostly used as the base for other Clerk SDKs.\n\n## Getting Started\n\n### Installation\n\n```sh\nnpm install @clerk/backend-core\n```\n\n### Build\n\nTo build the package locally with the TypeScript compiler, run:\n\n```sh\nnpm run build\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities, without being platform/environment, specific such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendApi](./src/api/ClerkBackendApi.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendApi` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n## Usage\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendApi](./src/api/ClerkBackendApi.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://reference.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendApi.ts#17) implementation.\n\n## Support\n\nYou can get in touch with us in any of the following ways:\n\n- Join our official community [Discord server](https://discord.com/invite/b5rXHjAg7A)\n- Open a [GitHub support issue](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n- Contact options listed on [our Support page](https://clerk.dev/support?utm_source=github&utm_medium=clerk_backend_core)\n\n## Contributing\n\nWe're open to all community contributions! If you'd like to contribute in any way, please read [our contribution guidelines](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/CONTRIBUTING.md).\n\n## Security\n\n`@clerk/backend-core` follows good practices of security, but 100% security cannot be assured.\n\n`@clerk/backend-core` is provided **\"as is\"** without any **warranty**. Use at your own risk.\n\n_For more information and to report security issues, please refer to our [security documentation](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/SECURITY.md)._\n\n## License\n\nThis project is licensed under the **MIT license**.\n\nSee [LICENSE](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/LICENSE) for more information.\n","engines":{"node":">=14"},"gitHead":"645f2c961fa620c8c11e1fba1361f92efcf46cd4","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"sokratis","email":"sokratis.vidros@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.13.0+x64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.13.0","dependencies":{"tslib":"^2.3.1","node-fetch":"^2.6.0","@types/node":"^16.11.55","@clerk/types":"^3.8.0-staging.0","query-string":"^7.0.1","snakecase-keys":"^5.1.2","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.4.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","typescript":"^4.6.4","@types/jest":"^27.4.0"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.5.2-staging.0_1664191287138_0.5133181565053719","host":"s3://npm-registry-packages"}},"2.5.2-staging.1":{"name":"@clerk/backend-core","version":"2.5.2-staging.1","license":"MIT","_id":"@clerk/backend-core@2.5.2-staging.1","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"38711376b6a4783c787bcd780a0bdb0bbed20909","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.5.2-staging.1.tgz","fileCount":318,"integrity":"sha512-raCHQFMKyBjHFwkTBzh8mXz88pVW3SMeHsA2LDApQdGfRAD4bW95v6BafYCymO1EKVfRvf6zQu6aYBL7Ld5AZw==","signatures":[{"sig":"MEYCIQDiDdmI1nHqaqnayxLOT7a74zCmhV8r+ufYKNNy4uaHbAIhAL8F8MRy3WbzRsOV2SYvCf9WxUpxBBGAVKcglV9/6XzZ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":545396,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjMZTfACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrI3A//XfcGoI8ozNUQUdrhnXqOQ+OumqmcX+eshco6KbH8Ntfsmq+i\r\nhcQmfsStbWLGR0Cs+fkeqoiTc379mldpdZDc/6H7O52THb8D2zxz0X3oO/sc\r\nhXAYVgQl1aoNmX8+zwR3P2xYlltT+YWGaqslbRBJhVaCIXVBw/ddWUWb6Fsg\r\n32FfZEZTe4+898o9rxDWaLz4iFjZOm4fh4kFrEjSgKQBSQm966s/Yh3PR64z\r\nULdMLYm/zU0qqlX7rmsgxTeYJoxYKd++gN0PlCdt2ny9qW2RllIaj7vWioh8\r\n0GBdbc2e+vP9CfAV17Xm7d78SGwwsrg5dcsgQl7TE9/Fb5c9ZK7W11rOzVmC\r\nrKss0ryM3+47VHdJ/wKTM8KniYb4+P7KWRgyNQguy6nquXiFWWlnncAFueYE\r\n791E0N2Du2zUFJ0K0EpioKRRGddqF2XHRGdKhss4wHGwLJrPy5r9yB+Rtl/I\r\nSKIfayslAfgl5sOQgzTa6Xec9d4bn4qzGussYGGcR7K2RR2FJymAMrs8Z2t6\r\nx1Y8626udVZYL/RHNTW8d5kKMry7JekF3YVbz5jVmnISrq0dMpvXK7d/XMxW\r\nuVLX4m2u4abzi7TqdRrIlc1hkenTwwbm0mVK51U+xGg+K14VxfC5S/dm3Z5B\r\n16dKndB5ZWTO/3dJX2830oL5HYp4Gb5a5j4=\r\n=3yPx\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev?utm_source=github&utm_medium=clerk_backend_core\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <img src=\"https://images.clerk.dev/static/clerk.svg\" alt=\"Clerk logo\" height=\"50\">\n  </a>\n  <br />\n</p>\n\n# @clerk/backend-code\n\n<div align=\"center\">\n\n[![Chat on Discord](https://img.shields.io/discord/856971667393609759.svg?logo=discord)](https://discord.com/invite/b5rXHjAg7A)\n[![Clerk documentation](https://img.shields.io/badge/documentation-clerk-green.svg)](https://clerk.dev/docs?utm_source=github&utm_medium=clerk_backend_core)\n[![Follow on Twitter](https://img.shields.io/twitter/follow/ClerkDev?style=social)](https://twitter.com/intent/follow?screen_name=ClerkDev)\n\n[Changelog](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/CHANGELOG.md)\n·\n[Report a Bug](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=bug&template=bug_report.md&title=Bug%3A+)\n·\n[Request a Feature](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=Feature%3A+)\n·\n[Ask a Question](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n\n</div>\n\n---\n\n## Overview\n\nThis package provides Clerk Backend API core resources and low-level authentication utilities for JavaScript environments. It is mostly used as the base for other Clerk SDKs.\n\n## Getting Started\n\n### Installation\n\n```sh\nnpm install @clerk/backend-core\n```\n\n### Build\n\nTo build the package locally with the TypeScript compiler, run:\n\n```sh\nnpm run build\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities, without being platform/environment, specific such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendApi](./src/api/ClerkBackendApi.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendApi` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n## Usage\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendApi](./src/api/ClerkBackendApi.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://reference.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendApi.ts#17) implementation.\n\n## Support\n\nYou can get in touch with us in any of the following ways:\n\n- Join our official community [Discord server](https://discord.com/invite/b5rXHjAg7A)\n- Open a [GitHub support issue](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n- Contact options listed on [our Support page](https://clerk.dev/support?utm_source=github&utm_medium=clerk_backend_core)\n\n## Contributing\n\nWe're open to all community contributions! If you'd like to contribute in any way, please read [our contribution guidelines](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/CONTRIBUTING.md).\n\n## Security\n\n`@clerk/backend-core` follows good practices of security, but 100% security cannot be assured.\n\n`@clerk/backend-core` is provided **\"as is\"** without any **warranty**. Use at your own risk.\n\n_For more information and to report security issues, please refer to our [security documentation](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/SECURITY.md)._\n\n## License\n\nThis project is licensed under the **MIT license**.\n\nSee [LICENSE](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/LICENSE) for more information.\n","engines":{"node":">=14"},"gitHead":"2b4960689cb01a76853557b0c1a4c11eea17b9d0","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"sokratis","email":"sokratis.vidros@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.13.0+x64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.13.0","dependencies":{"tslib":"^2.3.1","node-fetch":"^2.6.0","@types/node":"^16.11.55","@clerk/types":"^3.8.0-staging.1","query-string":"^7.0.1","snakecase-keys":"^5.1.2","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.4.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","typescript":"^4.6.4","@types/jest":"^27.4.0"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.5.2-staging.1_1664193759341_0.026341030528934217","host":"s3://npm-registry-packages"}},"2.6.0-next.0":{"name":"@clerk/backend-core","version":"2.6.0-next.0","license":"MIT","_id":"@clerk/backend-core@2.6.0-next.0","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"e5cbcd906d2e27551b71a97a3202cc20b9809b29","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.6.0-next.0.tgz","fileCount":426,"integrity":"sha512-gH0IpbPhC1O+um38Ya/5AnmsF+QhEex3Ml/JkRole4h/0zoDVw7YNtDGsDshEEI6Xlnp+8KwHX3Kud0drkXjhw==","signatures":[{"sig":"MEYCIQDw7igsUDTBACXtkqsvDXLJHgHkv/miayIxCVHIrXjmBAIhAJqNNu2qRt1G4XYFKWnB4dlplxwk9wxI/+2QM34DQCrs","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":627622,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjMjXGACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmogWRAAj7hBf6kr0jOXKktNs1YHfFGPiWadydumzo1BJb7WX7B3t/HT\r\n5BvkIhjnSXzcHhGez3IBD2PFc0f9FD/xbtYC54bjDM+zE9eU6h3dfN07fdvG\r\n1j4xbObZEcS16PwwDN/AAlrwJ6RY+GIdCopFY1kDgXPP85hR4t3DAurswbGO\r\nEkHbOrdM56emu4AzUYwbQZuvXn+7peYb4eLf8JHnojhhjWilKHAyHxD1bJ+M\r\nrh1JvyiF0GhOwq7luMD9cH2eNW9lY9OEtQVaT5kv7Taig4nyhdCTHeLfoh/2\r\nQXqQ00UY4+PmCda2+2FECcq6S12iR8Yc7f/XNoPOaBMXBKcxF22+7jvWDvyp\r\nm2aAuhnGbr7IQKbfn/bc1B7MAyfhtd5dqmOIp/u0TqETMAjOpcpaGCE1YtqG\r\nx+2UIzdnqfqcxYTdEH/oC8M1SeKhSSQBf5FTcn6t9uLCl/fvps33ok7G5w6+\r\nGraskmxXpnZEQr2H2zkOyqZaaRmwjxWWll+17cnc1ubreBVaORTwrfQ0xMDg\r\n0PYB7GrRrdRNv/KbU3wvfiU14JJZwWj6ZlHGCPMUqeELaVCl0hN/BftL0TYX\r\nqiASyvqESGvBpcIOe1Ypd6sEDVjrwYLF78O9z+6eLudnoakzMwjgtqJOR16+\r\n4VNtxRi6WnXGVJtAbKNBz5jK2DsymaJ4GS0=\r\n=v2cw\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev?utm_source=github&utm_medium=clerk_backend_core\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <img src=\"https://images.clerk.dev/static/clerk.svg\" alt=\"Clerk logo\" height=\"50\">\n  </a>\n  <br />\n</p>\n\n# @clerk/backend-code\n\n<div align=\"center\">\n\n[![Chat on Discord](https://img.shields.io/discord/856971667393609759.svg?logo=discord)](https://discord.com/invite/b5rXHjAg7A)\n[![Clerk documentation](https://img.shields.io/badge/documentation-clerk-green.svg)](https://clerk.dev/docs?utm_source=github&utm_medium=clerk_backend_core)\n[![Follow on Twitter](https://img.shields.io/twitter/follow/ClerkDev?style=social)](https://twitter.com/intent/follow?screen_name=ClerkDev)\n\n[Changelog](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/CHANGELOG.md)\n·\n[Report a Bug](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=bug&template=bug_report.md&title=Bug%3A+)\n·\n[Request a Feature](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=Feature%3A+)\n·\n[Ask a Question](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n\n</div>\n\n---\n\n## Overview\n\nThis package provides Clerk Backend API core resources and low-level authentication utilities for JavaScript environments. It is mostly used as the base for other Clerk SDKs.\n\n## Getting Started\n\n### Installation\n\n```sh\nnpm install @clerk/backend-core\n```\n\n### Build\n\nTo build the package locally with the TypeScript compiler, run:\n\n```sh\nnpm run build\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities, without being platform/environment, specific such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendApi](./src/api/ClerkBackendApi.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendApi` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n## Usage\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendApi](./src/api/ClerkBackendApi.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://reference.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendApi.ts#17) implementation.\n\n## Support\n\nYou can get in touch with us in any of the following ways:\n\n- Join our official community [Discord server](https://discord.com/invite/b5rXHjAg7A)\n- Open a [GitHub support issue](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n- Contact options listed on [our Support page](https://clerk.dev/support?utm_source=github&utm_medium=clerk_backend_core)\n\n## Contributing\n\nWe're open to all community contributions! If you'd like to contribute in any way, please read [our contribution guidelines](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/CONTRIBUTING.md).\n\n## Security\n\n`@clerk/backend-core` follows good practices of security, but 100% security cannot be assured.\n\n`@clerk/backend-core` is provided **\"as is\"** without any **warranty**. Use at your own risk.\n\n_For more information and to report security issues, please refer to our [security documentation](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/SECURITY.md)._\n\n## License\n\nThis project is licensed under the **MIT license**.\n\nSee [LICENSE](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/LICENSE) for more information.\n","engines":{"node":">=14"},"gitHead":"2feceaf5fd2144418772e2278a8bb32daff25c41","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.15.0+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.15.0","dependencies":{"tslib":"^2.3.1","node-fetch":"^2.6.0","@types/node":"^16.11.55","@clerk/types":"^3.8.0-staging.1","query-string":"^7.0.1","snakecase-keys":"^5.1.2","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.4.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","typescript":"^4.6.4","@types/jest":"^27.4.0"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.6.0-next.0_1664234950439_0.2979555114892791","host":"s3://npm-registry-packages"}},"2.5.2-staging.2":{"name":"@clerk/backend-core","version":"2.5.2-staging.2","license":"MIT","_id":"@clerk/backend-core@2.5.2-staging.2","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"a9c4f15d276e3efaed070d8d7d9f43c16340d622","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.5.2-staging.2.tgz","fileCount":426,"integrity":"sha512-II5Npbbj66ad30AADvAfFNGj4eYdmL6T7yGHfExAQWJZBR++FvMqW/M2I/uYTCfQ1mIf9bz0w+f2g+GY/Qu3NQ==","signatures":[{"sig":"MEUCIGKuvYjAgkrOB3CjQQqHFJs5AjEv2MaCBu97eytOUU9KAiEAq9BjB1fXfdkZqNlGeuaE88FmImo11KJoHX9kisFl8IE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":627335,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjMthhACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr0cA//WjZhzflqBCnjkIDNnyegOiPioz/hEQMYGpPLq2CFWY02QJPv\r\nv6k8TaJJyRjo4U5l34VRT5sOiYKn6CTxCklJw+YCSywMYMT2RQf1OV+pJblj\r\nLfr75b7//NwFEU0HjngFzYW+fL3H0trnwchT5AhXbehu7k8VOvoJ0Sp4uFId\r\no81peBu8dWNs8rqfjBTi4h4rXUCkYWnK6mqzL2uTnRQJDKGYAzqfwKin1RIM\r\nFjqnndRrw+nqfyZJAzEe7edbwQddEJtcMWmp6RB4YmqFNtxr3eUuVCn/yObN\r\naJ+ZlVDgTb1Z5p1RwH7FZ8F2yli1+pPp3OqGmPn1Ky7k+HSjJzcAVr16k4CY\r\nMi8MP/9ob98ayMYBf/ImK51DFS8VPQs12lCs25Z856ggBqAQBXa8j3BcLe2i\r\nnki+a5xQ/D/sSLTu6QmDkljxtaYKPjqng22RsrgggPBFwsz8facxmM7ig/sV\r\n3j93Hqpfs1CHHmnQlBv6hlzln/UOAJETYQfC2HbDL3ewyE+hzILaP3aEcmK6\r\nYGh2Sv5cKKi4gsfUiGKFNcDw3URLSme1lvOcpt10Tl6HnvK0mFNVOZeR2cFT\r\nZOdjejmfL+luHjHtKGkF2zj5jGySC+gzM0FNTgytcGqXbC+3DC0pt05wupCi\r\nB6+fWNb9tMZ/UxZquKHBs75NFejOctApOu4=\r\n=pU2Z\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev?utm_source=github&utm_medium=clerk_backend_core\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <img src=\"https://images.clerk.dev/static/clerk.svg\" alt=\"Clerk logo\" height=\"50\">\n  </a>\n  <br />\n</p>\n\n# @clerk/backend-code\n\n<div align=\"center\">\n\n[![Chat on Discord](https://img.shields.io/discord/856971667393609759.svg?logo=discord)](https://discord.com/invite/b5rXHjAg7A)\n[![Clerk documentation](https://img.shields.io/badge/documentation-clerk-green.svg)](https://clerk.dev/docs?utm_source=github&utm_medium=clerk_backend_core)\n[![Follow on Twitter](https://img.shields.io/twitter/follow/ClerkDev?style=social)](https://twitter.com/intent/follow?screen_name=ClerkDev)\n\n[Changelog](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/CHANGELOG.md)\n·\n[Report a Bug](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=bug&template=bug_report.md&title=Bug%3A+)\n·\n[Request a Feature](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=Feature%3A+)\n·\n[Ask a Question](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n\n</div>\n\n---\n\n## Overview\n\nThis package provides Clerk Backend API core resources and low-level authentication utilities for JavaScript environments. It is mostly used as the base for other Clerk SDKs.\n\n## Getting Started\n\n### Installation\n\n```sh\nnpm install @clerk/backend-core\n```\n\n### Build\n\nTo build the package locally with the TypeScript compiler, run:\n\n```sh\nnpm run build\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities, without being platform/environment, specific such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendApi](./src/api/ClerkBackendApi.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendApi` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n## Usage\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendApi](./src/api/ClerkBackendApi.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://reference.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendApi.ts#17) implementation.\n\n## Support\n\nYou can get in touch with us in any of the following ways:\n\n- Join our official community [Discord server](https://discord.com/invite/b5rXHjAg7A)\n- Open a [GitHub support issue](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n- Contact options listed on [our Support page](https://clerk.dev/support?utm_source=github&utm_medium=clerk_backend_core)\n\n## Contributing\n\nWe're open to all community contributions! If you'd like to contribute in any way, please read [our contribution guidelines](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/CONTRIBUTING.md).\n\n## Security\n\n`@clerk/backend-core` follows good practices of security, but 100% security cannot be assured.\n\n`@clerk/backend-core` is provided **\"as is\"** without any **warranty**. Use at your own risk.\n\n_For more information and to report security issues, please refer to our [security documentation](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/SECURITY.md)._\n\n## License\n\nThis project is licensed under the **MIT license**.\n\nSee [LICENSE](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/LICENSE) for more information.\n","engines":{"node":">=14"},"gitHead":"5368ebf888244e7ca7a397a4937ad6fb277cb98b","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.15.0+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.15.0","dependencies":{"tslib":"^2.3.1","node-fetch":"^2.6.0","@types/node":"^16.11.55","@clerk/types":"^3.8.0-staging.2","query-string":"^7.0.1","snakecase-keys":"^5.1.2","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.4.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","typescript":"^4.6.4","@types/jest":"^27.4.0"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.5.2-staging.2_1664276577733_0.8118501327071959","host":"s3://npm-registry-packages"}},"2.6.0-staging.0":{"name":"@clerk/backend-core","version":"2.6.0-staging.0","license":"MIT","_id":"@clerk/backend-core@2.6.0-staging.0","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"118431ccf81255632e92eda3003433e67740476d","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.6.0-staging.0.tgz","fileCount":426,"integrity":"sha512-s/PGANmyouk8hOgeVO+UxjFpnJOTbMhB7NFyREm/5KLkmI+6jlbAmJE/4A9xvylHSBB0dvd9t+0zmEDxeuXdZw==","signatures":[{"sig":"MEYCIQD7DvpmlUE++qINLeQDVCzD8S8STN/xmKdGyTG19aVb9wIhAIuNTo3tAy7LNHX3zwuVpr42TpPIz6YfmtIoZZZYHnLr","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":628207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjMxDMACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrjAA/+I74KCMMAxefu1ONLoWU/wG8LpMn83NgnXDJwXkaSG6L+dqRl\r\nv6QyOsgYF01mr28RwUM5a5c3HgSgRiizYAUgKT+CFqeFe0URq3wsXHhq5VX/\r\ngcvG/ecSBQS4/JB9NyhiDhrW3/iYb4gbqQYggThUpd7bKz5XE0U/N5tArPXR\r\nCBp/2ML+sy1eNBZMkjDVPc3F08SzBoSLjGoIA9tebLDuShzu6thlZYMFOAqS\r\nqQx5m5Ur34ZQwgsNyRrDqblQ81sfITCzzpL7W7ja2FIV9aFnpbLmh8IsJZeU\r\nA27ikaPVwmKNhvhk8unYVsUfDvqhADtlOWR5LOmkVDpe+8T1NFcv2ASKCf31\r\n8GyLGP6/r3MaMYvMUuKB1hVR44ylxILa2tWplzP7Iwqzs17PcIbXCJhi1i31\r\nu4gnZCdaBNZheG/PagMzhxDCnJRTPjrA5fgnORR9j7le56lMv0JJ2+eVHv+p\r\nuCDX8Y7qN6IJtOni4M17QusShZVUed3doTJG4hxWrTTINOtMlXUyQ2o4isG9\r\ndgVLbhs6u9Z5TM0hQIquk4MsIrZoIAGbcNkHyiQh9H0C1m6XTHGFL07I4Fc2\r\nA722Vtu+M1GzUlu5neUpRG6g2E7mktJsklWxRRBL65li7sC6dI29xtKcXoBe\r\nmu2E+dYNEPgelgfOQSeHdjX1arQRHjRgniw=\r\n=DzqS\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev?utm_source=github&utm_medium=clerk_backend_core\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <img src=\"https://images.clerk.dev/static/clerk.svg\" alt=\"Clerk logo\" height=\"50\">\n  </a>\n  <br />\n</p>\n\n# @clerk/backend-code\n\n<div align=\"center\">\n\n[![Chat on Discord](https://img.shields.io/discord/856971667393609759.svg?logo=discord)](https://discord.com/invite/b5rXHjAg7A)\n[![Clerk documentation](https://img.shields.io/badge/documentation-clerk-green.svg)](https://clerk.dev/docs?utm_source=github&utm_medium=clerk_backend_core)\n[![Follow on Twitter](https://img.shields.io/twitter/follow/ClerkDev?style=social)](https://twitter.com/intent/follow?screen_name=ClerkDev)\n\n[Changelog](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/CHANGELOG.md)\n·\n[Report a Bug](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=bug&template=bug_report.md&title=Bug%3A+)\n·\n[Request a Feature](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=Feature%3A+)\n·\n[Ask a Question](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n\n</div>\n\n---\n\n## Overview\n\nThis package provides Clerk Backend API core resources and low-level authentication utilities for JavaScript environments. It is mostly used as the base for other Clerk SDKs.\n\n## Getting Started\n\n### Installation\n\n```sh\nnpm install @clerk/backend-core\n```\n\n### Build\n\nTo build the package locally with the TypeScript compiler, run:\n\n```sh\nnpm run build\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities, without being platform/environment, specific such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendApi](./src/api/ClerkBackendApi.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendApi` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n## Usage\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendApi](./src/api/ClerkBackendApi.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://reference.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendApi.ts#17) implementation.\n\n## Support\n\nYou can get in touch with us in any of the following ways:\n\n- Join our official community [Discord server](https://discord.com/invite/b5rXHjAg7A)\n- Open a [GitHub support issue](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n- Contact options listed on [our Support page](https://clerk.dev/support?utm_source=github&utm_medium=clerk_backend_core)\n\n## Contributing\n\nWe're open to all community contributions! If you'd like to contribute in any way, please read [our contribution guidelines](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/CONTRIBUTING.md).\n\n## Security\n\n`@clerk/backend-core` follows good practices of security, but 100% security cannot be assured.\n\n`@clerk/backend-core` is provided **\"as is\"** without any **warranty**. Use at your own risk.\n\n_For more information and to report security issues, please refer to our [security documentation](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/SECURITY.md)._\n\n## License\n\nThis project is licensed under the **MIT license**.\n\nSee [LICENSE](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/LICENSE) for more information.\n","engines":{"node":">=14"},"gitHead":"1259c435405d316ad2969d5b8dc5464b2d0a5991","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.15.0+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.15.0","dependencies":{"tslib":"^2.3.1","node-fetch":"^2.6.0","@types/node":"^16.11.55","@clerk/types":"^3.8.0-staging.3","query-string":"^7.0.1","snakecase-keys":"^5.1.2","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.4.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","typescript":"^4.6.4","@types/jest":"^27.4.0"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.6.0-staging.0_1664291019725_0.6976347961087908","host":"s3://npm-registry-packages"}},"2.6.0-staging.1":{"name":"@clerk/backend-core","version":"2.6.0-staging.1","license":"MIT","_id":"@clerk/backend-core@2.6.0-staging.1","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"4051c0dbf063b086d7657f60a3bd62e09b4202d6","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.6.0-staging.1.tgz","fileCount":426,"integrity":"sha512-LaxthnGxndqMujRhlEKCIThFvqgF9fBRnht6/UHOxi6BB6UBGcUflMH5Nd2hDVaegCpfBRXX04zkDy15narLgg==","signatures":[{"sig":"MEUCIC5z8zsnLG5WgMI646vDP1YkJxP4OpAGuIjSY9GPzJTGAiEAxp1BUy7jnQ/1aSCYGOCzJPbepL2nN2OiTIPAOnKnW84=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":628177,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjNYV7ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr/+g/6A2rer6unsNTOX4PgF853ia6uUCam2TYnv39JCaLwBNgFJNov\r\nFis3iRQqGnddLV3D69Dtf8sNVau2C/dvgsSgPnZX3bQnHYdvOpTixJSyahHv\r\nDp+Ys23QhzLirTUznFyNhUSaH65RhBLzUZULyhpp1fe8cOP7UFTYCq9XaB+O\r\nan+rDCX4YvEdlZBGpS5KfGhoFz/T2HX65wikq5O6y3MMleRqp0lBp01vl+l1\r\naO/XEEfCR6Zy3+6JTEz+HutaQUTGFffoSD6AfwpkoKVYMuFoElQUq0O7nKWB\r\nkJ1yJxS0oWrUcilKUvNqMq0LXHTrqzNyxxXfKhXKYMdhI25DCB+zVujrk+Gk\r\nO/SVeBkeEgXvJTQwIq8Ip2vTTOS2SHHUBOTj+/EgXL8kvQIAJpREvO46dMsQ\r\nXwS62EcnMAJzot8pWV3vWh4tOztB3LEFGYbrAUJBvoBZ2tIUIYVVr2Af7Hvb\r\n1M4q5TPK6RNGlIFrzS4L0QXulktWk1b8g2ECAc8siCbpPeCXQ7suYaxNFv+/\r\nzkipzSW0VTssziYA/O+3Q0U18o2bIUcWduIQVB7I//q9lCUJCLA8xQwz1sp2\r\nmh8UFsqA7ibQEj0t8mJJ5GB6f+hM5nU0AJy7J1pDMDKLPwB8ZmY4BYw20mEQ\r\nYHgn7XqfXaoMHGvkjrhkXOnn828NZD1JxxU=\r\n=Wrcz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev?utm_source=github&utm_medium=clerk_backend_core\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <img src=\"https://images.clerk.dev/static/clerk.svg\" alt=\"Clerk logo\" height=\"50\">\n  </a>\n  <br />\n</p>\n\n# @clerk/backend-code\n\n<div align=\"center\">\n\n[![Chat on Discord](https://img.shields.io/discord/856971667393609759.svg?logo=discord)](https://discord.com/invite/b5rXHjAg7A)\n[![Clerk documentation](https://img.shields.io/badge/documentation-clerk-green.svg)](https://clerk.dev/docs?utm_source=github&utm_medium=clerk_backend_core)\n[![Follow on Twitter](https://img.shields.io/twitter/follow/ClerkDev?style=social)](https://twitter.com/intent/follow?screen_name=ClerkDev)\n\n[Changelog](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/CHANGELOG.md)\n·\n[Report a Bug](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=bug&template=bug_report.md&title=Bug%3A+)\n·\n[Request a Feature](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=Feature%3A+)\n·\n[Ask a Question](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n\n</div>\n\n---\n\n## Overview\n\nThis package provides Clerk Backend API core resources and low-level authentication utilities for JavaScript environments. It is mostly used as the base for other Clerk SDKs.\n\n## Getting Started\n\n### Installation\n\n```sh\nnpm install @clerk/backend-core\n```\n\n### Build\n\nTo build the package locally with the TypeScript compiler, run:\n\n```sh\nnpm run build\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities, without being platform/environment, specific such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendApi](./src/api/ClerkBackendApi.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendApi` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n## Usage\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendApi](./src/api/ClerkBackendApi.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://reference.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendApi.ts#17) implementation.\n\n## Support\n\nYou can get in touch with us in any of the following ways:\n\n- Join our official community [Discord server](https://discord.com/invite/b5rXHjAg7A)\n- Open a [GitHub support issue](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n- Contact options listed on [our Support page](https://clerk.dev/support?utm_source=github&utm_medium=clerk_backend_core)\n\n## Contributing\n\nWe're open to all community contributions! If you'd like to contribute in any way, please read [our contribution guidelines](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/CONTRIBUTING.md).\n\n## Security\n\n`@clerk/backend-core` follows good practices of security, but 100% security cannot be assured.\n\n`@clerk/backend-core` is provided **\"as is\"** without any **warranty**. Use at your own risk.\n\n_For more information and to report security issues, please refer to our [security documentation](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/SECURITY.md)._\n\n## License\n\nThis project is licensed under the **MIT license**.\n\nSee [LICENSE](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/LICENSE) for more information.\n","engines":{"node":">=14"},"gitHead":"b1abb43db6c65cf1d6d6432fad9d964d261bdc45","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.15.0+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.15.0","dependencies":{"tslib":"^2.3.1","node-fetch":"^2.6.0","@types/node":"^16.11.55","@clerk/types":"^3.8.0-staging.4","query-string":"^7.0.1","snakecase-keys":"^5.1.2","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.4.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","typescript":"^4.6.4","@types/jest":"^27.4.0"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.6.0-staging.1_1664451962901_0.25507687831173187","host":"s3://npm-registry-packages"}},"2.7.0-staging.1":{"name":"@clerk/backend-core","version":"2.7.0-staging.1","license":"MIT","_id":"@clerk/backend-core@2.7.0-staging.1","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"c391e09bdede27d4ee77b0f539918b97dfb3ad62","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.7.0-staging.1.tgz","fileCount":431,"integrity":"sha512-UplehtKMKuV7WLv9Zwd9CQZAr3b+WnBZ7zNjOpL/Q2Q4Rav0iUVLRJqI8GcHqnl90NUqeKQZl+YRxcbK6qPD3A==","signatures":[{"sig":"MEUCIQCXH2cF3w51VR09cco30LUjjJe8RqeE5y26cSCiIn54OwIgPQPMfjl19hmcWOoPr7PyvC1OI0Qcn+yREcUyDweo9ms=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":631896,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjNjB/ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqJ6Q//dMjFOPVO9kwNWyl6TT8BxKfHApnPoBwAYClWBuaG4EdtzmMR\r\nXfhJ4HpgWN/YV+aN/wyj2gQFhyJUSlpX+HHml/c4MOidXtVX8zLqjStCkXzL\r\n9xYp04q9/8g5a1O96PSOrZz8iLs9m/RYWLn6LOwUQ3DMILa5nYkvNT+3XOaG\r\nTnV2KD1NEDZxA7pV+ClBQLkh15CjhUqDLUgplS64zy9xBdAmc80ayFsc9ONQ\r\nPGs0MasbnG5ToUGzsTpc6/KJw3XPBEBcIgFHBwOsrQQq/cSgJEgVWqvLHl35\r\nyUx8seJPUSwgHjUZ0jo+TWZ01futn1n+Bl8WkVhHHyEX9GOTFpyFg2lZNxjV\r\nlTs0o+pDzKvXUNUuoUddp8PGiWNgQ1Lr452GKSwoMd1u3GDs82Db8bV4w1i7\r\nI+vE2dGRXCzItlbz5cUB/Z4znoTeYyTXW4CjKUO546wWtfXZF9CedIBaSSIl\r\nFyNAonb0GmzFTOTEASEm5OEWKrUEIkzAU6W+Pjo3sCvTm5yEZw3AMxl9KRri\r\naArmGlGHk43ShurBiMgUFmjwtqRZEMZAl7Y0w6SPEcN6nSeTsQyL6dMvoGyd\r\n+YWAFkqg/gTXYPpBhxx/qy8v08LoIG5Sris4wTo+/EZm7lLYPNe3dtc5X+x6\r\n7QwmV5O40usJlu9TUn6xd/KVMvjk52dmNOQ=\r\n=J/lJ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev?utm_source=github&utm_medium=clerk_backend_core\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <img src=\"https://images.clerk.dev/static/clerk.svg\" alt=\"Clerk logo\" height=\"50\">\n  </a>\n  <br />\n</p>\n\n# @clerk/backend-code\n\n<div align=\"center\">\n\n[![Chat on Discord](https://img.shields.io/discord/856971667393609759.svg?logo=discord)](https://discord.com/invite/b5rXHjAg7A)\n[![Clerk documentation](https://img.shields.io/badge/documentation-clerk-green.svg)](https://clerk.dev/docs?utm_source=github&utm_medium=clerk_backend_core)\n[![Follow on Twitter](https://img.shields.io/twitter/follow/ClerkDev?style=social)](https://twitter.com/intent/follow?screen_name=ClerkDev)\n\n[Changelog](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/CHANGELOG.md)\n·\n[Report a Bug](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=bug&template=bug_report.md&title=Bug%3A+)\n·\n[Request a Feature](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=Feature%3A+)\n·\n[Ask a Question](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n\n</div>\n\n---\n\n## Overview\n\nThis package provides Clerk Backend API core resources and low-level authentication utilities for JavaScript environments. It is mostly used as the base for other Clerk SDKs.\n\n## Getting Started\n\n### Installation\n\n```sh\nnpm install @clerk/backend-core\n```\n\n### Build\n\nTo build the package locally with the TypeScript compiler, run:\n\n```sh\nnpm run build\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities, without being platform/environment, specific such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendApi](./src/api/ClerkBackendApi.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendApi` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n## Usage\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendApi](./src/api/ClerkBackendApi.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://reference.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendApi.ts#17) implementation.\n\n## Support\n\nYou can get in touch with us in any of the following ways:\n\n- Join our official community [Discord server](https://discord.com/invite/b5rXHjAg7A)\n- Open a [GitHub support issue](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n- Contact options listed on [our Support page](https://clerk.dev/support?utm_source=github&utm_medium=clerk_backend_core)\n\n## Contributing\n\nWe're open to all community contributions! If you'd like to contribute in any way, please read [our contribution guidelines](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/CONTRIBUTING.md).\n\n## Security\n\n`@clerk/backend-core` follows good practices of security, but 100% security cannot be assured.\n\n`@clerk/backend-core` is provided **\"as is\"** without any **warranty**. Use at your own risk.\n\n_For more information and to report security issues, please refer to our [security documentation](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/SECURITY.md)._\n\n## License\n\nThis project is licensed under the **MIT license**.\n\nSee [LICENSE](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/LICENSE) for more information.\n","engines":{"node":">=14"},"gitHead":"d2d655c7279676b1f40a2412008ecf0aa382775c","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.15.0+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.15.0","dependencies":{"tslib":"^2.3.1","node-fetch":"^2.6.0","@types/node":"^16.11.55","@clerk/types":"^3.8.1-staging.0","query-string":"^7.0.1","snakecase-keys":"^5.1.2","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.4.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","typescript":"^4.6.4","@types/jest":"^27.4.0"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.7.0-staging.1_1664495743144_0.7987213466234429","host":"s3://npm-registry-packages"}},"2.7.0-staging.2":{"name":"@clerk/backend-core","version":"2.7.0-staging.2","license":"MIT","_id":"@clerk/backend-core@2.7.0-staging.2","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"806741546a92364a6000b643f70a893db3993fb9","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.7.0-staging.2.tgz","fileCount":431,"integrity":"sha512-DV+iX2UL8Gm7p0Ldk6xAZo2+a4qzkXNkd07dmKwSswKrOMSJJgAza8LDtYG/1HBe8/bBVQSXyL4PYbyyXzijSw==","signatures":[{"sig":"MEQCIBcOClsB8LENYg84fV0+rIQc7XcBfR6PKwALG1w1OFT8AiBr2X+dxYTIMiHCQlacTraLIbYzMy7OUFWVKfK01d2b1A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":631896,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjNrV5ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqlwg/+PC8YkWmVnIyCBvrhyffYDojurLfHLLHbw+gfONos9T0/BO0q\r\nzbDVZnSJ+/hsf5fHBl9PsKc51bawJGhHcDlyuCHkz5J4i0vcgpZv650ES7J3\r\n8iomj5byhLaonMV7Y661re9BPo63PMhdFualXxEiNiTl/IDMTyiOrpUpvoqJ\r\nyi5XTG75vMo8E/FTwnQqxslmpOcZvtOeeRkJEU0utefN8hHNUL8Ph3mXEoDV\r\n9Mi/qEbgoKXWbuDkIUAN+WACjOO1yntv3J5jPVbkGXTzQGM1Y2umQGXNQ9w+\r\nv+HaCdDW3NXyDzkPfJs6NURtCIs2O7xLwS3apZRLPtWq5ONPTIPAIb/qMV85\r\nzbtcz5Y8MC6OT6QfXtjfNUM2N0rRQC7V0eeiLDxmhlT85xuvlH23y5QLhZ1O\r\nsnXwtQXQsEnPaSLfC0SE96aZ6EZ7uxMgJAxyht7i3jSv7XVx4GOrPWYveviq\r\nkHRHMYkiHvs5Xwazee+pj1OTHaC430IOBrTVm98JjFn1soN7yXboeaTJu2sd\r\nNlyWI1kFl6gOyv6iW30h6M3l3s3GWM32WN2ijzBS9bW/CrOzrhVX8deQlDFI\r\ntNqeSUZZpsec0zEtfmCDp7uz8VfgcprRBoUcVBG8oi/JJKsdl1qrfOT2WNbH\r\nyNHbJTy4pho2NDNlAwPeZMMrY7STpwzQa4M=\r\n=c/XD\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev?utm_source=github&utm_medium=clerk_backend_core\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <img src=\"https://images.clerk.dev/static/clerk.svg\" alt=\"Clerk logo\" height=\"50\">\n  </a>\n  <br />\n</p>\n\n# @clerk/backend-code\n\n<div align=\"center\">\n\n[![Chat on Discord](https://img.shields.io/discord/856971667393609759.svg?logo=discord)](https://discord.com/invite/b5rXHjAg7A)\n[![Clerk documentation](https://img.shields.io/badge/documentation-clerk-green.svg)](https://clerk.dev/docs?utm_source=github&utm_medium=clerk_backend_core)\n[![Follow on Twitter](https://img.shields.io/twitter/follow/ClerkDev?style=social)](https://twitter.com/intent/follow?screen_name=ClerkDev)\n\n[Changelog](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/CHANGELOG.md)\n·\n[Report a Bug](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=bug&template=bug_report.md&title=Bug%3A+)\n·\n[Request a Feature](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=Feature%3A+)\n·\n[Ask a Question](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n\n</div>\n\n---\n\n## Overview\n\nThis package provides Clerk Backend API core resources and low-level authentication utilities for JavaScript environments. It is mostly used as the base for other Clerk SDKs.\n\n## Getting Started\n\n### Installation\n\n```sh\nnpm install @clerk/backend-core\n```\n\n### Build\n\nTo build the package locally with the TypeScript compiler, run:\n\n```sh\nnpm run build\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities, without being platform/environment, specific such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendApi](./src/api/ClerkBackendApi.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendApi` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n## Usage\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendApi](./src/api/ClerkBackendApi.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://reference.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendApi.ts#17) implementation.\n\n## Support\n\nYou can get in touch with us in any of the following ways:\n\n- Join our official community [Discord server](https://discord.com/invite/b5rXHjAg7A)\n- Open a [GitHub support issue](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n- Contact options listed on [our Support page](https://clerk.dev/support?utm_source=github&utm_medium=clerk_backend_core)\n\n## Contributing\n\nWe're open to all community contributions! If you'd like to contribute in any way, please read [our contribution guidelines](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/CONTRIBUTING.md).\n\n## Security\n\n`@clerk/backend-core` follows good practices of security, but 100% security cannot be assured.\n\n`@clerk/backend-core` is provided **\"as is\"** without any **warranty**. Use at your own risk.\n\n_For more information and to report security issues, please refer to our [security documentation](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/SECURITY.md)._\n\n## License\n\nThis project is licensed under the **MIT license**.\n\nSee [LICENSE](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/LICENSE) for more information.\n","engines":{"node":">=14"},"gitHead":"f5269cc7cb79348cec74df34437ddae027d5721b","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.15.0+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.15.0","dependencies":{"tslib":"^2.3.1","node-fetch":"^2.6.0","@types/node":"^16.11.55","@clerk/types":"^3.9.0-staging.0","query-string":"^7.0.1","snakecase-keys":"^5.1.2","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.4.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","typescript":"^4.6.4","@types/jest":"^27.4.0"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.7.0-staging.2_1664529785702_0.546947459716046","host":"s3://npm-registry-packages"}},"2.7.0-staging.3":{"name":"@clerk/backend-core","version":"2.7.0-staging.3","license":"MIT","_id":"@clerk/backend-core@2.7.0-staging.3","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"89c6161979f2b7ef068f1f842870f1983dee7518","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.7.0-staging.3.tgz","fileCount":431,"integrity":"sha512-MNBIiMam/4gdyECsT69nuqP2U7XaXKBTh5Gnn+VpIskoZHEyRVXyVrKrkrdbSzp0tYvdFEKwG4lI0tLboOtrbA==","signatures":[{"sig":"MEUCIQCJ1LAcICH/GAbo1MIwwrv3WQa+LgHXzM9ycmGEF6TKQwIgVQu4KrWZOOkrPI+eMfshHJLZS/99Df6aYHSh3OBl6UA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":631896,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjNvXsACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrKjhAAnfhlLagFhvDyJ7iLaSx5EjEZpS0+0hCsnKjBB6rhpva4YZ7Z\r\nc2n05qZ7ugJfxheREsbunRk9FK7fqz17MIOTRujbNgTM8p5qhGaKY6cr4KIZ\r\nWTZP/3oZ/FO7FQBRbzs4sXpCUcN1tLxGHgOG9kP0Ofh6iGBCFa0gp+sZXzHN\r\npGIZ89LioF1HYzDX+KEkSGjxT1Mvrm1HN1xgg+UtaM+r+jk/dAbcqI0a9pBu\r\npUe6woHlyy1DFqn9/m/4X8A2kAp0gpIlRyujfsc7bvGqqObeC5Y373JACeFH\r\nR54LHGy7j7AZYRWNrBeHVoaYGWFleA9BPFSRUqfx4xfk4lcogUgh4V2P1xKj\r\n3LOZ3UVylLAtC4PTthBGYi6xuV5UXHCCGCt/bLgtsMo3TIZSbGfXxYTkb8iS\r\njrCJzq60alHfru6+oV5kujXS4DXPKY2DayURoH4ao55x2im0dr3MSY/MHNhp\r\nBm/UHS4QF/6+GaZiXeoKsvvevvFhgwID0BUFF/Gm33hdDYACHl5cD+bXpnp0\r\nQ5ZCOlYdJ61zjgFsE6ZJs/gbNasaD47PJvuWCtJDNml78LXUOPFVpUxl81KU\r\nzEeisY9zMyvIuJ56oQtKzPyFDL1j2CbDpnwmxYJJ6c//jySJ1mKimnYutury\r\nmw5uqq27C2fZ7gO9atSeL0RqNSxB3U95sO4=\r\n=93WF\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev?utm_source=github&utm_medium=clerk_backend_core\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <img src=\"https://images.clerk.dev/static/clerk.svg\" alt=\"Clerk logo\" height=\"50\">\n  </a>\n  <br />\n</p>\n\n# @clerk/backend-code\n\n<div align=\"center\">\n\n[![Chat on Discord](https://img.shields.io/discord/856971667393609759.svg?logo=discord)](https://discord.com/invite/b5rXHjAg7A)\n[![Clerk documentation](https://img.shields.io/badge/documentation-clerk-green.svg)](https://clerk.dev/docs?utm_source=github&utm_medium=clerk_backend_core)\n[![Follow on Twitter](https://img.shields.io/twitter/follow/ClerkDev?style=social)](https://twitter.com/intent/follow?screen_name=ClerkDev)\n\n[Changelog](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/CHANGELOG.md)\n·\n[Report a Bug](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=bug&template=bug_report.md&title=Bug%3A+)\n·\n[Request a Feature](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=Feature%3A+)\n·\n[Ask a Question](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n\n</div>\n\n---\n\n## Overview\n\nThis package provides Clerk Backend API core resources and low-level authentication utilities for JavaScript environments. It is mostly used as the base for other Clerk SDKs.\n\n## Getting Started\n\n### Installation\n\n```sh\nnpm install @clerk/backend-core\n```\n\n### Build\n\nTo build the package locally with the TypeScript compiler, run:\n\n```sh\nnpm run build\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities, without being platform/environment, specific such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendApi](./src/api/ClerkBackendApi.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendApi` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n## Usage\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendApi](./src/api/ClerkBackendApi.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://reference.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendApi.ts#17) implementation.\n\n## Support\n\nYou can get in touch with us in any of the following ways:\n\n- Join our official community [Discord server](https://discord.com/invite/b5rXHjAg7A)\n- Open a [GitHub support issue](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n- Contact options listed on [our Support page](https://clerk.dev/support?utm_source=github&utm_medium=clerk_backend_core)\n\n## Contributing\n\nWe're open to all community contributions! If you'd like to contribute in any way, please read [our contribution guidelines](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/CONTRIBUTING.md).\n\n## Security\n\n`@clerk/backend-core` follows good practices of security, but 100% security cannot be assured.\n\n`@clerk/backend-core` is provided **\"as is\"** without any **warranty**. Use at your own risk.\n\n_For more information and to report security issues, please refer to our [security documentation](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/SECURITY.md)._\n\n## License\n\nThis project is licensed under the **MIT license**.\n\nSee [LICENSE](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/LICENSE) for more information.\n","engines":{"node":">=14"},"gitHead":"db13e0f8f6d7a33594e0ae789596cf7dcf66b95b","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.15.0+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.15.0","dependencies":{"tslib":"^2.3.1","node-fetch":"^2.6.0","@types/node":"^16.11.55","@clerk/types":"^3.9.0-staging.1","query-string":"^7.0.1","snakecase-keys":"^5.1.2","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.4.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","typescript":"^4.6.4","@types/jest":"^27.4.0"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.7.0-staging.3_1664546284141_0.4344931118587054","host":"s3://npm-registry-packages"}},"2.7.0-staging.5":{"name":"@clerk/backend-core","version":"2.7.0-staging.5","license":"MIT","_id":"@clerk/backend-core@2.7.0-staging.5","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"2fe2b79faa5c98049051221eeaf4080ddde2e051","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.7.0-staging.5.tgz","fileCount":431,"integrity":"sha512-a46aUoTTad0PCyOXkUkZ5dwJoQyeZ+r3GWmH26B1eHqaeiXOf0R5cCk4QfyKcyWMJEXivaWSqUmwUtc5HN0aMA==","signatures":[{"sig":"MEUCIB37YNg9ptb8jQvIqVk+R6pv783N0oBPK10BQ9xdeLVkAiEA1XDdZu+QlaJkiI/oHYuXheymc0i++AaWw7fg9FDGeKg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":632401,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjOs2oACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrWOA//cDyXT1sY0ewqqkr7PGP/M09P+3+swkbvSiPe9OC15pnerwvi\r\n13GvUn7zY9s8Eizb6y6O5ou+PFHVnAcIA9lg+MDZUsLcaKc2S+kNEVwk1Tqf\r\n4LbFvn65t20cIdlnKI8/qaSzE5fOGx8Dm90pLZVHrXG8/nvN5S5XiGKyDJQq\r\nbg9jxL9a9FTfD0vEkiYE0pwONOGheZP1fjb4H199J+/WxK5E+WaWkxNmuYou\r\n0hemJO2KLZEdwc7y3dOxZR5Uq0PA6QrfQ422VY3Du7lWYGQA3vg8+LGlnhXk\r\nFb18Vmke9T56RsS+NTNVKTsOFh0esqRcQCnrQjcY6aFVhyRkRzhkjfwz6E07\r\n9WgZ/zhdGmGlnupjO4i5OcJ3OYNC3LDYC0YaivaUdx0NpcBAqRLkgiEBVsJO\r\n+AbeEv/oHmXTcdiRoMmkrAjojFi3UZi5aw64uCjiNn0BdLKv5edxdWLR9Tvz\r\npfrbNSU/LDUgcMP7xHFcqhyqao3pcEV3CizMR0XHKrcdmU/O3aSZxvsgq4xx\r\nTo9V561+hyissqvIpgtXL0pU+fi0eXVx0Ooc6hgLeQt1lI7JXtZqcz2D5mB2\r\nKXbCHE/Q+1pagnSkZb9sfHRjM3m9Whus42g3SPE+XE6+AjrSYZXgWlUtq4ZY\r\n+YErZVFYfhYhLfw4X6gMULqgsiTgwLTJGMw=\r\n=zuQs\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev?utm_source=github&utm_medium=clerk_backend_core\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <img src=\"https://images.clerk.dev/static/clerk.svg\" alt=\"Clerk logo\" height=\"50\">\n  </a>\n  <br />\n</p>\n\n# @clerk/backend-code\n\n<div align=\"center\">\n\n[![Chat on Discord](https://img.shields.io/discord/856971667393609759.svg?logo=discord)](https://discord.com/invite/b5rXHjAg7A)\n[![Clerk documentation](https://img.shields.io/badge/documentation-clerk-green.svg)](https://clerk.dev/docs?utm_source=github&utm_medium=clerk_backend_core)\n[![Follow on Twitter](https://img.shields.io/twitter/follow/ClerkDev?style=social)](https://twitter.com/intent/follow?screen_name=ClerkDev)\n\n[Changelog](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/CHANGELOG.md)\n·\n[Report a Bug](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=bug&template=bug_report.md&title=Bug%3A+)\n·\n[Request a Feature](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=Feature%3A+)\n·\n[Ask a Question](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n\n</div>\n\n---\n\n## Overview\n\nThis package provides Clerk Backend API core resources and low-level authentication utilities for JavaScript environments. It is mostly used as the base for other Clerk SDKs.\n\n## Getting Started\n\n### Installation\n\n```sh\nnpm install @clerk/backend-core\n```\n\n### Build\n\nTo build the package locally with the TypeScript compiler, run:\n\n```sh\nnpm run build\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities, without being platform/environment, specific such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendApi](./src/api/ClerkBackendApi.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendApi` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n## Usage\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendApi](./src/api/ClerkBackendApi.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://reference.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendApi.ts#17) implementation.\n\n## Support\n\nYou can get in touch with us in any of the following ways:\n\n- Join our official community [Discord server](https://discord.com/invite/b5rXHjAg7A)\n- Open a [GitHub support issue](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n- Contact options listed on [our Support page](https://clerk.dev/support?utm_source=github&utm_medium=clerk_backend_core)\n\n## Contributing\n\nWe're open to all community contributions! If you'd like to contribute in any way, please read [our contribution guidelines](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/CONTRIBUTING.md).\n\n## Security\n\n`@clerk/backend-core` follows good practices of security, but 100% security cannot be assured.\n\n`@clerk/backend-core` is provided **\"as is\"** without any **warranty**. Use at your own risk.\n\n_For more information and to report security issues, please refer to our [security documentation](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/SECURITY.md)._\n\n## License\n\nThis project is licensed under the **MIT license**.\n\nSee [LICENSE](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/LICENSE) for more information.\n","engines":{"node":">=14"},"gitHead":"241d0336a3b1c311799f2b3a6815fec35c0d434e","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.15.0+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.15.0","dependencies":{"tslib":"^2.3.1","node-fetch":"^2.6.0","@types/node":"^16.11.55","@clerk/types":"^3.9.0-staging.2","query-string":"^7.0.1","snakecase-keys":"^5.1.2","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.4.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","typescript":"^4.6.4","@types/jest":"^27.4.0"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.7.0-staging.5_1664798120169_0.9680250579671281","host":"s3://npm-registry-packages"}},"2.7.0":{"name":"@clerk/backend-core","version":"2.7.0","license":"MIT","_id":"@clerk/backend-core@2.7.0","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"cd2d8a250bfbe6d1e85c89013132720fc32dce76","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.7.0.tgz","fileCount":323,"integrity":"sha512-dCeWoU0NG8mQdT5BPLC1SAkiiEjvrBtrDMJOCScMKCdLKhrXSEv2FMVOqHml8kIiB5mUqwjjw/7GuTUU1D7Pdg==","signatures":[{"sig":"MEUCIQDeI01HObw5HE3NKOc38dzVSGqkQFWl6z45SMkYPVFULAIgL1kPm4GResJSEjsXR+Mnxm/XcQ/GCxYG98Dz8LxCw64=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":550699,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjOuvMACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpWbBAAgBsmEdo60cDXNa6KGf1owUcrEgIZzUcb1CwgWDxUtfseG78c\r\nfdWS7jcqWavdeuh4NVYNyLFgARwdEuOJpf35Jp0J3wZchULQ693dDcqm/Zqf\r\n1APign/54dyWz8wfTUfUJBsIpQcK3E9yizon6UWvrZW7KyusnZTjHAO5OhaL\r\novJ6f4ebkVWZFaQgBmQOFOJzutxwXy4UwXlnu311Z1CRVv4IJEyQr6uvfi0K\r\nnkUQlOZSdU9m3IcrUtuz+nS09EYFeEBnO6Uiyir9eJTkfuIqi1d/t9GYQSek\r\nVa5frHHz04AnmrxNNmuTIIZO+pFUyWXfVA+lHGn70ZQgPe6pQiLUSdOF3KKG\r\nDx4k87ACrGO+qpQ+psiX7oHiUOWWwhI9S9Whe2gd7lBdo475XubcfG+wVi1s\r\npMRFubpu/O8xygSd+pT1whTmCpRD9beQsUKLlXZEmVYMTck6RFZtdkpEsANr\r\n1/6XYrAfxVt1SWo7QJcNf9PqCy75wYNYCX/Y9G+AvTNfYjySxBVBNgPmGrM9\r\nXDlq3d9Z86e0MQ/ONfBTIkJke8H7H0/oeB84gmMrfgFut7bLgBW+Xb/4vYjE\r\nOUfx6h24mRpEtDSov8X1ojGs7mwdtJnqSrQ41Wk4qQ9TK5dj9l25P0l3ho6P\r\ny2YC5p3WTF04v2APnMZKmvwn9qpcQiK49Mc=\r\n=Klq1\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","engines":{"node":">=14"},"gitHead":"1c5176c72875bab42c644fad43a591a1f3ae7ff5","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.15.0+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.15.0","dependencies":{"tslib":"^2.3.1","node-fetch":"^2.6.0","@types/node":"^16.11.55","@clerk/types":"^3.9.0","query-string":"^7.0.1","snakecase-keys":"^5.1.2","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.4.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","typescript":"^4.6.4","@types/jest":"^27.4.0"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.7.0_1664805836606_0.794891675923411","host":"s3://npm-registry-packages"}},"2.8.0-staging.0":{"name":"@clerk/backend-core","version":"2.8.0-staging.0","license":"MIT","_id":"@clerk/backend-core@2.8.0-staging.0","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"0feff16290d5b5863b751be20fbfcebe375140b6","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.8.0-staging.0.tgz","fileCount":323,"integrity":"sha512-I2QJejMgR6/PU8UAyXZy7h+tvRJb1kvtkbPMtH36sL4cyp9yTn/2M3A1eoc7vdFc8EJMKe9OPB6yeAgE/pVDYw==","signatures":[{"sig":"MEUCIFLLKnYXdceyX+pTPgtFiK/zk59w3E/9zo9eIWMWmbUBAiEA0MvfIvebOrgSoMGdYUToWX0wy+gVWnU4HuDWe85DrrE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":551140,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjPUL1ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmrb7Q/9FbnzyDhoyC64bv+y7+rSTPPY5sIbHWd4iSg4k/i1kDU9C8vP\r\n8c8YXqBdnFZIuE64RFOAbmwfiIFqVuAV4OrnvvxiS+h9t5bREVqJIs9dLJ/7\r\n0pMLCWd/F6hzttEckHP0O0bfs4pZBcu34MeUuIJ9tEN5FGVCpadoGnzkPOYY\r\nsoYdRpxp7sjeMStWPOBeWMjECr+rd1OXiZK2NW5K9KXW7lVdbpcYnn2T/Nd/\r\n2k0dCB6xocSZWWO1/m0Tqctunpx7s/eum7sYCax5CyE8YXrwtFjnXwm7DczK\r\nLBre+WHNw3Hd8qmRiwUTOkpyD/G28DTYWcCM1mq9NMX4zNJoinyErBnBrkCa\r\n/EhcnRO171AzkrImr+qyTd00XecBreZsHfZHuVuOumDiZqh7LI7ohibt2yRP\r\nUWEMe1cxhWTM4dq9dYRDyjshwFT/KVdfl7gVN+srQNA5f6lQNtXAM8guugYW\r\nu7x5a2Vt16DOMkaChuJyX2J5kv01sFfgffH9X35GA+oPLl9Vud0tiy257mD2\r\nZF9/7k12+GkjRrLzq7tcc7iBziQLHBN7aWSgGZUB2OCBPe8ie7dP29Kb77+Y\r\neZZACfu4Ls8kbfpthAPNjpaCmP5OJpWK13JQLXhPEK1YMjnoHbizFFMekSBB\r\npjy7Xb/zUICOkGIMgJf6Fvs2G/qwCrLiUDM=\r\n=YCog\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev?utm_source=github&utm_medium=clerk_backend_core\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <img src=\"https://images.clerk.dev/static/clerk.svg\" alt=\"Clerk logo\" height=\"50\">\n  </a>\n  <br />\n</p>\n\n# @clerk/backend-code\n\n<div align=\"center\">\n\n[![Chat on Discord](https://img.shields.io/discord/856971667393609759.svg?logo=discord)](https://discord.com/invite/b5rXHjAg7A)\n[![Clerk documentation](https://img.shields.io/badge/documentation-clerk-green.svg)](https://clerk.dev/docs?utm_source=github&utm_medium=clerk_backend_core)\n[![Follow on Twitter](https://img.shields.io/twitter/follow/ClerkDev?style=social)](https://twitter.com/intent/follow?screen_name=ClerkDev)\n\n[Changelog](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/CHANGELOG.md)\n·\n[Report a Bug](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=bug&template=bug_report.md&title=Bug%3A+)\n·\n[Request a Feature](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=Feature%3A+)\n·\n[Ask a Question](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n\n</div>\n\n---\n\n## Overview\n\nThis package provides Clerk Backend API core resources and low-level authentication utilities for JavaScript environments. It is mostly used as the base for other Clerk SDKs.\n\n## Getting Started\n\n### Installation\n\n```sh\nnpm install @clerk/backend-core\n```\n\n### Build\n\nTo build the package locally with the TypeScript compiler, run:\n\n```sh\nnpm run build\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities, without being platform/environment, specific such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendApi](./src/api/ClerkBackendApi.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendApi` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n## Usage\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendApi](./src/api/ClerkBackendApi.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://reference.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendApi.ts#17) implementation.\n\n## Support\n\nYou can get in touch with us in any of the following ways:\n\n- Join our official community [Discord server](https://discord.com/invite/b5rXHjAg7A)\n- Open a [GitHub support issue](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n- Contact options listed on [our Support page](https://clerk.dev/support?utm_source=github&utm_medium=clerk_backend_core)\n\n## Contributing\n\nWe're open to all community contributions! If you'd like to contribute in any way, please read [our contribution guidelines](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/CONTRIBUTING.md).\n\n## Security\n\n`@clerk/backend-core` follows good practices of security, but 100% security cannot be assured.\n\n`@clerk/backend-core` is provided **\"as is\"** without any **warranty**. Use at your own risk.\n\n_For more information and to report security issues, please refer to our [security documentation](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/SECURITY.md)._\n\n## License\n\nThis project is licensed under the **MIT license**.\n\nSee [LICENSE](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/LICENSE) for more information.\n","engines":{"node":">=14"},"gitHead":"4ca3524b269f2033fc74b4c6b40c61a375e0c45c","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.15.0+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.15.0","dependencies":{"tslib":"^2.3.1","node-fetch":"^2.6.0","@types/node":"^16.11.55","@clerk/types":"^3.10.0-staging.0","query-string":"^7.0.1","snakecase-keys":"^5.1.2","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.4.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","typescript":"^4.6.4","@types/jest":"^27.4.0"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.8.0-staging.0_1664959221248_0.7881150975173705","host":"s3://npm-registry-packages"}},"2.8.0":{"name":"@clerk/backend-core","version":"2.8.0","license":"MIT","_id":"@clerk/backend-core@2.8.0","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"ce53def6669244ee87203e63cc159f89dfcdae77","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.8.0.tgz","fileCount":323,"integrity":"sha512-DeX66UYiPIdrJoykDoEphwbqe9zNA0xS3YVdOOewCEEpLB3c6Jaf61bW2xhYdA0EgUYE4mU5s4JpB8S8nqrHtg==","signatures":[{"sig":"MEUCIFSolu7m1i5egQAxAyupUrtjDaPaup97AIyJ5kmWJQFSAiEA6N8pcJah53YYALq8/fEbONk3/fa6DV4C9x673wFX05o=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":551318,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjPUsRACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqxHg/+NgvpSkK94wLiuqyvn8SpX1g2S10mhjKYQjBwac/5OOlFvlTZ\r\nrwMwnlvB6xuTpK76YpeAnJbx5OYx49z226j8Xo7Nv1CnWJlb9Zkbj57GgxzN\r\nLzw1IH7b5+lobK0+7SoPlxop6wEovdv/jyojQy1NkSDqYI/IfFsGH7J8pfV0\r\n0q6dpZpjw9ov9ojSjeYtBvUVOfn/2RvEAaKEqXvEuHpP1ZYt/qdQlMuOzoZ8\r\n3A3TTVHbpKxD0Ymt3oshBehXvya5K1FO/H2YX5GuPKdvdizSDSITb/bdy6C6\r\nHnxMcqOieS/dC0Dq0XS0sIa8NKKvqWf1+SFueK7tXe2eoxSzqvamrMxu4k1w\r\n21ooZiWsnRKirlgCaS3YMfm1UYXPFunzj/yuNZ4ItLkR39KEFT5XOYAfjKAU\r\nn4GMlDv4uppyt/UBY3L0qt/obAcUEaeP9l6YmLudLcMZgyRbA7KsatQb9rY4\r\n+0o8sX1vhGrWiSgmDSFiea13RMZhFT4E7RKupdkcP0Vz9m0MsEwZNnRGA/3f\r\nVFRWH34il8sgbFvnAT7b/XqU6FgZ1NyAma9F0JU10zbcxTu2f3lvGkFXMjYW\r\nsAIL5ydTUFbAE4Iwc/HYoP5J/dkafGFa00xfGApon6bX2i4o3jGZi+FAGngV\r\nohKMWn+kulp0oNAtL3dzDOEVTktYjS0CNpc=\r\n=9uLA\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","engines":{"node":">=14"},"gitHead":"88fffadc8eee8fa56595db6659bf47e799db7516","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.15.0+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.15.0","dependencies":{"tslib":"^2.3.1","node-fetch":"^2.6.0","@types/node":"^16.11.55","@clerk/types":"^3.10.0","query-string":"^7.0.1","snakecase-keys":"^5.1.2","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.4.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","typescript":"^4.6.4","@types/jest":"^27.4.0"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.8.0_1664961296821_0.5371760549887119","host":"s3://npm-registry-packages"}},"2.8.1-staging.0":{"name":"@clerk/backend-core","version":"2.8.1-staging.0","license":"MIT","_id":"@clerk/backend-core@2.8.1-staging.0","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"d16bff4b58bef5b587671ba1733e5570631b85b3","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.8.1-staging.0.tgz","fileCount":323,"integrity":"sha512-h8eGpK2xUW0XxUiYP1g5WlAdYHXDh4S4OIJbfGdkJTOagP1oN4HDHXx0NLz2JU11wWCHaowG5r0mXBO9G0qrcg==","signatures":[{"sig":"MEUCIQC2XgB/3kli9x3IcvpqpJSakB57BCfaDULcZ0EFqZFfvQIgHDMTJZzNuj3JXIYXM5V/tgU6z9nzzmTAZTeiroVl9Ok=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":551338,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjPsQXACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoV9g/8CWpACghSHt+P7Ljwn06Vlkm9x5RG1A7+vd0ZjwNjU06KtSoE\r\ne5/UKhsVxXmV7unHigXZIleFIbm6tEynOHgW9uGQ2P/mXf2wcBz8JFRk6fk6\r\nK+Lbw+F28qIsuBTf4oDoSp45JxtwH1kNwtoMuF5vMgGUk23Q+TFNJHduIJl+\r\ns8lHUKopVw7ay8PlU+ACQtjEvBKq7AWyndTszSHCusI7YK4u8mDiKA0x5p78\r\nTRUAVyfhTRCmrR47YTd48BAvhr9CKFT/zvLnuBa5bi88491jbkub3yCAUC/Z\r\nZtasz3VvFmSdkihilLDvqFvCT5k7HyqB0lgu0uQmEqS7rlTFFIquJo9ALkKP\r\nSgkl51IRlbLSs1iK4MfdYr9UM73MzJkUgh5lsvH6mvNqaj21LH4H86lvAjM1\r\nOGN04XaWr12GzeKU+ZBofQBcQSIVUVuDkwaiVksRgopSWC9CRHxRgjWPBbbj\r\n7/gYdfm1uA1W7QllUYIjqP+r1E5I6sEwVvp72okxqySmqJGcA7oEie00J71u\r\ntuxyjurPRs0F/nZnIjZEqoz0g/xSSzHpwtxNVenm73P8GSTcOmQN/MYKNh32\r\nfOxtWzaF1jrOCZUOYxKDS2stLmOOuzm7X3T39iu+q0duHY3jQF2M18wV+38w\r\n7ZBgtCsaYSm42ZHrKCbr7uOYYvVxjMmrD30=\r\n=QaHI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev?utm_source=github&utm_medium=clerk_backend_core\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <img src=\"https://images.clerk.dev/static/clerk.svg\" alt=\"Clerk logo\" height=\"50\">\n  </a>\n  <br />\n</p>\n\n# @clerk/backend-code\n\n<div align=\"center\">\n\n[![Chat on Discord](https://img.shields.io/discord/856971667393609759.svg?logo=discord)](https://discord.com/invite/b5rXHjAg7A)\n[![Clerk documentation](https://img.shields.io/badge/documentation-clerk-green.svg)](https://clerk.dev/docs?utm_source=github&utm_medium=clerk_backend_core)\n[![Follow on Twitter](https://img.shields.io/twitter/follow/ClerkDev?style=social)](https://twitter.com/intent/follow?screen_name=ClerkDev)\n\n[Changelog](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/CHANGELOG.md)\n·\n[Report a Bug](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=bug&template=bug_report.md&title=Bug%3A+)\n·\n[Request a Feature](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=Feature%3A+)\n·\n[Ask a Question](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n\n</div>\n\n---\n\n## Overview\n\nThis package provides Clerk Backend API core resources and low-level authentication utilities for JavaScript environments. It is mostly used as the base for other Clerk SDKs.\n\n## Getting Started\n\n### Installation\n\n```sh\nnpm install @clerk/backend-core\n```\n\n### Build\n\nTo build the package locally with the TypeScript compiler, run:\n\n```sh\nnpm run build\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities, without being platform/environment, specific such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendApi](./src/api/ClerkBackendApi.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendApi` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n## Usage\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendApi](./src/api/ClerkBackendApi.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://reference.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendApi.ts#17) implementation.\n\n## Support\n\nYou can get in touch with us in any of the following ways:\n\n- Join our official community [Discord server](https://discord.com/invite/b5rXHjAg7A)\n- Open a [GitHub support issue](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n- Contact options listed on [our Support page](https://clerk.dev/support?utm_source=github&utm_medium=clerk_backend_core)\n\n## Contributing\n\nWe're open to all community contributions! If you'd like to contribute in any way, please read [our contribution guidelines](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/CONTRIBUTING.md).\n\n## Security\n\n`@clerk/backend-core` follows good practices of security, but 100% security cannot be assured.\n\n`@clerk/backend-core` is provided **\"as is\"** without any **warranty**. Use at your own risk.\n\n_For more information and to report security issues, please refer to our [security documentation](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/SECURITY.md)._\n\n## License\n\nThis project is licensed under the **MIT license**.\n\nSee [LICENSE](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/LICENSE) for more information.\n","engines":{"node":">=14"},"gitHead":"8d84dfa026e7e1a0ab7eb6506206e9c854e92cf7","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.15.0+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.15.0","dependencies":{"tslib":"^2.3.1","node-fetch":"^2.6.0","@types/node":"^16.11.55","@clerk/types":"^3.10.1-staging.0","query-string":"^7.0.1","snakecase-keys":"^5.1.2","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.4.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","typescript":"^4.6.4","@types/jest":"^27.4.0"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.8.1-staging.0_1665057814943_0.7592521158971277","host":"s3://npm-registry-packages"}},"2.8.1":{"name":"@clerk/backend-core","version":"2.8.1","license":"MIT","_id":"@clerk/backend-core@2.8.1","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"128c41595633829c6728a4a8d065d4a19f7b7401","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.8.1.tgz","fileCount":323,"integrity":"sha512-R3nK4sQqzuEWAdcM+zSoSeJFBbi8xmAWu7hL/nOkGiaPZhlA8KP6btY+EjkQlyoON6wNmxeasZK0RHnB/jG3bQ==","signatures":[{"sig":"MEUCIQCZwC0TTJbgI9Rr3RLvnyzYEd1xBpM4+8pNczIReObKMgIgPL6H3g2iiveYj5JM7hZpqAZfYN3ogtIdx/ZNAKDNyEw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":551517,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjQFZcACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoozA/+MccWBjT+gwHTg5Qht9D8HF2GoCgHpWDw+DXtY7ipOZfBXRqX\r\nGgeEZ1JPs6aBytHFumDgn4XOMT8de613orHQBKG/7UdilfS7PhHz98EpsKPW\r\nX3LVtNcViLq6yTYqzUZasi7zXNTuujhfnskMb+g0hx453ySv/cARmSJkUltb\r\nLnnG19FJ0X5AAFXhkyeVSmhhDsts/VCwZg3HR6Bj+Q+6hbATmhKcK4bZQBHK\r\nz+eurQRJz5axaoQTH8Gmm9U/pAqPFk0UwR7MjcIp5wg4uRSbl9/T3wAyHw1c\r\nE4TiWjIFxlad28BNTklxqINzIzzjzcSZDGvovSXGodKun8RyWi6JJpcwUaz/\r\nDwdd/juUCLoUCdKdqdJDHWxtLRMsNDwhbXBOvmZNiuxJpEiY1sh28sdlwLRP\r\nL02DoSqJqF+wLwtuTwGSkSm/9rEcM+5tSDew7mVqVfXsnsjhzHVR+41k2Q6m\r\nw23mOB203Z7jC1LY1BFk7aBHuZVDf//lPjfLxrZKPCL76WPeq1AMzZ3INGjC\r\nuKv4qlcFOIVNElufbfhQZx23E65LQCvEVrkiNVUSqnm/oaaTX1hP/fkAuPNo\r\nY4UFD6YSnbztecyWfrz0KGIu/XT3f1ObaYcWjbgB/hIAdHUK1VoaU3RyMZ2U\r\n33zLNFM1JMOBtFuIKyzn4pFLbV39GhKfu6E=\r\n=J7Wv\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","engines":{"node":">=14"},"gitHead":"ea1b3032efc8f13046762b468abe2d7a7e90c26a","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.15.0+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.15.0","dependencies":{"tslib":"^2.3.1","node-fetch":"^2.6.0","@types/node":"^16.11.55","@clerk/types":"^3.10.1","query-string":"^7.0.1","snakecase-keys":"^5.1.2","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.4.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","typescript":"^4.6.4","@types/jest":"^27.4.0"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.8.1_1665160796520_0.329608372414228","host":"s3://npm-registry-packages"}},"2.8.2-staging.0":{"name":"@clerk/backend-core","version":"2.8.2-staging.0","license":"MIT","_id":"@clerk/backend-core@2.8.2-staging.0","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"0c1b386954f35cf4787107486dcf729047575689","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.8.2-staging.0.tgz","fileCount":341,"integrity":"sha512-GtDUYLAH+3YBUbsI6Sndi+xn/DyBZBgKvIFZQCdsnJKn3lUHCSdjCXZZ7NMDhz+dfOzzXJ4LhXatnnjdZoIRDA==","signatures":[{"sig":"MEUCIBt4yTTItELZZeqOchJMGr27MKWcRNgCDXo3BdxbQA/tAiEA2JVivW+1kQb8DkUT8g9zgXPqnBqykL7oFg1/KC7Xid0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":575643,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjSF6mACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoCpg/9F3FCKcAmyx76qu1tPhz3WLqY0MSeecubC+GBL/7SYBnW7Be3\r\nEPmz2rqyiWG5sk3wsrk2ZtddJLUTHq9trISAHJLeCn3SHnu5D7YVfcFrX6DZ\r\npr+Nog8QqnEJvCVnAfrECmZk29kP0TDBcD7Z1u0z3GDl6PxJEttHlONGg5u3\r\nkUrgdnaBvW50/Iq9sj2HlpDPqQssx1C2RUecTMaSm4PPVIL3WQNuts83PFeQ\r\nVew6ToePbyHSJZrOtFlo7xZ6SPg8iqQOO7NN7pyLJXGILMx0zXd6jA8Va6tC\r\nqfW5Fn7MTty6S4dVa1hq98p7RsqY4XB/s8pce1nT4JQBU8/Oc43HMLprZHda\r\nL30/jOP/7fO6tZ1gTY/f8FpJVwEUESV1LNal03OZ3BVd6vIFY61YVYZ1rExW\r\ndkPSdPOrwZ4y1gX4CNK/P6d1tUa2uGlQsL1z9LOOps0lLrHmYT+mDEG50WOd\r\n1vtbBG/FNApvEFNFgs/NEV7jsjxlUNoh+hBmTCDqIFTQ1pz59ErSy89riE6V\r\nJYwikVwba7RhH1UhpQOqHdRo983WM2DF78jj3PysAFbMbkoUTwpe1fo9lMBt\r\n/f0PA4hFruovJhSt03cD1LZYK4JYCyFAIvk0ySDpnVwRKWAaUspmY8PxeYWt\r\n3XzRwXIIaZLZ/6MbTP1UCI0bZoXZIXF/D6Y=\r\n=pstq\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","types":"./dist/cjs/index.d.ts","module":"dist/mjs/index.js","engines":{"node":">=14"},"gitHead":"1b19a43b61f712756ab4d8c9ccbee6e8bddbe4ce","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","lint":"eslint .","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix","clean":"rimraf ./dist"},"_npmUser":{"name":"sokratis","email":"sokratis.vidros@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"8.15.0","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.13.0","dependencies":{"tslib":"^2.3.1","node-fetch":"^2.6.0","@types/node":"^16.11.55","@clerk/types":"^3.11.0-staging.0","query-string":"^7.0.1","snakecase-keys":"^5.4.4","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.4.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","typescript":"*","@types/jest":"^27.4.0"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.8.2-staging.0_1665687206166_0.13730974815764196","host":"s3://npm-registry-packages"}},"2.9.0-staging.0":{"name":"@clerk/backend-core","version":"2.9.0-staging.0","license":"MIT","_id":"@clerk/backend-core@2.9.0-staging.0","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"9738919b4972f0e4f0af940e9da6c6aed119f45f","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.9.0-staging.0.tgz","fileCount":341,"integrity":"sha512-cd//VWp7aGvKdLdUEtPu3wJxsZ67hAe0eBb9Ro7TB48wkwT+VvTIaJJJPgOsSVlqr0B1uaxEAxL1J+iYAzVTyQ==","signatures":[{"sig":"MEUCIE/3mKDWimrzE8mDUncHbJa56EoRUWFQz1NUr5Hgn5hcAiEA4tACmkRUvYcpeGtg5KfeCDPvX4DepbG8F3gF5ZQclVU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":576485,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjSGMnACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqJ0g//Zoo+FesHW6tcUuMna5t9+LdN2zIx3g7JWx8tg8gTiLAwVWUk\r\nQCEhZgMmg15aInyiYOm/5vJiZj7icLSVuoNlrr/KqJ3UD+GZecBWClelHufn\r\n2oy5CVjHP05BZQxKI48iZrhNM0ZvwVoGBeWc5ajiEIVbXA7XdxhofIg9b1jz\r\n8xSwYhw2vfY+gVojZI06H86EOxN2i+NjEZj7sPw2Xu3dmYvJ3u4CWH9OQSKm\r\nHcxfuGa6L5OcIqhkeCXA363GRyIFgYOY9Bv6YZ0MFtqynHOCt6vBOzTF2WgN\r\n6yencuuh1jZNfPgPBw9u9I3vYQAG7pRos0kHtZAhUn4VYWURaxe6xaMo1sVm\r\ntDLRQGCBXU/Hh3EPii/96jcTYTKbxHn+Zd8jvyXPlse6vpdrqvwgQzNveaAY\r\nSL8Qt/kiZZd/0KdVWPfNBrJgY74AD1XFV+Gl31baV824m/mzembCYvY3jzbX\r\nqMpYqxUbs8bQyf1j9kdOZ7iOs2yqIFyg5hGy8tRiynAeBBS0+edP88Ip0cMR\r\nf1G+5H0+eS2Exm38aOYdgMCK/AEJpxQjSrQEvyHxPGN8HgFkDYfEdu5+Dftg\r\nbVWTzQ4p73DeH46AFu/6Vx+f2Ohs9rRHqMUk1smHQ539ckAaWL3oM0PSYTxB\r\ncGWQjuYrgch64U8FUin+EExdhJjYcByEjzY=\r\n=1L88\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev?utm_source=github&utm_medium=clerk_backend_core\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <img src=\"https://images.clerk.dev/static/clerk.svg\" alt=\"Clerk logo\" height=\"50\">\n  </a>\n  <br />\n</p>\n\n# @clerk/backend-code\n\n<div align=\"center\">\n\n[![Chat on Discord](https://img.shields.io/discord/856971667393609759.svg?logo=discord)](https://discord.com/invite/b5rXHjAg7A)\n[![Clerk documentation](https://img.shields.io/badge/documentation-clerk-green.svg)](https://clerk.dev/docs?utm_source=github&utm_medium=clerk_backend_core)\n[![Follow on Twitter](https://img.shields.io/twitter/follow/ClerkDev?style=social)](https://twitter.com/intent/follow?screen_name=ClerkDev)\n\n[Changelog](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/CHANGELOG.md)\n·\n[Report a Bug](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=bug&template=bug_report.md&title=Bug%3A+)\n·\n[Request a Feature](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=Feature%3A+)\n·\n[Ask a Question](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n\n</div>\n\n---\n\n## Overview\n\nThis package provides Clerk Backend API core resources and low-level authentication utilities for JavaScript environments. It is mostly used as the base for other Clerk SDKs.\n\n## Getting Started\n\n### Installation\n\n```sh\nnpm install @clerk/backend-core\n```\n\n### Build\n\nTo build the package locally with the TypeScript compiler, run:\n\n```sh\nnpm run build\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities, without being platform/environment, specific such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendApi](./src/api/ClerkBackendApi.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendApi` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n## Usage\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendApi](./src/api/ClerkBackendApi.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://reference.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendApi.ts#17) implementation.\n\n## Support\n\nYou can get in touch with us in any of the following ways:\n\n- Join our official community [Discord server](https://discord.com/invite/b5rXHjAg7A)\n- Open a [GitHub support issue](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n- Contact options listed on [our Support page](https://clerk.dev/support?utm_source=github&utm_medium=clerk_backend_core)\n\n## Contributing\n\nWe're open to all community contributions! If you'd like to contribute in any way, please read [our contribution guidelines](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/CONTRIBUTING.md).\n\n## Security\n\n`@clerk/backend-core` follows good practices of security, but 100% security cannot be assured.\n\n`@clerk/backend-core` is provided **\"as is\"** without any **warranty**. Use at your own risk.\n\n_For more information and to report security issues, please refer to our [security documentation](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/SECURITY.md)._\n\n## License\n\nThis project is licensed under the **MIT license**.\n\nSee [LICENSE](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/LICENSE) for more information.\n","engines":{"node":">=14"},"gitHead":"7226373edb46763ce006eeba4716d99c16fec47e","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","lint":"eslint .","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix","clean":"rimraf ./dist"},"_npmUser":{"name":"sokratis","email":"sokratis.vidros@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.13.0+x64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.13.0","dependencies":{"tslib":"^2.3.1","node-fetch":"^2.6.0","@types/node":"^16.11.55","@clerk/types":"^3.11.0-staging.1","query-string":"^7.0.1","snakecase-keys":"^5.4.4","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.4.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","typescript":"*","@types/jest":"^27.4.0"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.9.0-staging.0_1665688358915_0.41929008382360955","host":"s3://npm-registry-packages"}},"2.9.0-staging.1":{"name":"@clerk/backend-core","version":"2.9.0-staging.1","license":"MIT","_id":"@clerk/backend-core@2.9.0-staging.1","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"eb700e07fa7372ada32de9eb4915b6b0ed989bf3","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.9.0-staging.1.tgz","fileCount":323,"integrity":"sha512-HJeJ8IrpFDivqNhSDn+hZSY0ok/qAkRbqNN5iCOeeOkjsrWaJX+oTMAo/vxXe9K2K9nxeIUJYxlMu30p0x1Ygg==","signatures":[{"sig":"MEQCIHTjpVMtXMncXrBgndIoczT+49LpYWROGS5UhxcfhTF2AiBhfSvGWAhlLQ0ANSOV+vst3UbnlIxf66gbdp6ihahzZA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":552568,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjSSjLACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmphlxAAiBgz9PEuMKJLx5bRTCHGJjm7MVmlqfjTA5kvINms7PawsBJa\r\n2+eFWMbxOkZDqEGbvjlRUb5rjprxhwT5ow/7KctYNdbfhKbP2ydZ1hqCxUqv\r\nhtopugXDpWxUR/VayoWja/2vwxI2OmdZmCAylYb8VFqhkaMr0oxCftu5SCLB\r\nXhxTXJDxsfk8bwKdq3k9aBZkiOzjH7lvGAXa46WK3tUT/GF2zsTZoMsrCaXj\r\n+yncJY09437nAeFLOHU0PUqH9NiWNCzX6ZR0O9iJNBRVSCOX7ENlGMEc1K0/\r\n+bB9gzNj9V0+Y6a4w+gGargo72uIlOwiaSzcRbnKKDLGuQ8sCoXlzmpWxQWj\r\nnvlEGigORA0jLqHr9i7QAq4D0RdfbP8akwk0Rj5KfsHZ7NHlSfDpb82VyhY2\r\noYCqzbJDi9KI+Gu+2vNvfwsZE2DGIJVMHk4C7rFmIVRO/p+VTDTeAKFAbA86\r\nAe4sd9eoUwSI8e4BEJgNn3W6jpby6OxtB4x8eOtoXoJZo4vLoITYpIxcYv40\r\nA+XGbX4Sv/A+EidPUafKMNwbTl+mMhQAMS9/tGde/Pt5/IjcjbpkyxJrES2m\r\nsXTilsHY0zgDzHfIoEKPHpIDA+542eINy6JDEI7EUjwY+/3+813fwoKIfw1L\r\nfBLccUvyJnu3DuBG8t/KwOpPhJojSdBupJM=\r\n=ONSL\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev?utm_source=github&utm_medium=clerk_backend_core\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <img src=\"https://images.clerk.dev/static/clerk.svg\" alt=\"Clerk logo\" height=\"50\">\n  </a>\n  <br />\n</p>\n\n# @clerk/backend-code\n\n<div align=\"center\">\n\n[![Chat on Discord](https://img.shields.io/discord/856971667393609759.svg?logo=discord)](https://discord.com/invite/b5rXHjAg7A)\n[![Clerk documentation](https://img.shields.io/badge/documentation-clerk-green.svg)](https://clerk.dev/docs?utm_source=github&utm_medium=clerk_backend_core)\n[![Follow on Twitter](https://img.shields.io/twitter/follow/ClerkDev?style=social)](https://twitter.com/intent/follow?screen_name=ClerkDev)\n\n[Changelog](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/CHANGELOG.md)\n·\n[Report a Bug](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=bug&template=bug_report.md&title=Bug%3A+)\n·\n[Request a Feature](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=Feature%3A+)\n·\n[Ask a Question](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n\n</div>\n\n---\n\n## Overview\n\nThis package provides Clerk Backend API core resources and low-level authentication utilities for JavaScript environments. It is mostly used as the base for other Clerk SDKs.\n\n## Getting Started\n\n### Installation\n\n```sh\nnpm install @clerk/backend-core\n```\n\n### Build\n\nTo build the package locally with the TypeScript compiler, run:\n\n```sh\nnpm run build\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities, without being platform/environment, specific such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendApi](./src/api/ClerkBackendApi.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendApi` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n## Usage\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendApi](./src/api/ClerkBackendApi.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://reference.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendApi.ts#17) implementation.\n\n## Support\n\nYou can get in touch with us in any of the following ways:\n\n- Join our official community [Discord server](https://discord.com/invite/b5rXHjAg7A)\n- Open a [GitHub support issue](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n- Contact options listed on [our Support page](https://clerk.dev/support?utm_source=github&utm_medium=clerk_backend_core)\n\n## Contributing\n\nWe're open to all community contributions! If you'd like to contribute in any way, please read [our contribution guidelines](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/CONTRIBUTING.md).\n\n## Security\n\n`@clerk/backend-core` follows good practices of security, but 100% security cannot be assured.\n\n`@clerk/backend-core` is provided **\"as is\"** without any **warranty**. Use at your own risk.\n\n_For more information and to report security issues, please refer to our [security documentation](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/SECURITY.md)._\n\n## License\n\nThis project is licensed under the **MIT license**.\n\nSee [LICENSE](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/LICENSE) for more information.\n","engines":{"node":">=14"},"gitHead":"d782bbbc45cd96cb58cfd266e7a25d07fdc5a696","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","lint":"eslint .","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix","clean":"rimraf ./dist"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.15.0+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.15.0","dependencies":{"tslib":"^2.3.1","node-fetch":"^2.6.0","@types/node":"^16.11.55","@clerk/types":"^3.11.0-staging.2","query-string":"^7.0.1","snakecase-keys":"^5.4.4","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.4.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","typescript":"*","@types/jest":"^27.4.0"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.9.0-staging.1_1665738955566_0.07891935517300142","host":"s3://npm-registry-packages"}},"2.9.0":{"name":"@clerk/backend-core","version":"2.9.0","license":"MIT","_id":"@clerk/backend-core@2.9.0","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"38a7c6eacc316f0c32eafc2ee509bef46a3bcf3a","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.9.0.tgz","fileCount":323,"integrity":"sha512-AzxMdkMDIhPqhDU9fhGu3RO+E7S1shIz8cmeH7CKzxsF+r2aG7RyDA5jnD8Eq+2YPpwAkBN2C4XCCBKo0VBKyQ==","signatures":[{"sig":"MEQCIB4hCfhlj23C6ctfvuRCNP3U02S4pxV+UFotj7PDghUhAiAmkwYxefARBQ0wqy1PJVX2Jd50+aC5gUyEbI7Hhx86DA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":552746,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjSTz+ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmotDA/7BCl5jo9jKBGHpLzbJHR6lI7MAv0N+xzSWs4GSFjj9ICtNgyf\r\n8QoCjvSjzQwfoyqk2pgIJtzcFE3IUlQn0jTN/oAyuOG0dEdkfE84WVB9x8+6\r\ne5jn5+NkoiDe8QWD+Fbt6DTxXGu/yTcq7jl81yF3aLKfPOi10JcmgLvHoZsD\r\nt7NJ+qVuNLaVD0omVHJP0P16eCpvy7u6TupKxU09VrTQKnuNZa5iFew5ETVu\r\nCjclDtaFTlt2mguiEPedg8b3wtYrRjLuKj1U7qV+O91ljeEe5yQBKXUt12h1\r\nydD4vindCxTzMznclX7dGHoh1A+rMQ5J1QIh3jGPPsEiK4IkmX+TzfpHd7Sp\r\ngOpGZT+FniZvfhWJlO06L9jAgDQt67qZclopnaKDrWpZLfZUSMa6bPUqDZm6\r\nDgLQ6OVYM7ZMlm0+boUpvyIahL7bnpyurY2pu122Cfgv4yxksCaZd8wXHCc7\r\nIQ5Wg4D0d/tVQO7q80iLpM8cS0JwzGx8yIW7Dwy/V6fcAvi9mn+0OzsGiNhl\r\ntiAkUzWhnbSzQKM6TIXQPvJMglwr3BSWL5K6c1+X6Z5fMAv03JHwK/XVcz2J\r\nqA9wOBrR5wUcxmUl1YSvkCnLjndxxkT/RxLmmnVKxFirm3EVBBasGnQMknLs\r\nj+rPZEBqAL+ivVAAl+pWGnT/0L1YSXH/9rM=\r\n=pFWt\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","engines":{"node":">=14"},"gitHead":"4e4c5a3a45dc330f968decc3a8fb84de416ec592","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","lint":"eslint .","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix","clean":"rimraf ./dist"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.15.0+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.15.0","dependencies":{"tslib":"^2.3.1","node-fetch":"^2.6.0","@types/node":"^16.11.55","@clerk/types":"^3.11.0","query-string":"^7.0.1","snakecase-keys":"^5.4.4","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.4.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","typescript":"*","@types/jest":"^27.4.0"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.9.0_1665744126625_0.586036853900264","host":"s3://npm-registry-packages"}},"2.9.1":{"name":"@clerk/backend-core","version":"2.9.1","license":"MIT","_id":"@clerk/backend-core@2.9.1","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"02639b733673f64d50112c3cddd8e5acf454c5be","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.9.1.tgz","fileCount":323,"integrity":"sha512-C0sK3trQlFGxo4jkDfMXW7tNLksBQn/g/DI5d42l4U2lc8YjRGU29yhWSXB0nq9CDgp7g8uFdIhLh3xOkxjZ3w==","signatures":[{"sig":"MEQCIGfdPd8/WRZSsBMg6Hdc6Z3O/FVZ1cE4NGOVOjxr9o4GAiBtiRmGCckMMr2aKjA0aSXInXesjWV1SwRRs35UQ7JCug==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":552935,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjSW0zACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqh4Q//acA4+bgmyA6eiVD6ZMuUC3wa8f7Yct4Tlti41JYvjNXx1oln\r\nZp1IaSytC9LcEom/cuIHdEXpK+88AaoGdACD4ZZHF2xrJ0a7LbnHoFErU87V\r\n70aLhHCrbyI0Bk1V+DptfRFlJBW1QbyFZxiL1u+WHzLWZ9M03Ub56JkNAPK4\r\nI9YnZqBfH+hj3fzouW42E/wnEmOvAtihtcsoIokxnAPP78PKRLLbEnExQhQU\r\nHu5r/JLKlMr5bXRlf00jKJTAv+56AdbwdSzYqfeZJVDyMF0+B8wzeGLUvyOr\r\nDr1nal0VPP0kKgv630HwgYXZdklqJYxH1tSm/VbLylj3wS1iPPlwRRP0XCT4\r\ngrjoUbxlp8s4VWQ83ocrxfbiXUw1ehy5eNZt0Z3lc6++9PSzRkCY6o54cjPu\r\nxpah90z7Uyt6PAd8MogWjvDS9VdUKrm4Vmi5PspcT3KWE7k9QUXg4ZhKzJvM\r\ntC1eh9cwevEWCEVWKJ0Zxu93AARA+PqdR4eoDiUkbS0n/wF1/VZRABbw6+9h\r\n0W0Q+Dx6hPJaw25hkBy0koH+QTevz9yrIS4I2JRoWqv70IrEePFJncqCaMFX\r\nV6vtsIeNhIxGAxQ0h1xUff92VYCIr4s0YWY6IXPry67Yd2PR2/9I2Bc4uFgu\r\nbWtewfJrcKy+pVLujUB2P+qRyG+XqazfAQ8=\r\n=fSU/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","engines":{"node":">=14"},"gitHead":"df5501abf0e4551d65dad169417865c31f2c313a","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","lint":"eslint .","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix","clean":"rimraf ./dist"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.15.0+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.15.0","dependencies":{"tslib":"^2.3.1","node-fetch":"^2.6.0","@types/node":"^16.11.55","@clerk/types":"^3.12.0","query-string":"^7.0.1","snakecase-keys":"^5.4.4","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.4.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","typescript":"*","@types/jest":"^27.4.0"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.9.1_1665756467456_0.12131764654621624","host":"s3://npm-registry-packages"}},"2.9.2-staging.0":{"name":"@clerk/backend-core","version":"2.9.2-staging.0","license":"MIT","_id":"@clerk/backend-core@2.9.2-staging.0","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"d7c3538105822f9d17b6bc1da356a4af2924ab3b","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.9.2-staging.0.tgz","fileCount":323,"integrity":"sha512-28RuEYipXPr5Xc756sCU5ptOZZgy8KDvA+k0tbk1irNjff+kbF42k4EeB/M2E5D/j9hBRyRQXUFPsfzVlq+S1g==","signatures":[{"sig":"MEUCIQCyUU08qgEMxIo1oqY8mfrOkUnsyaTR2/hmTItfln9MjgIgBfpBut8HYl6zOk3zyJn4TdDOXnph74eM6q4fV6YWuEI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":552955,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjUl03ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqBWhAAi1SG7d0xRe/fnoimktRJ+rNLhXn+ecblAKq1vEV7CimK5k1s\r\nvlEM4KZJs6ARbk0R8doUu3IKVMf1iLv5glbgRHBT+gZCq26+gJMWwnw55Kcw\r\n7jgGUkxfQf6v+T9hZBvs3J/ylCAeJLYdA8KlmQpI2ENVQw/0PAXz7C5sl8bd\r\nDE+IOk1U/QqphDl4Y6KVURBfIafRLVybSNwFHiGX22f+PLK8Fh9R0d4ThISc\r\nT1HcNEPeqkDQPZG8HIDih+nnmd1VvbjTBN6a01gP7SdSUtJxgMTiBNcuir0C\r\nCipXektHBsV4L9hJUm+EZHt8O8CWSWIc+97jdJ9SBxTnreI3dkzWw4wGq2YK\r\nWuAOnDTXTZuaPWThaEWZmZUWZ5gzsET/JfwUzKlUawZTGKrP4l/HvbmvfRGh\r\nXmzjcK3ubgfSkMfpm+tq4rCiVuR4McZTm4GTcVp5uvuuuS8HC3LXSi1WY5ec\r\nEiQUYwpH7EFRV/slch1AHkfpRgOVZM0OEGoGGCvywba13+JhuUn0mubmiAhT\r\nBgNPlDF8OpJde4/uivbJY0IjL9bo4n3bxIknuEQCHziop9NU+ePxDuVdiCTR\r\nIP+uDAYsi32zAUQCxzxeL/Xv+RfRJQzxW36ia9xJG52WP23xybDqPTSA8Uck\r\nBi+fR3/xwoASzxxs+0hz2+I2EdrcUHJ9730=\r\n=fKPP\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev?utm_source=github&utm_medium=clerk_backend_core\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <img src=\"https://images.clerk.dev/static/clerk.svg\" alt=\"Clerk logo\" height=\"50\">\n  </a>\n  <br />\n</p>\n\n# @clerk/backend-code\n\n<div align=\"center\">\n\n[![Chat on Discord](https://img.shields.io/discord/856971667393609759.svg?logo=discord)](https://discord.com/invite/b5rXHjAg7A)\n[![Clerk documentation](https://img.shields.io/badge/documentation-clerk-green.svg)](https://clerk.dev/docs?utm_source=github&utm_medium=clerk_backend_core)\n[![Follow on Twitter](https://img.shields.io/twitter/follow/ClerkDev?style=social)](https://twitter.com/intent/follow?screen_name=ClerkDev)\n\n[Changelog](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/CHANGELOG.md)\n·\n[Report a Bug](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=bug&template=bug_report.md&title=Bug%3A+)\n·\n[Request a Feature](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=Feature%3A+)\n·\n[Ask a Question](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n\n</div>\n\n---\n\n## Overview\n\nThis package provides Clerk Backend API core resources and low-level authentication utilities for JavaScript environments. It is mostly used as the base for other Clerk SDKs.\n\n## Getting Started\n\n### Installation\n\n```sh\nnpm install @clerk/backend-core\n```\n\n### Build\n\nTo build the package locally with the TypeScript compiler, run:\n\n```sh\nnpm run build\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities, without being platform/environment, specific such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendApi](./src/api/ClerkBackendApi.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendApi` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n## Usage\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendApi](./src/api/ClerkBackendApi.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://reference.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendApi.ts#17) implementation.\n\n## Support\n\nYou can get in touch with us in any of the following ways:\n\n- Join our official community [Discord server](https://discord.com/invite/b5rXHjAg7A)\n- Open a [GitHub support issue](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n- Contact options listed on [our Support page](https://clerk.dev/support?utm_source=github&utm_medium=clerk_backend_core)\n\n## Contributing\n\nWe're open to all community contributions! If you'd like to contribute in any way, please read [our contribution guidelines](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/CONTRIBUTING.md).\n\n## Security\n\n`@clerk/backend-core` follows good practices of security, but 100% security cannot be assured.\n\n`@clerk/backend-core` is provided **\"as is\"** without any **warranty**. Use at your own risk.\n\n_For more information and to report security issues, please refer to our [security documentation](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/SECURITY.md)._\n\n## License\n\nThis project is licensed under the **MIT license**.\n\nSee [LICENSE](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/LICENSE) for more information.\n","engines":{"node":">=14"},"gitHead":"bc5d381cb4b55b9fea57f9a7afad642cc45f2bdf","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","lint":"eslint .","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix","clean":"rimraf ./dist"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.18.0+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.18.0","dependencies":{"tslib":"^2.3.1","node-fetch":"^2.6.0","@types/node":"^16.11.55","@clerk/types":"^3.13.0-staging.0","query-string":"^7.0.1","snakecase-keys":"^5.4.4","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.4.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","typescript":"*","@types/jest":"^27.4.0"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.9.2-staging.0_1666342199491_0.8598971331303189","host":"s3://npm-registry-packages"}},"2.9.2":{"name":"@clerk/backend-core","version":"2.9.2","license":"MIT","_id":"@clerk/backend-core@2.9.2","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"a473aefcd22af7c40afde9d8607c8e8d5d7f3c97","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.9.2.tgz","fileCount":323,"integrity":"sha512-nhqWOTsAgi9p980MVW5OCkj6/GluKehMCHwVHgUc8bhuuRzzV04pATPMapVdwz+3EkllKFa8O8TITUiw29Oerw==","signatures":[{"sig":"MEUCIQCvQZb0OxL1KoF85KZDDLjjiuIjRczGH1Ak89L+lzsfZwIgUXpty7C4eYCL7XYYa++oT6RiQ4qjUSEDFMM+eo1yAqI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":553134,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjVq3jACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmpcog//apZhC6GB/ySMd3b63Zkn6c5t6VvlQXq+hz6ghNYnoMsrjmnz\r\n1FvibNk0Tw0K8WRaAz6BX+DJbfuHLpSNcAggOhwkbPA9QujHIZ2fn23YNtGC\r\nrYXV/vVX1ePFvDv26IHx+lAoA3VxQ+thhdTyrTVXYXsKHUs9Dg3m0CGY3+gx\r\niuEMsgs6KuhAbirrWPDwbY1yPqsBYZGS5U11SgZcg27TQmOa3of28hpJBHNU\r\neutZ1GqKxSL7y+9Q6TvE3wJa0qE2Q51xUQOE+hhKRbTiyoc9KQr8qZ5wCyIR\r\ns684xBuemKEZWxKJTl4YGHIkM8dgZohxQ1ZtPMt0VH5L1abvZgFcIDE0Qh3E\r\nIGTiReniJLuBLy+eN8qJ9IS3erpG6IBvDYLsqjYcGXE6m3HV9iSxXE+vniIA\r\nb75HfpzNOLD+xnIHf2ON67u4MW9m/B9MS5p1scCeZvkG3V0kXIn84nk2iteC\r\nn/l4Czkoe8NcEkL0ebohIyrLcK0VRgl13waNe7zLi1g2YOD/2CaCDj2VZFzE\r\ngMuYLp9hM3CgukouI/xktnips4uO8SZTLQF/MbeoCyoIS0z9wtiNEwzrVIh3\r\njeqn41XjwXHnmlPrzkuT2+uYzKVGg8SqQ7bKlP2uIfzMd5bvHURymFrArpLQ\r\niDYaUgQOfLOjYVI/G6woBqZBnLCXWC6Tkes=\r\n=no4O\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","engines":{"node":">=14"},"gitHead":"1f3e9988c23308e5b0a5417732997feb73cd307b","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","lint":"eslint .","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix","clean":"rimraf ./dist"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.18.0+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.18.0","dependencies":{"tslib":"^2.3.1","node-fetch":"^2.6.0","@types/node":"^16.11.55","@clerk/types":"^3.13.0","query-string":"^7.0.1","snakecase-keys":"^5.4.4","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.4.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","typescript":"*","@types/jest":"^27.4.0"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.9.2_1666624994861_0.22136736967123216","host":"s3://npm-registry-packages"}},"2.9.3-staging.0":{"name":"@clerk/backend-core","version":"2.9.3-staging.0","license":"MIT","_id":"@clerk/backend-core@2.9.3-staging.0","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"caa7eb47e4b82c67af880ebfc52546ec808e74e9","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.9.3-staging.0.tgz","fileCount":323,"integrity":"sha512-rZ52stxAdUMAUZLmfLbgLb1sg5XlBGPh9J4gHTurL9h7IzokOAwIOCzeLPbYaF9qk4KBJq+zhcuaW44Gd9Na5g==","signatures":[{"sig":"MEYCIQC0Rt4lLdEQH8ruVE1e0RLk5WvQYthtVYz989lu2XmgAQIhAPxaiJUz7cw4QplT23g/UdinHnH/ITIU8f4uDHIqObFt","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":553154,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjWwaqACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqc6Q/+PtVi6Y5KrJSrCF7DtyNbf+62h1OelL9BBeKpAn1pGYOSeyYg\r\nZ2XTVKBHzN4wJlA6RgLHjs2AREVou/4UQoGvRYsNpL8OzWGKj9FR9p54VccJ\r\nHci8mPTwK4KSwjcJ6Bln7l3YCopbLlt0N9YXBNqgW7JEE/LM3XiNYw0EfzFc\r\ngghnyPyFCyYwcJBqrupv7xyBQda//e1PEpF4eUGHgZoZEKmNZHXIpMnzqXkj\r\n2YCUyltK3BYoJJlJKrRH4eaG39408McFMzkcRlwKDmLd8cA332o8BRCM5FQk\r\nQTcyvjxIG8OlGoJ4vC+4zsJ2FATt4jBF9/yDoEnx61EWeNs81p8J/y+AU45d\r\nj1dIrGdmSXDUHAg3IIfIBryI7wU3SJOd7hgCwle290lp8UwXWFtyvMQPBr2Y\r\nQozApbbz0aeVAOStYIW+bKf1ryOyHu6ib9ZJkoHeuL67av8eQgRV6pc208xt\r\nHnYwu0lVOy6E1VDhkAJP+2txuKDQDNQUmUWQDhraHD/lSCr94/q6ctGQAf0N\r\nrvnnlSyqqQaJUnAC8GCYlhx2Z6Lo6EFxR6/jyq/TbrSilbT+lQDKQJ8LL1fw\r\nnp3dV4Ab0pKs6aYe4qwXjAV6ZvIRbxyWMl7xQA365k4Dxtck9kGKmJKlh3x2\r\ngAZmlJWPHmCRCbxzA7UAWeZib05MXi/zcsI=\r\n=VJOz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev?utm_source=github&utm_medium=clerk_backend_core\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <img src=\"https://images.clerk.dev/static/clerk.svg\" alt=\"Clerk logo\" height=\"50\">\n  </a>\n  <br />\n</p>\n\n# @clerk/backend-code\n\n<div align=\"center\">\n\n[![Chat on Discord](https://img.shields.io/discord/856971667393609759.svg?logo=discord)](https://discord.com/invite/b5rXHjAg7A)\n[![Clerk documentation](https://img.shields.io/badge/documentation-clerk-green.svg)](https://clerk.dev/docs?utm_source=github&utm_medium=clerk_backend_core)\n[![Follow on Twitter](https://img.shields.io/twitter/follow/ClerkDev?style=social)](https://twitter.com/intent/follow?screen_name=ClerkDev)\n\n[Changelog](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/CHANGELOG.md)\n·\n[Report a Bug](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=bug&template=bug_report.md&title=Bug%3A+)\n·\n[Request a Feature](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=Feature%3A+)\n·\n[Ask a Question](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n\n</div>\n\n---\n\n## Overview\n\nThis package provides Clerk Backend API core resources and low-level authentication utilities for JavaScript environments. It is mostly used as the base for other Clerk SDKs.\n\n## Getting Started\n\n### Installation\n\n```sh\nnpm install @clerk/backend-core\n```\n\n### Build\n\nTo build the package locally with the TypeScript compiler, run:\n\n```sh\nnpm run build\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities, without being platform/environment, specific such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendApi](./src/api/ClerkBackendApi.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendApi` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n## Usage\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendApi](./src/api/ClerkBackendApi.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://reference.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendApi.ts#17) implementation.\n\n## Support\n\nYou can get in touch with us in any of the following ways:\n\n- Join our official community [Discord server](https://discord.com/invite/b5rXHjAg7A)\n- Open a [GitHub support issue](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n- Contact options listed on [our Support page](https://clerk.dev/support?utm_source=github&utm_medium=clerk_backend_core)\n\n## Contributing\n\nWe're open to all community contributions! If you'd like to contribute in any way, please read [our contribution guidelines](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/CONTRIBUTING.md).\n\n## Security\n\n`@clerk/backend-core` follows good practices of security, but 100% security cannot be assured.\n\n`@clerk/backend-core` is provided **\"as is\"** without any **warranty**. Use at your own risk.\n\n_For more information and to report security issues, please refer to our [security documentation](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/SECURITY.md)._\n\n## License\n\nThis project is licensed under the **MIT license**.\n\nSee [LICENSE](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/LICENSE) for more information.\n","engines":{"node":">=14"},"gitHead":"2e7cd63d0325aab395702536ec8e15ab65a56a8b","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","lint":"eslint .","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix","clean":"rimraf ./dist"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.18.0+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.18.0","dependencies":{"tslib":"^2.3.1","node-fetch":"^2.6.0","@types/node":"^16.11.55","@clerk/types":"^3.14.0-staging.0","query-string":"^7.0.1","snakecase-keys":"^5.4.4","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.4.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","typescript":"*","@types/jest":"^27.4.0"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.9.3-staging.0_1666909866271_0.2766916441561327","host":"s3://npm-registry-packages"}},"2.9.3-next.0":{"name":"@clerk/backend-core","version":"2.9.3-next.0","license":"MIT","_id":"@clerk/backend-core@2.9.3-next.0","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"b6821f9a95acb823a206a8de2bace457799508f1","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.9.3-next.0.tgz","fileCount":323,"integrity":"sha512-FwFiP0xEv2TwZiN8k9mJsuiUJobTZz9+kW8WJ71NGXNre5tVYy9rlOq+B4ho/kEy3l+0MY+Y5YQlF73JFWypTw==","signatures":[{"sig":"MEQCIFgETXwVM0Wb+PnbQ9oaoMPWvItic/5HxT6rp/dUy+0vAiBiaJe8jiznqtOsOTe7eo+FKf0tR7QCNKhyLwg9FLUoiA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":553148,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjXEE1ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqPfA//ff9omhYy3nakzS6E6kCeceTSQwc7R3MThTUzHdCmGjILNKX6\r\n76DCKdMpI4/KAmVig0zbKr+BECR+hyXBKiCOVTaawM9YGAtIrw89DwqG2vOn\r\nAYCJBZcVmEUKArvJlOp2MzicWMcNghrcck6JptW9E5iYXzqMDodCmkDHO6Wf\r\nrEF7t/FJZdaUt5nfFAYvCR5ZLefRB16TDuYwn2H0KJPnKb239SLGcgsSFUeb\r\n5Tm/ElmaNhdHZRmyuNJ2EMlTFmjx1IQHSohgUezN1nl5Uv1Ko8UWXN+BqlCR\r\nUnnHwo/X9Z+1QCzNbLNKpUVF8N7z8++b6FhhDUlLrsjkx9dYIHwWuETL7tis\r\nYFqCSQKQCgEvDgFvuAh+icdNPqdKxyhURTOugN5VhG4zfBmy8nCZ9B093BKt\r\nk57SeuGxLoCbbKJrU31GotTFfkeBVzpPnX81r9YfLjwNSyZxF1I3rg42dV42\r\n75aQBTAJzqKc0rqPhU+8fLwpl7plGkhYTHr4Cdy2hCBAT8HvptZg8WjztmTK\r\n7WXR+67ENZkFi87ss3zv1C7mMavQmnKvwiS0j3EEZ7NCQBhdSe8f/SkycsDL\r\nrfzB7/ymLnTFk7Qm3+TwJlxFPFNFyVOquHYfF1yrwFY8VvGy8tYXNUssU7kv\r\ntjxZYuAeA5rUezwxlmsA/307v+su7SKM4r4=\r\n=RI46\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev?utm_source=github&utm_medium=clerk_backend_core\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <img src=\"https://images.clerk.dev/static/clerk.svg\" alt=\"Clerk logo\" height=\"50\">\n  </a>\n  <br />\n</p>\n\n# @clerk/backend-code\n\n<div align=\"center\">\n\n[![Chat on Discord](https://img.shields.io/discord/856971667393609759.svg?logo=discord)](https://discord.com/invite/b5rXHjAg7A)\n[![Clerk documentation](https://img.shields.io/badge/documentation-clerk-green.svg)](https://clerk.dev/docs?utm_source=github&utm_medium=clerk_backend_core)\n[![Follow on Twitter](https://img.shields.io/twitter/follow/ClerkDev?style=social)](https://twitter.com/intent/follow?screen_name=ClerkDev)\n\n[Changelog](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/CHANGELOG.md)\n·\n[Report a Bug](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=bug&template=bug_report.md&title=Bug%3A+)\n·\n[Request a Feature](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=Feature%3A+)\n·\n[Ask a Question](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n\n</div>\n\n---\n\n## Overview\n\nThis package provides Clerk Backend API core resources and low-level authentication utilities for JavaScript environments. It is mostly used as the base for other Clerk SDKs.\n\n## Getting Started\n\n### Installation\n\n```sh\nnpm install @clerk/backend-core\n```\n\n### Build\n\nTo build the package locally with the TypeScript compiler, run:\n\n```sh\nnpm run build\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities, without being platform/environment, specific such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendApi](./src/api/ClerkBackendApi.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendApi` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n## Usage\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendApi](./src/api/ClerkBackendApi.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://reference.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendApi.ts#17) implementation.\n\n## Support\n\nYou can get in touch with us in any of the following ways:\n\n- Join our official community [Discord server](https://discord.com/invite/b5rXHjAg7A)\n- Open a [GitHub support issue](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n- Contact options listed on [our Support page](https://clerk.dev/support?utm_source=github&utm_medium=clerk_backend_core)\n\n## Contributing\n\nWe're open to all community contributions! If you'd like to contribute in any way, please read [our contribution guidelines](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/CONTRIBUTING.md).\n\n## Security\n\n`@clerk/backend-core` follows good practices of security, but 100% security cannot be assured.\n\n`@clerk/backend-core` is provided **\"as is\"** without any **warranty**. Use at your own risk.\n\n_For more information and to report security issues, please refer to our [security documentation](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/SECURITY.md)._\n\n## License\n\nThis project is licensed under the **MIT license**.\n\nSee [LICENSE](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/LICENSE) for more information.\n","engines":{"node":">=14"},"gitHead":"99522eedc8d638e3e7e1f63771e87bab36bf7fa2","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","lint":"eslint .","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix","clean":"rimraf ./dist"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v18.12.0+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"18.12.0","dependencies":{"tslib":"^2.3.1","node-fetch":"^2.6.0","@types/node":"^16.11.55","@clerk/types":"^3.14.0-next.0","query-string":"^7.0.1","snakecase-keys":"^5.4.4","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.4.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","typescript":"*","@types/jest":"^27.4.0"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.9.3-next.0_1666990388750_0.45251600371324896","host":"s3://npm-registry-packages"}},"2.9.3-next.1":{"name":"@clerk/backend-core","version":"2.9.3-next.1","license":"MIT","_id":"@clerk/backend-core@2.9.3-next.1","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"99b43d89d171990778eb31f9482b58db34f7b62c","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.9.3-next.1.tgz","fileCount":323,"integrity":"sha512-Fsr1AXoR7fUYyQx8AbTCnYqv5vX5YVx5R+w6V07AWtYReG8hqCiE0ZhnyVyKsqRliDsreMAo5PqDK9amqRm+yQ==","signatures":[{"sig":"MEUCIGkz0GDzfGkqMGmE//Vak49ZeOyjMUyls2N1csCARsRhAiEAz4Y5yzKucH17MRZqihGqydN5y2OWb/BZgust+AWBokc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":553148,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjXEe+ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrbMw/9E57eOoPEJqvZdW2DU4T4JjYwLFd3KpuVma/9ggXQ6jg1KA/q\r\n1DVaCJh5/6/U75W23K9C/Z/0vets33Xc2oOz1olbKrYCmybJ9XXS1KLAxhpJ\r\np5bWPKLVt7VbdNwJ8HQA1iOeVj7BBMsq88WiDdYCg/mkTYKGY4H2Lmf8QItO\r\nuG7yIwEOyXZzUoxNDg3fUrfE9R8IHuR4Lw743/bMdr4k9QfmzTBTkpUM4iSz\r\nw7UdXbv6qN0MGo/FwuM/kS/0m0gowKz2ZnfPyYZNdtmSYIWLzDfSie4Sdo25\r\ndhmhiFJ+PEL0j5IU5/6LoofUbm39uLTdJbwA/SNcFQJhz9M8+2lObwEfE6wQ\r\nDE+f6ptPGe9kpWQNqP+nE2Mu48U4Ug5ba19Uyl26qYFFaXk2HvvOUxwFb1ER\r\nU8j5LdMOlGn6Z+APR7eFbV/+eKu9UhiN/5NVco6CdrNjq1SyaG2JxlpeXrMg\r\nlwRBDvu0ws450kaeik7PSAob83/Sd5vQHEWDtXV6hee9mkCWp0tky0LrOfkd\r\nO5REMgW6YhdwMQulZ87YGa+o3hrdGsINMBPs5dEW27c7kbGPbM3Ah2J3vYIs\r\nxF0/3ENLw1hOV13F9xQyWMXgx/V5oaW/Doi9bnHE5p/dL+aF56IQ3T4Vhrtn\r\n/Uen7G9TL5hDe0H1AGDp/Igsw/nloWD3dWI=\r\n=BIkV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev?utm_source=github&utm_medium=clerk_backend_core\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <img src=\"https://images.clerk.dev/static/clerk.svg\" alt=\"Clerk logo\" height=\"50\">\n  </a>\n  <br />\n</p>\n\n# @clerk/backend-code\n\n<div align=\"center\">\n\n[![Chat on Discord](https://img.shields.io/discord/856971667393609759.svg?logo=discord)](https://discord.com/invite/b5rXHjAg7A)\n[![Clerk documentation](https://img.shields.io/badge/documentation-clerk-green.svg)](https://clerk.dev/docs?utm_source=github&utm_medium=clerk_backend_core)\n[![Follow on Twitter](https://img.shields.io/twitter/follow/ClerkDev?style=social)](https://twitter.com/intent/follow?screen_name=ClerkDev)\n\n[Changelog](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/CHANGELOG.md)\n·\n[Report a Bug](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=bug&template=bug_report.md&title=Bug%3A+)\n·\n[Request a Feature](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=Feature%3A+)\n·\n[Ask a Question](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n\n</div>\n\n---\n\n## Overview\n\nThis package provides Clerk Backend API core resources and low-level authentication utilities for JavaScript environments. It is mostly used as the base for other Clerk SDKs.\n\n## Getting Started\n\n### Installation\n\n```sh\nnpm install @clerk/backend-core\n```\n\n### Build\n\nTo build the package locally with the TypeScript compiler, run:\n\n```sh\nnpm run build\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities, without being platform/environment, specific such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendApi](./src/api/ClerkBackendApi.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendApi` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n## Usage\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendApi](./src/api/ClerkBackendApi.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://reference.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendApi.ts#17) implementation.\n\n## Support\n\nYou can get in touch with us in any of the following ways:\n\n- Join our official community [Discord server](https://discord.com/invite/b5rXHjAg7A)\n- Open a [GitHub support issue](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n- Contact options listed on [our Support page](https://clerk.dev/support?utm_source=github&utm_medium=clerk_backend_core)\n\n## Contributing\n\nWe're open to all community contributions! If you'd like to contribute in any way, please read [our contribution guidelines](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/CONTRIBUTING.md).\n\n## Security\n\n`@clerk/backend-core` follows good practices of security, but 100% security cannot be assured.\n\n`@clerk/backend-core` is provided **\"as is\"** without any **warranty**. Use at your own risk.\n\n_For more information and to report security issues, please refer to our [security documentation](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/SECURITY.md)._\n\n## License\n\nThis project is licensed under the **MIT license**.\n\nSee [LICENSE](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/LICENSE) for more information.\n","engines":{"node":">=14"},"gitHead":"f81c528dd3928f27d3af5f75dce867328a57d759","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","lint":"eslint .","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix","clean":"rimraf ./dist"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v18.12.0+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"18.12.0","dependencies":{"tslib":"^2.3.1","node-fetch":"^2.6.0","@types/node":"^16.11.55","@clerk/types":"^3.14.0-next.1","query-string":"^7.0.1","snakecase-keys":"^5.4.4","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.4.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","typescript":"*","@types/jest":"^27.4.0"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.9.3-next.1_1666992062360_0.37552896414996084","host":"s3://npm-registry-packages"}},"2.9.3-staging.1":{"name":"@clerk/backend-core","version":"2.9.3-staging.1","license":"MIT","_id":"@clerk/backend-core@2.9.3-staging.1","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"9dc5ecb099523de88988273557065257f817a7bf","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.9.3-staging.1.tgz","fileCount":323,"integrity":"sha512-dxI/wR61Ob6RvmJxnzdKN1KJz7qtvW8k9FKcx3CHspXGJyJnUs3rsgwBvx6iXveb+9F2KpDlrgh0CToUo8K0rg==","signatures":[{"sig":"MEQCIC1/ViOoZPjVctjm9eWNNW5lmtjPkfDK/obJUU9bneWdAiAn07EsSlukfroUMQEwc9PIX1H701Zq+Q6qFK7qUy4gMg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":553154,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjYGWFACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr8uQ//QrlkZB/Gl2728A98fCr63WW9oTXx2m/yobqXfVLKXV03hORQ\r\nqUfRH0JaqOymcBPewrCu3XVE2NsCosvj5ztr49j7jXmpuUFPPliMfdU8vYtL\r\nTJHwtLfCTlzZhEmxMM/1rkxj+mt70/wC6bjhZxBEKbN/QA3rhJP7cnBcIb68\r\njwS0AD1gw0Yk8c/0JoySpQSdswql81ov7GFjfBdW2HKY3TdV87N0aLNRYkkp\r\nLliShqHYz8XO7sRZduXgKXQvBQcDkZnVYI/f6jAZUcDcUcAmIYAzj4KPlHIs\r\n3DcfDl+s4Imf8gSf0Pg90jLOE2abrB5I6N1RPygmN8m2nOWi6/hBp/URyy+Q\r\nMAjDhIX0JgNlB1ONTxgwLDqS7yDrjumNdoQM3nZp5ExSDeHT5RNVOImgKveL\r\nWN3oF8rVW2smlLt4TOnunPXvHoq8AkJLvjh9iVR+WQPJ7zxATcAK9VVAVvV7\r\nM3qvxdBmFAFVW0bVPII2QCNZbRIKeAPTs/CqRDGsYZtlxaxPKYyx86/1SQhx\r\n3IbFQVE0PadmZ300nS5USDoblCwykQqN/B78oKCUcyYib03oAwsjXjT83/d+\r\neSkjhykyk2t26CohsNF9EyK1peaGshz3ey/kMOEv1Tpk/kSJsnFFftyVQHw5\r\nSGQpfc8OG3RZF8hN1gtcX0Q+XeX/HXd8tfU=\r\n=O0ez\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev?utm_source=github&utm_medium=clerk_backend_core\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <img src=\"https://images.clerk.dev/static/clerk.svg\" alt=\"Clerk logo\" height=\"50\">\n  </a>\n  <br />\n</p>\n\n# @clerk/backend-code\n\n<div align=\"center\">\n\n[![Chat on Discord](https://img.shields.io/discord/856971667393609759.svg?logo=discord)](https://discord.com/invite/b5rXHjAg7A)\n[![Clerk documentation](https://img.shields.io/badge/documentation-clerk-green.svg)](https://clerk.dev/docs?utm_source=github&utm_medium=clerk_backend_core)\n[![Follow on Twitter](https://img.shields.io/twitter/follow/ClerkDev?style=social)](https://twitter.com/intent/follow?screen_name=ClerkDev)\n\n[Changelog](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/CHANGELOG.md)\n·\n[Report a Bug](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=bug&template=bug_report.md&title=Bug%3A+)\n·\n[Request a Feature](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=Feature%3A+)\n·\n[Ask a Question](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n\n</div>\n\n---\n\n## Overview\n\nThis package provides Clerk Backend API core resources and low-level authentication utilities for JavaScript environments. It is mostly used as the base for other Clerk SDKs.\n\n## Getting Started\n\n### Installation\n\n```sh\nnpm install @clerk/backend-core\n```\n\n### Build\n\nTo build the package locally with the TypeScript compiler, run:\n\n```sh\nnpm run build\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities, without being platform/environment, specific such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendApi](./src/api/ClerkBackendApi.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendApi` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n## Usage\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendApi](./src/api/ClerkBackendApi.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://reference.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendApi.ts#17) implementation.\n\n## Support\n\nYou can get in touch with us in any of the following ways:\n\n- Join our official community [Discord server](https://discord.com/invite/b5rXHjAg7A)\n- Open a [GitHub support issue](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n- Contact options listed on [our Support page](https://clerk.dev/support?utm_source=github&utm_medium=clerk_backend_core)\n\n## Contributing\n\nWe're open to all community contributions! If you'd like to contribute in any way, please read [our contribution guidelines](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/CONTRIBUTING.md).\n\n## Security\n\n`@clerk/backend-core` follows good practices of security, but 100% security cannot be assured.\n\n`@clerk/backend-core` is provided **\"as is\"** without any **warranty**. Use at your own risk.\n\n_For more information and to report security issues, please refer to our [security documentation](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/SECURITY.md)._\n\n## License\n\nThis project is licensed under the **MIT license**.\n\nSee [LICENSE](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/LICENSE) for more information.\n","engines":{"node":">=14"},"gitHead":"4e4c2d30cc2d70dd6e5bf301b013b95cbf403bbe","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","lint":"eslint .","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix","clean":"rimraf ./dist"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v18.12.0+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"18.12.0","dependencies":{"tslib":"^2.3.1","node-fetch":"^2.6.0","@types/node":"^16.11.55","@clerk/types":"^3.14.0-staging.1","query-string":"^7.0.1","snakecase-keys":"^5.4.4","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.4.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","typescript":"*","@types/jest":"^27.4.0"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.9.3-staging.1_1667261828872_0.09160237787678338","host":"s3://npm-registry-packages"}},"2.9.3-staging.2":{"name":"@clerk/backend-core","version":"2.9.3-staging.2","license":"MIT","_id":"@clerk/backend-core@2.9.3-staging.2","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"074eba479938dadc8a271a5518a52a6084e615fc","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.9.3-staging.2.tgz","fileCount":323,"integrity":"sha512-eg/UXW3RKlN5TaSn/Pjeu6Qc50ncmJU7ZSq5lXH7PHnooVkKNRVtg+oQjVjkYzfGhZcEymtYIMAQa2SnDGiuNg==","signatures":[{"sig":"MEYCIQDucfer0t4QRrZmymnfgIn6YotHmTMAa6JgZ20CJpuQsAIhAK6V4vds1Gt32cSCHpXa2YNLi7MkyQTy5UdFqy80FSw6","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":553154,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjYGkrACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp6ZA/8D3yjYIADzJZ8mVnqA6/rfzKhOM4yKBW5bXrG4tNHzkS6IeN4\r\ntgol2mT2pAP4XxdznLB7dBibjYLGJf/8HNrblOYKLDnhhwFJhMJU+CIXyUc2\r\nuxSJ1pafMsSprHS3xZGcW5CPUeOF6VCb7Z/GCG3xMnc76GXie/i3+6Cy7DHH\r\nTN/tY8wfdIzoscAAzmAcJ/Lv/8SC1dWhMA2O2ahu4hWOZJayNabJ4skmrIZa\r\nGgeslL1ZG5FnsuH6FzcavWbYTiF8IhTyEfpos2mu8GqcrLUKOKrbB67ty6Yg\r\nyFfgRLY2M7tf6NWs3Pmp19+YVihj8sntB0zySd7kA5B4u38LWtKX3RTtLYVJ\r\n9Xziy7z//1ZZKEiI10j0KPDNjb70wnqRVhuD2lioD24rokvjx9sy1tZnimvt\r\noim0+Xv1q6Js4YaEcG6Vm9extr03dUxUZUPrAZZxSp8k3VCoeszoZaptvnPg\r\n7m5wrLDbJpMAO/c9hLGB8O8j9cSNGfhl8G7CL8xy3FWaKqGn2thmOYKsLdPw\r\nvnBJmvazNZIjG1pmGjqEywjd7fKRk4/1fqZz7+OqL+493YbUzr7toKrf4miW\r\n7I93ppAhmy/5TI2d2ex4jEgq5Cz1B+7zibyZZwg1np+K4RV+Lakd1NXYfPqF\r\nyiwdfCoNLUoqAQ/M2pBWN/4ZZepN8c5fCRY=\r\n=h5IK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev?utm_source=github&utm_medium=clerk_backend_core\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <img src=\"https://images.clerk.dev/static/clerk.svg\" alt=\"Clerk logo\" height=\"50\">\n  </a>\n  <br />\n</p>\n\n# @clerk/backend-code\n\n<div align=\"center\">\n\n[![Chat on Discord](https://img.shields.io/discord/856971667393609759.svg?logo=discord)](https://discord.com/invite/b5rXHjAg7A)\n[![Clerk documentation](https://img.shields.io/badge/documentation-clerk-green.svg)](https://clerk.dev/docs?utm_source=github&utm_medium=clerk_backend_core)\n[![Follow on Twitter](https://img.shields.io/twitter/follow/ClerkDev?style=social)](https://twitter.com/intent/follow?screen_name=ClerkDev)\n\n[Changelog](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/CHANGELOG.md)\n·\n[Report a Bug](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=bug&template=bug_report.md&title=Bug%3A+)\n·\n[Request a Feature](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=Feature%3A+)\n·\n[Ask a Question](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n\n</div>\n\n---\n\n## Overview\n\nThis package provides Clerk Backend API core resources and low-level authentication utilities for JavaScript environments. It is mostly used as the base for other Clerk SDKs.\n\n## Getting Started\n\n### Installation\n\n```sh\nnpm install @clerk/backend-core\n```\n\n### Build\n\nTo build the package locally with the TypeScript compiler, run:\n\n```sh\nnpm run build\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities, without being platform/environment, specific such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendApi](./src/api/ClerkBackendApi.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendApi` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n## Usage\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendApi](./src/api/ClerkBackendApi.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://reference.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendApi.ts#17) implementation.\n\n## Support\n\nYou can get in touch with us in any of the following ways:\n\n- Join our official community [Discord server](https://discord.com/invite/b5rXHjAg7A)\n- Open a [GitHub support issue](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n- Contact options listed on [our Support page](https://clerk.dev/support?utm_source=github&utm_medium=clerk_backend_core)\n\n## Contributing\n\nWe're open to all community contributions! If you'd like to contribute in any way, please read [our contribution guidelines](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/CONTRIBUTING.md).\n\n## Security\n\n`@clerk/backend-core` follows good practices of security, but 100% security cannot be assured.\n\n`@clerk/backend-core` is provided **\"as is\"** without any **warranty**. Use at your own risk.\n\n_For more information and to report security issues, please refer to our [security documentation](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/SECURITY.md)._\n\n## License\n\nThis project is licensed under the **MIT license**.\n\nSee [LICENSE](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/LICENSE) for more information.\n","engines":{"node":">=14"},"gitHead":"363c0d85ca284200b1691a1d792d5b2e9a559e82","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","lint":"eslint .","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix","clean":"rimraf ./dist"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v18.12.0+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"18.12.0","dependencies":{"tslib":"^2.3.1","node-fetch":"^2.6.0","@types/node":"^16.11.55","@clerk/types":"^3.14.0-staging.2","query-string":"^7.0.1","snakecase-keys":"^5.4.4","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.4.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","typescript":"*","@types/jest":"^27.4.0"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.9.3-staging.2_1667262763403_0.8092931176055993","host":"s3://npm-registry-packages"}},"2.10.0-staging.1":{"name":"@clerk/backend-core","version":"2.10.0-staging.1","license":"MIT","_id":"@clerk/backend-core@2.10.0-staging.1","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"57210eb17497c8dab2047e164eff09c9e7423edb","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.10.0-staging.1.tgz","fileCount":211,"integrity":"sha512-Op+4vDWC2gaeKKBEjoWdrTMlZN8ttLpxAyS9Re/CLpk0b+WWxVyPNz/OBg9qeHjqz4qtiHEHSNgzuMdV9moF7A==","signatures":[{"sig":"MEUCIQCRquDp+YCVMbAytJ2Ia8KTqQAkFB7gGzmhKC1hv1fIGgIgBrSun+PxZa3wMMHfKmLmdoy3RCk19fy6DXaCmRP0SnI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":444112,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjYlSJACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoiNg//d4Lo3fpx1XK1cl2NrjUUwqSNiFMSnsDJ5uZV+gvbATqz+WoD\r\nn5+ENBGdey//4jDyxJsFNSKZuHnTc50FYIkHqoRuFdP8oC5NFgX7IjzkOhx0\r\nC/3cZZwF6QWkRtDuROlbhvPYWYsnBrY3es3o/MIF10+rckulC+0BVO3q1QXc\r\np34N1qOYAB/tWP344W/YZ7xgR+cuIteXaZpNrOSeX8QydVSrg06RfSAoGEWd\r\n8bUvQ6LJVgNGdZavjv4hMmYi65eS0ervza00ctPUf1YYPsGY+JFkndTombyT\r\nw02iD/a/RjaEMNDPvoau782qj5DbsYtXNdggS6ieVccG4QHt94ekd0aeYwRu\r\nPlEZjlP1G162tN5lwsxK0DWUhRC6yDZx6IoXnQxZP+TnaeK++FGQZe5aXHq2\r\nSGwSQmGEgSYkKunHSvOhDWkWt9oEgWTgMEAwOYNIQDV2t/8R4EYN1j9oQ8rH\r\nDLRuooZiFJakg+b4GLDsIuALyM43WCkm3HML7X6CQx/8ZrACuzU/urvjOrjd\r\nZaYFi64sCLx9TsiMhZ7GCilmhCIEIU9yqvxImN6AbLVO+fOlsSAqhw+rO/YD\r\nZSjXm0uvLAz5kPu9zPOpTzF+Rx7c6sM+MBCHA4qr/VEfgZrKJ/9sLqUskSxS\r\nxiiMIaPLbV1bQx/iMIY5Kl6wZwtnTMxXjqA=\r\n=R9Fq\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev?utm_source=github&utm_medium=clerk_backend_core\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <img src=\"https://images.clerk.dev/static/clerk.svg\" alt=\"Clerk logo\" height=\"50\">\n  </a>\n  <br />\n</p>\n\n# @clerk/backend-code\n\n<div align=\"center\">\n\n[![Chat on Discord](https://img.shields.io/discord/856971667393609759.svg?logo=discord)](https://discord.com/invite/b5rXHjAg7A)\n[![Clerk documentation](https://img.shields.io/badge/documentation-clerk-green.svg)](https://clerk.dev/docs?utm_source=github&utm_medium=clerk_backend_core)\n[![Follow on Twitter](https://img.shields.io/twitter/follow/ClerkDev?style=social)](https://twitter.com/intent/follow?screen_name=ClerkDev)\n\n[Changelog](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/CHANGELOG.md)\n·\n[Report a Bug](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=bug&template=bug_report.md&title=Bug%3A+)\n·\n[Request a Feature](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=Feature%3A+)\n·\n[Ask a Question](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n\n</div>\n\n---\n\n## Overview\n\nThis package provides Clerk Backend API core resources and low-level authentication utilities for JavaScript environments. It is mostly used as the base for other Clerk SDKs.\n\n## Getting Started\n\n### Installation\n\n```sh\nnpm install @clerk/backend-core\n```\n\n### Build\n\nTo build the package locally with the TypeScript compiler, run:\n\n```sh\nnpm run build\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities, without being platform/environment, specific such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendApi](./src/api/ClerkBackendApi.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendApi` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n## Usage\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendApi](./src/api/ClerkBackendApi.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://reference.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendApi.ts#17) implementation.\n\n## Support\n\nYou can get in touch with us in any of the following ways:\n\n- Join our official community [Discord server](https://discord.com/invite/b5rXHjAg7A)\n- Open a [GitHub support issue](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n- Contact options listed on [our Support page](https://clerk.dev/support?utm_source=github&utm_medium=clerk_backend_core)\n\n## Contributing\n\nWe're open to all community contributions! If you'd like to contribute in any way, please read [our contribution guidelines](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/CONTRIBUTING.md).\n\n## Security\n\n`@clerk/backend-core` follows good practices of security, but 100% security cannot be assured.\n\n`@clerk/backend-core` is provided **\"as is\"** without any **warranty**. Use at your own risk.\n\n_For more information and to report security issues, please refer to our [security documentation](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/SECURITY.md)._\n\n## License\n\nThis project is licensed under the **MIT license**.\n\nSee [LICENSE](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/LICENSE) for more information.\n","engines":{"node":">=14"},"gitHead":"e6afbe09f215f7d3a5975238cf6c749315ab6c5e","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","lint":"eslint .","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix","clean":"rimraf ./dist"},"_npmUser":{"name":"sokratis","email":"sokratis.vidros@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.13.0+x64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.13.0","dependencies":{"tslib":"^2.3.1","node-fetch":"^2.6.0","@types/node":"^16.11.55","@clerk/types":"^3.14.0-staging.1","query-string":"^7.0.1","snakecase-keys":"^5.4.4","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.4.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","typescript":"*","@types/jest":"^27.4.0"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.10.0-staging.1_1667388553130_0.4578160849739077","host":"s3://npm-registry-packages"}},"2.10.0-staging.4":{"name":"@clerk/backend-core","version":"2.10.0-staging.4","license":"MIT","_id":"@clerk/backend-core@2.10.0-staging.4","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"95c4b4e14441e44469bff78acb751062dc70aefd","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.10.0-staging.4.tgz","fileCount":323,"integrity":"sha512-zSd3FvYM+/fDQAIUANGPnQzfsbrRxoEbIidzp1dFF4MNlrMXEonpo83Fssm9BLljUNkwH6GMUaKXLhj5kYeyFg==","signatures":[{"sig":"MEYCIQCR1CehTB8qhlogLcesfmzzti9IhlmQlt/F+pve0wGukAIhANztLOBJkYmIX0iVJ48YFqBTUUnCxUrMe6gPBIuH0DN4","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":555336,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjYl9NACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoXcQ/+JF8Bpe3Rk408ZAftK9p1rIaxkcRr0ytiGzGKO7g4TR2fJg5M\r\nLVHSt0K79hCvoLB6QbAFWONmMwEFVo6NNxZ/Wp+02xskmxJWYsDIvDDr21we\r\nc51IJ3ehK83VgKLSE/IaJI218c8n2f25RlVl8EZc0ZGNCpAgfgWoQiX17AZ5\r\nwrOz4JuptITF7P2vdMEFNEx00pmaGDeqMMxazDraAur5vsdyF+OWKKdHijkh\r\nQS+DTPLZgIWRGMWp7h5auUDuOOVKFZ/0GcIFMV/bjCuEL0SkeR8UE95iwv0d\r\nI2fjzKLR3FbMy8o18joNh4PftRa/a2y8PebiPq9+AKPxuVw1rroJFqSy31Jf\r\nRl2Id5nG+oRkky0FqvndVFqsbyRI38DhbtRmWkS/NYuU6lol1XjVE+o5cbNY\r\nm0eqmME5nxSuJI3qK2E9odk/uKTScgwWjOWM2lTbr8EcUCV9VB2SWeAiFEhc\r\n2AD26gE1jbyWhpnSb12ra0Au9HaXoDFRZl4DgXVvOI73PSf2zYsc8KEmAbmo\r\ncgiUmmTfZ5DumUAGi1W5eFSE0887aPvNgH7H8qIh/Hr2awkR5BCBgQjhAo7M\r\nobkWi7bQv9tYaBxy/GsRcV5Xd+kpzrUmbDksbAtBnXxMzOK3bjrI59yRRktT\r\ncdPzRUGICT+U7jM21rI3vlox1ckO7Of2k5Q=\r\n=ekte\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev?utm_source=github&utm_medium=clerk_backend_core\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <img src=\"https://images.clerk.dev/static/clerk.svg\" alt=\"Clerk logo\" height=\"50\">\n  </a>\n  <br />\n</p>\n\n# @clerk/backend-code\n\n<div align=\"center\">\n\n[![Chat on Discord](https://img.shields.io/discord/856971667393609759.svg?logo=discord)](https://discord.com/invite/b5rXHjAg7A)\n[![Clerk documentation](https://img.shields.io/badge/documentation-clerk-green.svg)](https://clerk.dev/docs?utm_source=github&utm_medium=clerk_backend_core)\n[![Follow on Twitter](https://img.shields.io/twitter/follow/ClerkDev?style=social)](https://twitter.com/intent/follow?screen_name=ClerkDev)\n\n[Changelog](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/CHANGELOG.md)\n·\n[Report a Bug](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=bug&template=bug_report.md&title=Bug%3A+)\n·\n[Request a Feature](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=Feature%3A+)\n·\n[Ask a Question](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n\n</div>\n\n---\n\n## Overview\n\nThis package provides Clerk Backend API core resources and low-level authentication utilities for JavaScript environments. It is mostly used as the base for other Clerk SDKs.\n\n## Getting Started\n\n### Installation\n\n```sh\nnpm install @clerk/backend-core\n```\n\n### Build\n\nTo build the package locally with the TypeScript compiler, run:\n\n```sh\nnpm run build\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities, without being platform/environment, specific such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendApi](./src/api/ClerkBackendApi.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendApi` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n## Usage\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendApi](./src/api/ClerkBackendApi.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://reference.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendApi.ts#17) implementation.\n\n## Support\n\nYou can get in touch with us in any of the following ways:\n\n- Join our official community [Discord server](https://discord.com/invite/b5rXHjAg7A)\n- Open a [GitHub support issue](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n- Contact options listed on [our Support page](https://clerk.dev/support?utm_source=github&utm_medium=clerk_backend_core)\n\n## Contributing\n\nWe're open to all community contributions! If you'd like to contribute in any way, please read [our contribution guidelines](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/CONTRIBUTING.md).\n\n## Security\n\n`@clerk/backend-core` follows good practices of security, but 100% security cannot be assured.\n\n`@clerk/backend-core` is provided **\"as is\"** without any **warranty**. Use at your own risk.\n\n_For more information and to report security issues, please refer to our [security documentation](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/SECURITY.md)._\n\n## License\n\nThis project is licensed under the **MIT license**.\n\nSee [LICENSE](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/LICENSE) for more information.\n","engines":{"node":">=14"},"gitHead":"87d2e26934613c7e9524cdead622497a5584293a","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","lint":"eslint .","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix","clean":"rimraf ./dist"},"_npmUser":{"name":"sokratis","email":"sokratis.vidros@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.13.0+x64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.13.0","dependencies":{"tslib":"^2.3.1","node-fetch":"^2.6.0","@types/node":"^16.11.55","@clerk/types":"^3.14.0-staging.4","query-string":"^7.0.1","snakecase-keys":"^5.4.4","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.4.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","typescript":"*","@types/jest":"^27.4.0"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.10.0-staging.4_1667391309499_0.12269017793987036","host":"s3://npm-registry-packages"}},"2.10.0-staging.5":{"name":"@clerk/backend-core","version":"2.10.0-staging.5","license":"MIT","_id":"@clerk/backend-core@2.10.0-staging.5","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"58d7e4f23700ebdbdc6118bcfa0864cc93dbf84e","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.10.0-staging.5.tgz","fileCount":323,"integrity":"sha512-dzAa70ehXBVV70ZyZOYWfhDHq/BJgmKTkVUhLrDIYjACntqLQ1K2Sx6/GIRA0Z2fSmvTSV5AxXM3fIQpqs3GyA==","signatures":[{"sig":"MEYCIQCWD+T10dp33lQrGK9jtq0PIfRtaCYEueaL4J7v1uFbCAIhAP21VE8zFG8Ylszn24yPw496nL3ZWTA4ykWwFVIL2TUw","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":555336,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjYrMQACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqBBRAAjl4MCI8Jsf4DYskcUmgGQhvRlWlEZnSfY2X0bE1aSUjk3b0N\r\nZ6dKQVauKU80+hVGhrE+8J33djmIgvxAMnbBJHRue9iiFJcjzsAZcDEhX8Y8\r\nxXrL/XlZJv6FxTf0v2h2Mcazv/rBYGWacWQpaZDCLM9Blj0NSSa1HjHVN+nI\r\njjsIUUhyllEl95C/HANZZDhOoxbfWcKnV+mHVGA1+4sQ6y5d9nV21OiHShYS\r\nkWaqNDgWc9KKAb7iY9llDjvlEnMy7NySMMVCV2md8fD9ec6QKXSeCMmH9e1R\r\nSQxjfpBfCuNnWgx0yFTVeSCy7A/wEbv90RBLVoIJ43pur8wA3rLqvRoG4QDG\r\nCCTu6T4sXi/pQwpAE9wZV57c5MuNPRNxCv0E4dgvvuLTlkMug1o02845Tj4J\r\nupT16IYr4AJaTFu+gLNKV+2ZTseRxZi8IN38Kd0TQg3HG06wU7+Q78cBdPGQ\r\nB9Zq9aYpvjqIAnQe8H9N7gu71uDW6zHQSjFlDKCE6DtAV02FDiNyxf3gGYKa\r\n0VTo9o6TkwuR6cVu47n0p3eIb79H1W6dgkRc/BKn70cM0YwzgBMdNTUUZOYi\r\np54WzwNsYfdGrnPCFI6qlrDH2PzW8fjNL2ewLZuTgHV07KoRZ6y9iPsPfY9a\r\nH2u5rLfnOxu3FLY5JCPmbv3b7jOBo8TT9LI=\r\n=UMnz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev?utm_source=github&utm_medium=clerk_backend_core\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <img src=\"https://images.clerk.dev/static/clerk.svg\" alt=\"Clerk logo\" height=\"50\">\n  </a>\n  <br />\n</p>\n\n# @clerk/backend-code\n\n<div align=\"center\">\n\n[![Chat on Discord](https://img.shields.io/discord/856971667393609759.svg?logo=discord)](https://discord.com/invite/b5rXHjAg7A)\n[![Clerk documentation](https://img.shields.io/badge/documentation-clerk-green.svg)](https://clerk.dev/docs?utm_source=github&utm_medium=clerk_backend_core)\n[![Follow on Twitter](https://img.shields.io/twitter/follow/ClerkDev?style=social)](https://twitter.com/intent/follow?screen_name=ClerkDev)\n\n[Changelog](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/CHANGELOG.md)\n·\n[Report a Bug](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=bug&template=bug_report.md&title=Bug%3A+)\n·\n[Request a Feature](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=Feature%3A+)\n·\n[Ask a Question](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n\n</div>\n\n---\n\n## Overview\n\nThis package provides Clerk Backend API core resources and low-level authentication utilities for JavaScript environments. It is mostly used as the base for other Clerk SDKs.\n\n## Getting Started\n\n### Installation\n\n```sh\nnpm install @clerk/backend-core\n```\n\n### Build\n\nTo build the package locally with the TypeScript compiler, run:\n\n```sh\nnpm run build\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities, without being platform/environment, specific such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendApi](./src/api/ClerkBackendApi.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendApi` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n## Usage\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendApi](./src/api/ClerkBackendApi.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://reference.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendApi.ts#17) implementation.\n\n## Support\n\nYou can get in touch with us in any of the following ways:\n\n- Join our official community [Discord server](https://discord.com/invite/b5rXHjAg7A)\n- Open a [GitHub support issue](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n- Contact options listed on [our Support page](https://clerk.dev/support?utm_source=github&utm_medium=clerk_backend_core)\n\n## Contributing\n\nWe're open to all community contributions! If you'd like to contribute in any way, please read [our contribution guidelines](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/CONTRIBUTING.md).\n\n## Security\n\n`@clerk/backend-core` follows good practices of security, but 100% security cannot be assured.\n\n`@clerk/backend-core` is provided **\"as is\"** without any **warranty**. Use at your own risk.\n\n_For more information and to report security issues, please refer to our [security documentation](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/SECURITY.md)._\n\n## License\n\nThis project is licensed under the **MIT license**.\n\nSee [LICENSE](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/LICENSE) for more information.\n","engines":{"node":">=14"},"gitHead":"bc851468ce1244b3bc1890fb5d2eb5cf361b4fb6","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","lint":"eslint .","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix","clean":"rimraf ./dist"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v18.12.0+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"18.12.0","dependencies":{"tslib":"^2.3.1","node-fetch":"^2.6.0","@types/node":"^16.11.55","@clerk/types":"^3.14.0-staging.5","query-string":"^7.0.1","snakecase-keys":"^5.4.4","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.4.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","typescript":"*","@types/jest":"^27.4.0"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.10.0-staging.5_1667412752572_0.9280987316305718","host":"s3://npm-registry-packages"}},"2.10.0-staging.6":{"name":"@clerk/backend-core","version":"2.10.0-staging.6","license":"MIT","_id":"@clerk/backend-core@2.10.0-staging.6","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"b339f4deacf1e7ad66d01c545646aa3d5569de16","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.10.0-staging.6.tgz","fileCount":323,"integrity":"sha512-L40U8XBCGuhcAhW+hFMdPVHUbeKJYDlM4AhOwprm+VnfVCQYWcalvX2vA0ZjPKsgzHohfCvj6IRM/raTPlk/LQ==","signatures":[{"sig":"MEQCIDzC1NG3BQyzCEoDr5Z6gHwrKnPMNJ4TEdVroVgsb2kPAiAG2Dw8L0AYwOhlswIAAjgYk2w8/KnxlDz1vR7MfM7JlQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":555336,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjYu2gACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqG2BAAkXssZ3408PRWxnV8CIdKKHg8tJeUOwtr8PnQVb6s575gRAAf\r\nCNivrwJExvEhiUxrZo2zHZMUaq0VUwUFrnMXFkvcAN9oPK79+jQYCFbcenwQ\r\n8349SIO+7Gj9b6HUoISKiuY/flA2C4C4jtoehCZf1YeS8vvSPbzFZtNn+rUx\r\n6q0inKRNuDx5zDxf5BijB2RwB1JIi6I0HZqoYTQrXotqAgt3CZqxtxQx8i5j\r\nQkhX5qrIIRYP6n8NEOOkPQ6HvImEkKREk0mRvy1RfVnIPWhICtHiGCLHLx6U\r\n2IOvBL5L6/BYfRe6fZKds664jsik8BiuIs3SKGGsaPrZq2MzzVkreUjED2eZ\r\nxEPrgInViDqyaghrrYVIJsXDWc9VOFOs1p/BCFeN0Ad/XzypYj3Gbdu4/oX6\r\nKXScoAmB8fpERGuaSwTqJqBOy4trOLVfCunckGdBycqEja4YpRY9CtFwwn+v\r\nfoVfCVKC85Czw9LfAJY8SRFmv1D9j8APqEapiXYjQnkulasnDjT5RehT9G2Q\r\nkcf4zrtAbRsAaATkDWP09XHWH7ZaEVylI1ugtzffiAitE+CNLyucOQpVfDvx\r\n1dVrf49FP4U9bU2gIrYO5maSN9SjzlWzq78iOu7p47zAiKQGxm53e73ms07l\r\noKuXQnMDATqg10xDiPJWK15FpVvtzO24kjQ=\r\n=WuU5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev?utm_source=github&utm_medium=clerk_backend_core\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <img src=\"https://images.clerk.dev/static/clerk.svg\" alt=\"Clerk logo\" height=\"50\">\n  </a>\n  <br />\n</p>\n\n# @clerk/backend-code\n\n<div align=\"center\">\n\n[![Chat on Discord](https://img.shields.io/discord/856971667393609759.svg?logo=discord)](https://discord.com/invite/b5rXHjAg7A)\n[![Clerk documentation](https://img.shields.io/badge/documentation-clerk-green.svg)](https://clerk.dev/docs?utm_source=github&utm_medium=clerk_backend_core)\n[![Follow on Twitter](https://img.shields.io/twitter/follow/ClerkDev?style=social)](https://twitter.com/intent/follow?screen_name=ClerkDev)\n\n[Changelog](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/CHANGELOG.md)\n·\n[Report a Bug](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=bug&template=bug_report.md&title=Bug%3A+)\n·\n[Request a Feature](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=Feature%3A+)\n·\n[Ask a Question](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n\n</div>\n\n---\n\n## Overview\n\nThis package provides Clerk Backend API core resources and low-level authentication utilities for JavaScript environments. It is mostly used as the base for other Clerk SDKs.\n\n## Getting Started\n\n### Installation\n\n```sh\nnpm install @clerk/backend-core\n```\n\n### Build\n\nTo build the package locally with the TypeScript compiler, run:\n\n```sh\nnpm run build\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities, without being platform/environment, specific such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendApi](./src/api/ClerkBackendApi.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendApi` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n## Usage\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendApi](./src/api/ClerkBackendApi.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://reference.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendApi.ts#17) implementation.\n\n## Support\n\nYou can get in touch with us in any of the following ways:\n\n- Join our official community [Discord server](https://discord.com/invite/b5rXHjAg7A)\n- Open a [GitHub support issue](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n- Contact options listed on [our Support page](https://clerk.dev/support?utm_source=github&utm_medium=clerk_backend_core)\n\n## Contributing\n\nWe're open to all community contributions! If you'd like to contribute in any way, please read [our contribution guidelines](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/CONTRIBUTING.md).\n\n## Security\n\n`@clerk/backend-core` follows good practices of security, but 100% security cannot be assured.\n\n`@clerk/backend-core` is provided **\"as is\"** without any **warranty**. Use at your own risk.\n\n_For more information and to report security issues, please refer to our [security documentation](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/SECURITY.md)._\n\n## License\n\nThis project is licensed under the **MIT license**.\n\nSee [LICENSE](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/LICENSE) for more information.\n","engines":{"node":">=14"},"gitHead":"d19575329c9b576a114f535270bf429ae7d929cf","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","lint":"eslint .","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix","clean":"rimraf ./dist"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v18.12.0+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"18.12.0","dependencies":{"tslib":"^2.3.1","node-fetch":"^2.6.0","@types/node":"^16.11.55","@clerk/types":"^3.14.0-staging.6","query-string":"^7.0.1","snakecase-keys":"^5.4.4","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.4.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","typescript":"*","@types/jest":"^27.4.0"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.10.0-staging.6_1667427744655_0.9230389335184412","host":"s3://npm-registry-packages"}},"2.9.3-next.2":{"name":"@clerk/backend-core","version":"2.9.3-next.2","license":"MIT","_id":"@clerk/backend-core@2.9.3-next.2","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"38190649fd80962110cc9c78f205b3c6e8510d71","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.9.3-next.2.tgz","fileCount":323,"integrity":"sha512-7GhjCb1stJblh+vHXgZeOVKI3ensWkKuzufLYHtd3lDJMqy7izIZR1Dp2s9OAZYOCwefxROXRU3Si6hagO2GPQ==","signatures":[{"sig":"MEUCIE2CjrLgh2dUxbkKO0YAp2dVTvwkYdbW2E+vUuyhy9axAiEAqPhJ7OvALG+ddDk/8hECoQfTozHeDconKpITiUoRg7g=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":553425,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjY7rCACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq/Gw/5AbPN0/xvYxPxgmIBC2N4LrURlWkkJgMWr5BWQOJybmHomOZU\r\nFCfKTzLrGR/O5QWxTjrCOrf96xvDNLmAbH+4wXgDXkoC5JNdGYqpmyeheMGE\r\nXAjVz+Lk0ci7GuchFWHKAiaxpM3p1CCpmSLahFCfkUX8449jPpZs1Dd7oUIT\r\nkdKMq3B1jz8Q3OyNFdRSmUkTTw92DBFKZ0p1TQO459uW88qIoyuMhgG3b6A5\r\n8o1BaeRMCj5iwS1xGip+ES5+ChWb/JRf1VxwmHgytS4afn4iT/hshrtykFTw\r\n1pBCe4huYJ1K2U3Aa9JaiB1oGQsySOIJW2PyDXSOfJnqKX4O44/kWPaDVMBb\r\ngBAk6LO/FGSjciUA+KKTBA/G17i4ClFDtTYy8N86GC1WOud11PIZhJYDcsuv\r\nSBw2mOhlvzVozEqpHHxd1o71hcbAxuJpYFZlDOyl9Ars9Dx8/BN/gN6RhWEE\r\nceg/m2Ugl+RFhKwJgyByGjiARPz8LG2GO0xWGc8ekyc5ywoIQkNi4e4IyR/5\r\nel2sREaljsISkLRfNin3boYhjIBb27fe0UXL7t7YAMwWBf0sLzPazsOFcRCi\r\n9LJmaGSKFt7Cw28Q4OGRulJCSkb5qpLeJvjIrAbljBDrCxQIW4xupRkBJjih\r\neWRrJtkEPVrcK+1oNZ4Orzd0scpddIm8DSo=\r\n=sust\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev?utm_source=github&utm_medium=clerk_backend_core\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <img src=\"https://images.clerk.dev/static/clerk.svg\" alt=\"Clerk logo\" height=\"50\">\n  </a>\n  <br />\n</p>\n\n# @clerk/backend-code\n\n<div align=\"center\">\n\n[![Chat on Discord](https://img.shields.io/discord/856971667393609759.svg?logo=discord)](https://discord.com/invite/b5rXHjAg7A)\n[![Clerk documentation](https://img.shields.io/badge/documentation-clerk-green.svg)](https://clerk.dev/docs?utm_source=github&utm_medium=clerk_backend_core)\n[![Follow on Twitter](https://img.shields.io/twitter/follow/ClerkDev?style=social)](https://twitter.com/intent/follow?screen_name=ClerkDev)\n\n[Changelog](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/CHANGELOG.md)\n·\n[Report a Bug](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=bug&template=bug_report.md&title=Bug%3A+)\n·\n[Request a Feature](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=Feature%3A+)\n·\n[Ask a Question](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n\n</div>\n\n---\n\n## Overview\n\nThis package provides Clerk Backend API core resources and low-level authentication utilities for JavaScript environments. It is mostly used as the base for other Clerk SDKs.\n\n## Getting Started\n\n### Installation\n\n```sh\nnpm install @clerk/backend-core\n```\n\n### Build\n\nTo build the package locally with the TypeScript compiler, run:\n\n```sh\nnpm run build\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities, without being platform/environment, specific such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendApi](./src/api/ClerkBackendApi.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendApi` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n## Usage\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendApi](./src/api/ClerkBackendApi.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://reference.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendApi.ts#17) implementation.\n\n## Support\n\nYou can get in touch with us in any of the following ways:\n\n- Join our official community [Discord server](https://discord.com/invite/b5rXHjAg7A)\n- Open a [GitHub support issue](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n- Contact options listed on [our Support page](https://clerk.dev/support?utm_source=github&utm_medium=clerk_backend_core)\n\n## Contributing\n\nWe're open to all community contributions! If you'd like to contribute in any way, please read [our contribution guidelines](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/CONTRIBUTING.md).\n\n## Security\n\n`@clerk/backend-core` follows good practices of security, but 100% security cannot be assured.\n\n`@clerk/backend-core` is provided **\"as is\"** without any **warranty**. Use at your own risk.\n\n_For more information and to report security issues, please refer to our [security documentation](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/SECURITY.md)._\n\n## License\n\nThis project is licensed under the **MIT license**.\n\nSee [LICENSE](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/LICENSE) for more information.\n","engines":{"node":">=14"},"gitHead":"f6ca4972f5c5ff6207c81460584e216adde7be40","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","lint":"eslint .","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix","clean":"rimraf ./dist"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v18.12.0+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"18.12.0","dependencies":{"tslib":"^2.3.1","node-fetch":"^2.6.0","@types/node":"^16.11.55","@clerk/types":"^3.14.0-next.2","query-string":"^7.0.1","snakecase-keys":"^5.4.4","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.4.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","typescript":"*","@types/jest":"^27.4.0"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.9.3-next.2_1667480258210_0.37430069890377005","host":"s3://npm-registry-packages"}},"2.10.0-staging.7":{"name":"@clerk/backend-core","version":"2.10.0-staging.7","license":"MIT","_id":"@clerk/backend-core@2.10.0-staging.7","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"462bc1be2271e7fb7acb17c5b6caeccb3ee469a1","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.10.0-staging.7.tgz","fileCount":323,"integrity":"sha512-nXZRXEpfqqevz199t32LBseDD/8+dlcdKXYMSVvkVOl1/loJIhb+IeaKfKIw4HhEsiyREhYde+SytqupKx17Ng==","signatures":[{"sig":"MEUCIQDNmSpWHl3lodFv0rF7d96HP2GbnjzKXD6D3X1ki+E0qgIgNkBc45JKHZSXke7GZMU/yN2UkJCZ9PY1wOtUBaIY75A=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":555366,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjY+ZnACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqF/A/+KcLEzMvzfSnI8heTSlL2hTVxSRXj2+0Db5Hh9BYBfXd1sn/3\r\nYsSUf3U0nSbjnrTGdEX76bf3qhmhCa+2S5ofvZsTkdlEVE0qErDP/UzETNyi\r\nxozk5tWQT15evhQr9dC4XHy2sphrzhqsUEsfJCx0TpK3X5pEfwySH8W20dv/\r\n6X/6xZl6b0nJaLVb1RReA8VcNzhcd15G4/EaVVFj8pyFIrRx6ThetI+5Sli4\r\n5PU/+sl7aGjgxeTxCgZnozOwVrENJ8T3gqJXJssDl3HlzTbZklv9qVO6xCH7\r\nPcDwyJttCCYVx12Js2SyOSfFJZzTp7a0ovVhZvO1xfZ2CNzgQErM1HD/ARIm\r\nNAJWKTDsx2b6V0+H1WDbZY3sPqwxogvGyaqWCUwIZovkIajStyoLb74qdXZG\r\ndODzdrm0ohvYhGeNJ4xOADue5e1eoTqIcP5Rgr7Rz1n5WQD6Nvj+kEnIURMv\r\nvrIpO7L+C1I9EfAyZYwrs86JZ/nRS6BEZW3ru/oB1pET4UzoPKoBBwOMOL0P\r\nu2yXdM7mQowZLcFRWXvcALNlEPTxX4T7QI881enXFTCgojW/atHfn0fdK1kH\r\nbN0/i1VwIpGXXqUD5NwNCYYWmnCV3188pCtATX6+gacBxOKdLILNykn/6yYo\r\nL7jprxBmZOj891P6gRgof7i+hxS/uNLdvSQ=\r\n=bkif\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev?utm_source=github&utm_medium=clerk_backend_core\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <img src=\"https://images.clerk.dev/static/clerk.svg\" alt=\"Clerk logo\" height=\"50\">\n  </a>\n  <br />\n</p>\n\n# @clerk/backend-code\n\n<div align=\"center\">\n\n[![Chat on Discord](https://img.shields.io/discord/856971667393609759.svg?logo=discord)](https://discord.com/invite/b5rXHjAg7A)\n[![Clerk documentation](https://img.shields.io/badge/documentation-clerk-green.svg)](https://clerk.dev/docs?utm_source=github&utm_medium=clerk_backend_core)\n[![Follow on Twitter](https://img.shields.io/twitter/follow/ClerkDev?style=social)](https://twitter.com/intent/follow?screen_name=ClerkDev)\n\n[Changelog](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/CHANGELOG.md)\n·\n[Report a Bug](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=bug&template=bug_report.md&title=Bug%3A+)\n·\n[Request a Feature](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=Feature%3A+)\n·\n[Ask a Question](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n\n</div>\n\n---\n\n## Overview\n\nThis package provides Clerk Backend API core resources and low-level authentication utilities for JavaScript environments. It is mostly used as the base for other Clerk SDKs.\n\n## Getting Started\n\n### Installation\n\n```sh\nnpm install @clerk/backend-core\n```\n\n### Build\n\nTo build the package locally with the TypeScript compiler, run:\n\n```sh\nnpm run build\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities, without being platform/environment, specific such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendApi](./src/api/ClerkBackendApi.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendApi` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n## Usage\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendApi](./src/api/ClerkBackendApi.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://reference.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendApi.ts#17) implementation.\n\n## Support\n\nYou can get in touch with us in any of the following ways:\n\n- Join our official community [Discord server](https://discord.com/invite/b5rXHjAg7A)\n- Open a [GitHub support issue](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n- Contact options listed on [our Support page](https://clerk.dev/support?utm_source=github&utm_medium=clerk_backend_core)\n\n## Contributing\n\nWe're open to all community contributions! If you'd like to contribute in any way, please read [our contribution guidelines](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/CONTRIBUTING.md).\n\n## Security\n\n`@clerk/backend-core` follows good practices of security, but 100% security cannot be assured.\n\n`@clerk/backend-core` is provided **\"as is\"** without any **warranty**. Use at your own risk.\n\n_For more information and to report security issues, please refer to our [security documentation](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/SECURITY.md)._\n\n## License\n\nThis project is licensed under the **MIT license**.\n\nSee [LICENSE](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/LICENSE) for more information.\n","engines":{"node":">=14"},"gitHead":"1e2d5adaccd1b6075d5dd6d7507b2588bb4bf293","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","lint":"eslint .","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix","clean":"rimraf ./dist"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v18.12.0+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"18.12.0","dependencies":{"tslib":"^2.3.1","node-fetch":"^2.6.0","@types/node":"^16.11.55","@clerk/types":"^3.14.0-staging.7","query-string":"^7.0.1","snakecase-keys":"^5.4.4","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.4.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","typescript":"*","@types/jest":"^27.4.0"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.10.0-staging.7_1667491431312_0.6528212918497465","host":"s3://npm-registry-packages"}},"2.10.0":{"name":"@clerk/backend-core","version":"2.10.0","license":"MIT","_id":"@clerk/backend-core@2.10.0","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"7c619c6beb07e69bbccc849bc14c5229dac19065","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.10.0.tgz","fileCount":323,"integrity":"sha512-+fsIwRjntKEhPP9Lq19A7lPFbo3QzKcEfon2263+1bs9uyP57WRzWLrUXzELd0uW6VM3pPAwlGODJYErx0nyvA==","signatures":[{"sig":"MEUCIBn7+8BkXtqo6oqrqNJ1YTdNNnOC7iNHKckL8SEQtoGyAiEAtFG8kX1t7NUYwTUlr25WpMxv8hS4ed2k8iKsW1wQrMo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":555561,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjZAmvACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrVqRAAiz878Y8Q2FMR64lbi/utrpqFi6mcT/oESq6341T8w3VgD4vA\r\n4K1wywpdO3RTCqm/fXpqjj4LJTY8uvpM/ZxcwEXY8FIyDSw56qkJtUeMiG/R\r\nnThuCymW5uFbtAPtTay0phfwFJDYpEMOqnNbR4Sy1wNyIvscMI1WgfOtjXWj\r\nY1a+Sapt7xcWqMu3dulNt5vW0XyL+CtuhDFxqR0f1jGhrW5nBRbM7f0hdxkw\r\n9CNiDdrFiHn6jzhMEneIPdoTRQCuW+b+9xM3Y7MrrvFDOfuAWwQkSoE5+aNc\r\nP0uQDstSrZrbuoCrTOR+m1ix7wSKqQpDmW77/2SJn5dqjuWDUW9bwwlTpafs\r\n3FLYkyQeVrQmXEZ8uc1kU1bU+/jKfZ+Q7NlJCod94xwlH5r1OAkU3W6lHNyP\r\nPk95v6rTinIA3VnjgB53IIOtmI9bcVzF8Dx1m7da4Y+BuzdE65AHF60IpfNn\r\nQtzJAZ/Kd1cRRn0HukjFrOPHg0UhHGYqOwGrrhIN/5WpO6qK7G8BCuEuK69i\r\nuSDynYzyshs6URu5GzBlacWec3rEZTDTkY3Ve0O9WXwyXDkoLiL2e/Uj8byI\r\nIxtuWHyCsGnmXMcb4/W17b+OSoicm4CcOkSiavFJhD8zIKjzRvGWPDvQqHTu\r\nSWkCQFvNKNUwKwDsNUFzAQxD9fdm66a2w+g=\r\n=w+pa\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","engines":{"node":">=14"},"gitHead":"bbddc9471ae2695eeb68ad818896c19312e7c625","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","lint":"eslint .","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix","clean":"rimraf ./dist"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v18.12.0+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"18.12.0","dependencies":{"tslib":"^2.3.1","node-fetch":"^2.6.0","@types/node":"^16.11.55","@clerk/types":"^3.14.0","query-string":"^7.0.1","snakecase-keys":"^5.4.4","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.4.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","typescript":"*","@types/jest":"^27.4.0"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.10.0_1667500463381_0.4729006470318182","host":"s3://npm-registry-packages"}},"2.10.1-staging.0":{"name":"@clerk/backend-core","version":"2.10.1-staging.0","license":"MIT","_id":"@clerk/backend-core@2.10.1-staging.0","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"13e11c6605a74819132d7170354dfd0a60dfe435","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.10.1-staging.0.tgz","fileCount":323,"integrity":"sha512-64Zl62Lrn5THMyp9uDXCqxmltHi+F0DBmmtADqNCmydV69V8CWyfYCC5s9dmgviE0gBPLEG00QOm3WYEVtbkew==","signatures":[{"sig":"MEUCICwrEWpxxIPaHnIBM8CnzBlLta/m4psS8KmIIbjtXz83AiEAlvdHyiloNpzG+1Ga4vJ+F5A1y1cXFNklQnsbLpB9KR8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":555581,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjZG5oACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqM8Q//Vr/HBuPYwpxz+CAjY5nkAPCWeA2/Sk6ezhyA+pvILRY4HDcU\r\nYJ7Ihl/iBq6j33WcCJ9rWne0eWuO/1JDF5aINouxbM6oFC4z/yH9U3lFZ6tU\r\nMVEHiRcuZurVQuTSjR24AZse1+jU/drGAjrSO8g1LlpRpNKpqBGbg44eRcYx\r\nSvZG6q0JC/rtsqTLz721zbdewzTihv7w4pklhR1xPvrL2fOWR0CbNq6V1Rez\r\nmnl2Ak7u3qeacWmwWKDBQncb3Zx85CPWHdc5/YacyodUz84bkKesgm6knmX2\r\ncWCUp8tWR3IlrKJPk6m5MvFGrmFIAsoW0XRjwXOWjjTdQkar+uDtJz610VR1\r\nJgAP7vUKOqMGiJVZW8skCZAploNy62qiQgOHvv2bn9UY0oyOXGTR8IUxHg9D\r\nK4HmVcPqPc7N98KTSArgvi01rQZBSPI+exPM7tBkE5r0EQsNcMiy9mWTeg6H\r\ncbB5mhB25KPvNPbbv3DqVuDS0DP5O+oWklxjK52vJwymd3KYG3sfTGvzEwUN\r\neW/sZ25Fodb4ccw/FtbT0KUIxKexFE0k0VBN73U9k4EHNoXfsfmyVpzqpB0k\r\nsrkRQ0yb7ptWJIF35vjerjN77JYkaurkd9Brn11CCEjHF2fBgcjCPkkQwCkH\r\nXSKk//g74dfTd0HD+DMVJ+4kGLXVIJiTBQk=\r\n=t95g\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev?utm_source=github&utm_medium=clerk_backend_core\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <img src=\"https://images.clerk.dev/static/clerk.svg\" alt=\"Clerk logo\" height=\"50\">\n  </a>\n  <br />\n</p>\n\n# @clerk/backend-code\n\n<div align=\"center\">\n\n[![Chat on Discord](https://img.shields.io/discord/856971667393609759.svg?logo=discord)](https://discord.com/invite/b5rXHjAg7A)\n[![Clerk documentation](https://img.shields.io/badge/documentation-clerk-green.svg)](https://clerk.dev/docs?utm_source=github&utm_medium=clerk_backend_core)\n[![Follow on Twitter](https://img.shields.io/twitter/follow/ClerkDev?style=social)](https://twitter.com/intent/follow?screen_name=ClerkDev)\n\n[Changelog](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/CHANGELOG.md)\n·\n[Report a Bug](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=bug&template=bug_report.md&title=Bug%3A+)\n·\n[Request a Feature](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=Feature%3A+)\n·\n[Ask a Question](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n\n</div>\n\n---\n\n## Overview\n\nThis package provides Clerk Backend API core resources and low-level authentication utilities for JavaScript environments. It is mostly used as the base for other Clerk SDKs.\n\n## Getting Started\n\n### Installation\n\n```sh\nnpm install @clerk/backend-core\n```\n\n### Build\n\nTo build the package locally with the TypeScript compiler, run:\n\n```sh\nnpm run build\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities, without being platform/environment, specific such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendApi](./src/api/ClerkBackendApi.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendApi` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n## Usage\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendApi](./src/api/ClerkBackendApi.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://reference.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendApi.ts#17) implementation.\n\n## Support\n\nYou can get in touch with us in any of the following ways:\n\n- Join our official community [Discord server](https://discord.com/invite/b5rXHjAg7A)\n- Open a [GitHub support issue](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n- Contact options listed on [our Support page](https://clerk.dev/support?utm_source=github&utm_medium=clerk_backend_core)\n\n## Contributing\n\nWe're open to all community contributions! If you'd like to contribute in any way, please read [our contribution guidelines](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/CONTRIBUTING.md).\n\n## Security\n\n`@clerk/backend-core` follows good practices of security, but 100% security cannot be assured.\n\n`@clerk/backend-core` is provided **\"as is\"** without any **warranty**. Use at your own risk.\n\n_For more information and to report security issues, please refer to our [security documentation](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/SECURITY.md)._\n\n## License\n\nThis project is licensed under the **MIT license**.\n\nSee [LICENSE](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/LICENSE) for more information.\n","engines":{"node":">=14"},"gitHead":"5ddb2d595651fd395946f3dd2e0d5d5e4932020d","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","lint":"eslint .","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix","clean":"rimraf ./dist"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v18.12.0+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"18.12.0","dependencies":{"tslib":"^2.3.1","node-fetch":"^2.6.0","@types/node":"^16.11.55","@clerk/types":"^3.14.1-staging.0","query-string":"^7.0.1","snakecase-keys":"^5.4.4","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.4.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","typescript":"*","@types/jest":"^27.4.0"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.10.1-staging.0_1667526248521_0.29558429440279066","host":"s3://npm-registry-packages"}},"2.10.1-staging.1":{"name":"@clerk/backend-core","version":"2.10.1-staging.1","license":"MIT","_id":"@clerk/backend-core@2.10.1-staging.1","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"02432cc79aa995aadcd3b0e78bf53c58f3f7efc1","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.10.1-staging.1.tgz","fileCount":323,"integrity":"sha512-fJPi27j+kpzdzKeTEGA445MZ2GEBW8sd4iU5K+vc0HQGYdfZGN//QWPlWvynk9s/FvuHzQGjccA+y0Y/d6AysA==","signatures":[{"sig":"MEQCIEJ//r77Q9pJCAieAumvSdyIXf8HiAIOjqc6IlnXNWeHAiB+SFIPw1cZeWOVfNuPoh5yCVl0iMA2uwriCCOieX2nqA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":555581,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjZRUAACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo88RAAo4LRevKWh0eTv8S/1X1CDcckO6lZOuYBlM3AHk+kq3pzQ2ku\r\nUth7IqcclayLGVe2WyOO8g7KjqCOJA+fXJwbp0LZgyoEvZwA5u/0/tKHvqL7\r\n3/iWz3yFrE/ykFO9tw+/zVhGP2EH6PX07LAdm8InNLw1Wm0ujLv1qKMCnhSF\r\n/VUMChYheWF35fY8tIsd6lAS9Yqs23XhVcYcsgKBBKxwT7PLeUnTq5dGzAE7\r\n1GfiM1ZxCKa0Oyj7vNNyHv7NDVDkDRibnJNJTzy3YxUzSOPX/7WDLxEEs9Jy\r\n3a0J8JyeVTtpIRg03tch1cmUIWswxYNAwEiu2q1BPIloZErEIUXRj/BcMG1f\r\ncOxgPa3Zgbl0CpRb9r4xOltFPE18K5DwE2UG5AanMI5QQ4N37/jtsS/NvcaN\r\nemGf3BN2anzaaQ4X1Azo4DkrpXcdHAXG0w6l2JaPSKo3RlyE0/cZmAgS5huK\r\nguvqHHina7zSyxBhg45ZHwFAovVH3SGuuJnSUPqLpq6XSQKnuB6wSD0/7UbP\r\nasCtybi+nl5DwJex+CwQ7etmk84iKTAe1Hh+9ACQdc1AoD4+9glvQlDNoPsn\r\n0wv2csBbKBVpSnFsTzmsaH1PY7XoR47Apro5e0LfpLzvX+VOhXhcI8U5jJ76\r\nReibN//Ong2yxHIyPkEDyLxdol0XIT0oWro=\r\n=rptt\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev?utm_source=github&utm_medium=clerk_backend_core\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <img src=\"https://images.clerk.dev/static/clerk.svg\" alt=\"Clerk logo\" height=\"50\">\n  </a>\n  <br />\n</p>\n\n# @clerk/backend-code\n\n<div align=\"center\">\n\n[![Chat on Discord](https://img.shields.io/discord/856971667393609759.svg?logo=discord)](https://discord.com/invite/b5rXHjAg7A)\n[![Clerk documentation](https://img.shields.io/badge/documentation-clerk-green.svg)](https://clerk.dev/docs?utm_source=github&utm_medium=clerk_backend_core)\n[![Follow on Twitter](https://img.shields.io/twitter/follow/ClerkDev?style=social)](https://twitter.com/intent/follow?screen_name=ClerkDev)\n\n[Changelog](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/CHANGELOG.md)\n·\n[Report a Bug](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=bug&template=bug_report.md&title=Bug%3A+)\n·\n[Request a Feature](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=Feature%3A+)\n·\n[Ask a Question](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n\n</div>\n\n---\n\n## Overview\n\nThis package provides Clerk Backend API core resources and low-level authentication utilities for JavaScript environments. It is mostly used as the base for other Clerk SDKs.\n\n## Getting Started\n\n### Installation\n\n```sh\nnpm install @clerk/backend-core\n```\n\n### Build\n\nTo build the package locally with the TypeScript compiler, run:\n\n```sh\nnpm run build\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities, without being platform/environment, specific such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendApi](./src/api/ClerkBackendApi.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendApi` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n## Usage\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendApi](./src/api/ClerkBackendApi.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://reference.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendApi.ts#17) implementation.\n\n## Support\n\nYou can get in touch with us in any of the following ways:\n\n- Join our official community [Discord server](https://discord.com/invite/b5rXHjAg7A)\n- Open a [GitHub support issue](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n- Contact options listed on [our Support page](https://clerk.dev/support?utm_source=github&utm_medium=clerk_backend_core)\n\n## Contributing\n\nWe're open to all community contributions! If you'd like to contribute in any way, please read [our contribution guidelines](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/CONTRIBUTING.md).\n\n## Security\n\n`@clerk/backend-core` follows good practices of security, but 100% security cannot be assured.\n\n`@clerk/backend-core` is provided **\"as is\"** without any **warranty**. Use at your own risk.\n\n_For more information and to report security issues, please refer to our [security documentation](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/SECURITY.md)._\n\n## License\n\nThis project is licensed under the **MIT license**.\n\nSee [LICENSE](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/LICENSE) for more information.\n","engines":{"node":">=14"},"gitHead":"04282ba709af32e8dd10ef0a4b1f44c73365c620","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","lint":"eslint .","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix","clean":"rimraf ./dist"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v18.12.0+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"18.12.0","dependencies":{"tslib":"^2.3.1","node-fetch":"^2.6.0","@types/node":"^16.11.55","@clerk/types":"^3.15.0-staging.0","query-string":"^7.0.1","snakecase-keys":"^5.4.4","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.4.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","typescript":"*","@types/jest":"^27.4.0"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.10.1-staging.1_1667568896505_0.7275567727588788","host":"s3://npm-registry-packages"}},"2.10.1-staging.2":{"name":"@clerk/backend-core","version":"2.10.1-staging.2","license":"MIT","_id":"@clerk/backend-core@2.10.1-staging.2","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"b18bf97035a906ddecf5d3288160945e249965bb","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.10.1-staging.2.tgz","fileCount":323,"integrity":"sha512-eOPf8Nbne0VKUuAHZwJiCCVxiQ80Vqy79FRKjA+mOJd4rneVr8gsCyqs2q0qcUU7G7WLSF49M3rRcWsBpSDE6A==","signatures":[{"sig":"MEUCIGi4P6Eid4erNGKzGjiwhIHAtPxAPpYcNdxuH0kH4ZeEAiEAhK5FqgBFipIrjjgz8I1QAlQSgkSkF4KkGbTIkUqyvt8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":555581,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjZUdiACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrkfQ/+MehazzfPKwqrKkKdGE4hrtK65+59H2NlPAOqZ5v7rKe/VPwh\r\nwk15IMqRVL/68b9H1in+ScU/+BTal7c/fow+HpwkZXp1Pq01m8tzk+EwNJPz\r\n2y0w7koI6z4zKM0pL5uZ0amfcSjIeRmtcd9FrrcVPDDbgm15R6vEfm+mHr5H\r\nU98WHaWcmNd5vZVgLddpAAJ0dLGaCjQUgkuGDgeUqHrxu0Wlq088FpIFbNxu\r\nAiZbxLE4B2aMQs1YAwPJVGU5ILv+zEf0XmRTSHPHGr6PTKWr0RK/G0VQ+I1F\r\nELJFFqCRyexzXbJYmipYNCwZoRjuZimjVNsPLayasg6Y8H7w+KQhBTmS33c+\r\nfOOPn6Qddtl3oBruuFMv6PWlKFp87nT7k2zA7hnHLEboVyWIh2kGH0RPXU74\r\n5+MgN8kB7qNW/RWTHD8RpyELXlTHaPILVo9s5nvVP+kvNO5dK5HcLfC4wwzu\r\n98BNLNSPbshycBNMSqNwwsyEoMjbTg1LSx1uUFDDrRgaYY6m8dL4bcSa7v5D\r\nfONw+2atA4Pd31ioa3Ajvp411Fe1Vpwg0PA8jCwzjSQbTMO71gwPxdn4Ifrs\r\nZ4Cz+qmF3XHI3Ps8Fw4MWJurKp9FgSRU72HOWDQAjv8f2nLk9KuJs43/ZTw+\r\nbmPwKPuIPpWi9912NpdAMC6C2j2upTl7AN4=\r\n=JTqH\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev?utm_source=github&utm_medium=clerk_backend_core\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <img src=\"https://images.clerk.dev/static/clerk.svg\" alt=\"Clerk logo\" height=\"50\">\n  </a>\n  <br />\n</p>\n\n# @clerk/backend-code\n\n<div align=\"center\">\n\n[![Chat on Discord](https://img.shields.io/discord/856971667393609759.svg?logo=discord)](https://discord.com/invite/b5rXHjAg7A)\n[![Clerk documentation](https://img.shields.io/badge/documentation-clerk-green.svg)](https://clerk.dev/docs?utm_source=github&utm_medium=clerk_backend_core)\n[![Follow on Twitter](https://img.shields.io/twitter/follow/ClerkDev?style=social)](https://twitter.com/intent/follow?screen_name=ClerkDev)\n\n[Changelog](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/CHANGELOG.md)\n·\n[Report a Bug](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=bug&template=bug_report.md&title=Bug%3A+)\n·\n[Request a Feature](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=Feature%3A+)\n·\n[Ask a Question](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n\n</div>\n\n---\n\n## Overview\n\nThis package provides Clerk Backend API core resources and low-level authentication utilities for JavaScript environments. It is mostly used as the base for other Clerk SDKs.\n\n## Getting Started\n\n### Installation\n\n```sh\nnpm install @clerk/backend-core\n```\n\n### Build\n\nTo build the package locally with the TypeScript compiler, run:\n\n```sh\nnpm run build\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities, without being platform/environment, specific such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendApi](./src/api/ClerkBackendApi.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendApi` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n## Usage\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendApi](./src/api/ClerkBackendApi.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://reference.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendApi.ts#17) implementation.\n\n## Support\n\nYou can get in touch with us in any of the following ways:\n\n- Join our official community [Discord server](https://discord.com/invite/b5rXHjAg7A)\n- Open a [GitHub support issue](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n- Contact options listed on [our Support page](https://clerk.dev/support?utm_source=github&utm_medium=clerk_backend_core)\n\n## Contributing\n\nWe're open to all community contributions! If you'd like to contribute in any way, please read [our contribution guidelines](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/CONTRIBUTING.md).\n\n## Security\n\n`@clerk/backend-core` follows good practices of security, but 100% security cannot be assured.\n\n`@clerk/backend-core` is provided **\"as is\"** without any **warranty**. Use at your own risk.\n\n_For more information and to report security issues, please refer to our [security documentation](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/SECURITY.md)._\n\n## License\n\nThis project is licensed under the **MIT license**.\n\nSee [LICENSE](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/LICENSE) for more information.\n","engines":{"node":">=14"},"gitHead":"738f8a00a2a9a6efdc6bc48e15b9e810ab46621b","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","lint":"eslint .","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix","clean":"rimraf ./dist"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v18.12.0+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"18.12.0","dependencies":{"tslib":"^2.3.1","node-fetch":"^2.6.0","@types/node":"^16.11.55","@clerk/types":"^3.15.0-staging.1","query-string":"^7.0.1","snakecase-keys":"^5.4.4","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.4.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","typescript":"*","@types/jest":"^27.4.0"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.10.1-staging.2_1667581793925_0.4654007167512708","host":"s3://npm-registry-packages"}},"2.10.1-staging.3":{"name":"@clerk/backend-core","version":"2.10.1-staging.3","license":"MIT","_id":"@clerk/backend-core@2.10.1-staging.3","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"980c1f3cca2dbad4f47ae0bc241bd582216d6c6f","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.10.1-staging.3.tgz","fileCount":323,"integrity":"sha512-z5EA5htDutoSlxkCw11+Ea8P1He7IVk3+qTHMpuH1d0hOFeOqHQNLbtllp30wxGdxe7F5xWFkmzjvJa9PfGhpA==","signatures":[{"sig":"MEQCIFp1JdHgdAk7SJWOA6qOW6whqIRmvTEfTAg4T16MdqT0AiBSiVob4AylzJpsfLcNQtTFM5J5RLiIcH643eMd6CreaQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":555581,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjZZbQACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq7OA/+JlHVpVWdoTBSSj6Ib9AB1RQXPTNcgyk2SH+VKOjVV2kTizod\r\nnLZXcHruAkVQ4xDRW4m5TZ3UrfPJqsxXx66pfcgso1U3t/v+QnUssj7bvYKH\r\nUNdJQk3o/1VHFhcFWsDYOE/PAIZQZrkWRywiOm+vgxFCDe9tcqvw5MffGM7U\r\nVDXpVTl1jfB9ucuoehZffuOckpgrcBHjL7r7j6/4UVLZiYZgzocIQR8gpEs8\r\nefaP3zjI6sQm7Zc6NBM18x07n0GaNjBRXB9R/cliWfeK1p740jk0BG6vG1Mf\r\nRGxYICA2RkNRRmxg18RrmcMnN9YqB7dn12nPnJS+sff1RgITzXQywjFpc7yl\r\nvcwuglq8O3b2B87ZI9f3bi3xhDipgSSUgv1NmUOV53PoECf6vBWNAwC8qnLO\r\n3hR564cq+HwZnKGZU5ILtzXQEa92SEP9UIK0lVwAq5dbrNpiDsVPLYAEK7Km\r\n5Wp/Wn0D5R0b45gINJdyzLdtKgvxorZ5/3nphQeslCv09i+DrPwzCcYb1c6d\r\nGw7Gt13qVaA28sy9UdstWBb9oFaGeuh5RR/RCtM5h5Qeg+JcfG0Wd//eY9KX\r\nO8z/P8Jcq9/5DelawSErFhhsHqf7iJc4YGejGAj7VJeyrRt0+0+HkD8HY2Ef\r\ngDT0PGCvDDvXhU/mAiOEs4ALfGYo2l0GvtY=\r\n=O15/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev?utm_source=github&utm_medium=clerk_backend_core\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <img src=\"https://images.clerk.dev/static/clerk.svg\" alt=\"Clerk logo\" height=\"50\">\n  </a>\n  <br />\n</p>\n\n# @clerk/backend-code\n\n<div align=\"center\">\n\n[![Chat on Discord](https://img.shields.io/discord/856971667393609759.svg?logo=discord)](https://discord.com/invite/b5rXHjAg7A)\n[![Clerk documentation](https://img.shields.io/badge/documentation-clerk-green.svg)](https://clerk.dev/docs?utm_source=github&utm_medium=clerk_backend_core)\n[![Follow on Twitter](https://img.shields.io/twitter/follow/ClerkDev?style=social)](https://twitter.com/intent/follow?screen_name=ClerkDev)\n\n[Changelog](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/CHANGELOG.md)\n·\n[Report a Bug](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=bug&template=bug_report.md&title=Bug%3A+)\n·\n[Request a Feature](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=Feature%3A+)\n·\n[Ask a Question](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n\n</div>\n\n---\n\n## Overview\n\nThis package provides Clerk Backend API core resources and low-level authentication utilities for JavaScript environments. It is mostly used as the base for other Clerk SDKs.\n\n## Getting Started\n\n### Installation\n\n```sh\nnpm install @clerk/backend-core\n```\n\n### Build\n\nTo build the package locally with the TypeScript compiler, run:\n\n```sh\nnpm run build\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities, without being platform/environment, specific such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendApi](./src/api/ClerkBackendApi.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendApi` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n## Usage\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendApi](./src/api/ClerkBackendApi.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://reference.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendApi.ts#17) implementation.\n\n## Support\n\nYou can get in touch with us in any of the following ways:\n\n- Join our official community [Discord server](https://discord.com/invite/b5rXHjAg7A)\n- Open a [GitHub support issue](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n- Contact options listed on [our Support page](https://clerk.dev/support?utm_source=github&utm_medium=clerk_backend_core)\n\n## Contributing\n\nWe're open to all community contributions! If you'd like to contribute in any way, please read [our contribution guidelines](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/CONTRIBUTING.md).\n\n## Security\n\n`@clerk/backend-core` follows good practices of security, but 100% security cannot be assured.\n\n`@clerk/backend-core` is provided **\"as is\"** without any **warranty**. Use at your own risk.\n\n_For more information and to report security issues, please refer to our [security documentation](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/SECURITY.md)._\n\n## License\n\nThis project is licensed under the **MIT license**.\n\nSee [LICENSE](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/LICENSE) for more information.\n","engines":{"node":">=14"},"gitHead":"5e065c7827d7921a8785e650e221d5cbd2b9d6d0","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","lint":"eslint .","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix","clean":"rimraf ./dist"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v18.12.0+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"18.12.0","dependencies":{"tslib":"^2.3.1","node-fetch":"^2.6.0","@types/node":"^16.11.55","@clerk/types":"^3.15.0-staging.2","query-string":"^7.0.1","snakecase-keys":"^5.4.4","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.4.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","typescript":"*","@types/jest":"^27.4.0"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.10.1-staging.3_1667602127851_0.9549754290375698","host":"s3://npm-registry-packages"}},"2.10.1":{"name":"@clerk/backend-core","version":"2.10.1","license":"MIT","_id":"@clerk/backend-core@2.10.1","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"06597ed60f2eda28954759c4ee6706641f11fde5","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.10.1.tgz","fileCount":323,"integrity":"sha512-7n5ggE9RK0b1vETOH3W3PCv45ly0lsx4o0UgqzcbvrgQMpeu27xxaahw50s7qRONt2SoyRiaa+j+AirQyc6qwQ==","signatures":[{"sig":"MEYCIQDKJj4qaTmmXE11ajdLvheW7gaqtxGTZfBVTmWD+u3zaQIhAL80KcY1wsQY8JFNh9M8HZIxlDLbsKa2rCrBG1sZimKm","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":555763,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjZa3HACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqkZQ//SeLpwsVqc0/0CiG+oZPU8vgGgsDUs6axGJHFEkm16B+kDu08\r\nL1rvhT1njQjc9wpG0X5vwoXKZxI/afIc6mB/+YVjcgksrlB3uOd4ZaenJQj+\r\nRfQE2hqDu3T0vZb5wz5PNbVyTZyAZQpkTswX0wEoiPQmN4L38ZrvXoxh2x9f\r\nj+bNcsCTmBrKygOb6AowV/vGhQ/MehlS9AKkfwe4rZ8rmSDtK6L8h4azDNi/\r\nwCiW5Zy0u32NsWMtVlQJ0JsHrXE5UYQlN6GgqI5taCVkaDD/i+SpxtzZwSl5\r\nOAzgaDFlVFzNRaUv+zKfk0BtOjQQpW2c9siE1avKkHOpINFCmM44smt/7ieL\r\nk8MUi0cCmaSVHabVU+k1YsbluennjZS19xL9HQk/yUj/Dv4Ii6w9nZGi0mWH\r\nV4C+A8Zp9zGXZx/WJuWWoRQZt+5NBLSd3mxZMjMGHw0+yGptqXcosYKq8uUL\r\nI5mfg75WdIWhdka17xYN8GtqEHOZFUhripydkgwGue1EJxvvHVOhyfmVYZRt\r\nGWe92ne2ThOsbSKPE4+0yVNs3D8cdtXeQAbsn+BtGmsIh4MBjvzZI6gUGXat\r\nUK8BxoufxnVfDCvHJprT8QiscwwXdwE92Gb3Vd/qszY+iac1A9EjHA5Dg3IQ\r\nEL2+hgmg+n3e9v5yb1nTP86eyJ2GnQH1ztU=\r\n=AsAF\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","engines":{"node":">=14"},"gitHead":"c93fd33ad514a4c33109ee19cc644eba96c7bb11","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","lint":"eslint .","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix","clean":"rimraf ./dist"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v18.12.0+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"18.12.0","dependencies":{"tslib":"^2.3.1","node-fetch":"^2.6.0","@types/node":"^16.11.55","@clerk/types":"^3.15.0","query-string":"^7.0.1","snakecase-keys":"^5.4.4","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.4.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","typescript":"*","@types/jest":"^27.4.0"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.10.1_1667608006922_0.6290265150517702","host":"s3://npm-registry-packages"}},"2.11.0-staging.0":{"name":"@clerk/backend-core","version":"2.11.0-staging.0","license":"MIT","_id":"@clerk/backend-core@2.11.0-staging.0","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"eea0dc57b750c4574a8ce5faca537a3ed53b3259","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.11.0-staging.0.tgz","fileCount":346,"integrity":"sha512-5adBTKTVG7dMWaXJItJ6b664qAM+NA7jlv31jj+qJvra1j/uye2BaEM4GeWqERA6E+19GKoaGditsUKYo0+xnw==","signatures":[{"sig":"MEUCIQDhXaj5CcOGm09diLTJ8QoRarmnH9Uh9bIDeH0rSxc4+QIgBE/MIJ583qY5SLNPsiSD7xNg2Pziu0XvPOrPz8YGuqQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":579611,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjbOqCACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrRwQ/9FYztWthLzq9QZvvvDo53SsHzNC51Hgm72J6l0tk5EUu5Dnn6\r\nj2eRAVIEZAB/UI9j/lANxALmxhJ4T1dmRBMJEP5cDsIOnStsh7YGwHvhdxNx\r\ngPwQHcBfBwvB70n1RFFq8uC4TWrwMQ/2Ty3AaJtB4P1xXTA+h8qFwLlNNxUZ\r\n+ZOl1Z02ketDLOjKkTcmNIU8Q5QM1F0zPrN1jsxtn20lRaOlyVB/pqVDKK9d\r\neyHJs8HRq0NDGpBZWTwdsMpq2H04TfF0SYHa4Yu8kiAwpfCCVNxvoKwymZdU\r\nGRWEYXNEjJ8iVqsBC8Y0DGJKb9DXw7Nk62AjY3pR/R1/SV02+McABe6xD41D\r\n4ulk6dd2pEfOmpUh6mqlL3poEZJ84urHmRaYANp0HTepi517UuPyy6kKwEKY\r\nifM5bSKRZmJ6+yM1dKPCg4sEatCh/+ghv9McTIlQF9e6+DCIaNZ83Pmk06ZM\r\nipU4wl9PVXJLiGhd7fEnPjLuPNmvuJu+gKIJ8X6a2P5u9B/GySzByC+v/551\r\nzIJ5MSUJQm//p17D61WSQzaFLTwl1eSKXbIdb3yHR+RX0l+ZQkDU+nlWABxE\r\nT1M6Yem86ObjBspT0uekZQVIqiJGaNlJGjZcfqRZ3n2aVn1xCORsPeBqOABO\r\n9PlWq+HoCE3z1SCid5SuLFCBQcQPlxh6M2w=\r\n=O9WK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev?utm_source=github&utm_medium=clerk_backend_core\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <img src=\"https://images.clerk.dev/static/clerk.svg\" alt=\"Clerk logo\" height=\"50\">\n  </a>\n  <br />\n</p>\n\n# @clerk/backend-code\n\n<div align=\"center\">\n\n[![Chat on Discord](https://img.shields.io/discord/856971667393609759.svg?logo=discord)](https://discord.com/invite/b5rXHjAg7A)\n[![Clerk documentation](https://img.shields.io/badge/documentation-clerk-green.svg)](https://clerk.dev/docs?utm_source=github&utm_medium=clerk_backend_core)\n[![Follow on Twitter](https://img.shields.io/twitter/follow/ClerkDev?style=social)](https://twitter.com/intent/follow?screen_name=ClerkDev)\n\n[Changelog](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/CHANGELOG.md)\n·\n[Report a Bug](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=bug&template=bug_report.md&title=Bug%3A+)\n·\n[Request a Feature](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=Feature%3A+)\n·\n[Ask a Question](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n\n</div>\n\n---\n\n## Overview\n\nThis package provides Clerk Backend API core resources and low-level authentication utilities for JavaScript environments. It is mostly used as the base for other Clerk SDKs.\n\n## Getting Started\n\n### Installation\n\n```sh\nnpm install @clerk/backend-core\n```\n\n### Build\n\nTo build the package locally with the TypeScript compiler, run:\n\n```sh\nnpm run build\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities, without being platform/environment, specific such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendApi](./src/api/ClerkBackendApi.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendApi` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n## Usage\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendApi](./src/api/ClerkBackendApi.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://reference.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendApi.ts#17) implementation.\n\n## Support\n\nYou can get in touch with us in any of the following ways:\n\n- Join our official community [Discord server](https://discord.com/invite/b5rXHjAg7A)\n- Open a [GitHub support issue](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n- Contact options listed on [our Support page](https://clerk.dev/support?utm_source=github&utm_medium=clerk_backend_core)\n\n## Contributing\n\nWe're open to all community contributions! If you'd like to contribute in any way, please read [our contribution guidelines](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/CONTRIBUTING.md).\n\n## Security\n\n`@clerk/backend-core` follows good practices of security, but 100% security cannot be assured.\n\n`@clerk/backend-core` is provided **\"as is\"** without any **warranty**. Use at your own risk.\n\n_For more information and to report security issues, please refer to our [security documentation](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/SECURITY.md)._\n\n## License\n\nThis project is licensed under the **MIT license**.\n\nSee [LICENSE](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/LICENSE) for more information.\n","engines":{"node":">=14"},"gitHead":"8eb84ca6d3bcd7dacb9976f7df1a3034b419090a","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","lint":"eslint .","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix","clean":"rimraf ./dist"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v18.12.0+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"18.12.0","dependencies":{"tslib":"^2.3.1","node-fetch":"^2.6.0","@types/node":"^16.11.55","@clerk/types":"^3.15.1-staging.0","query-string":"^7.0.1","snakecase-keys":"^5.4.4","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.4.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","typescript":"*","@types/jest":"^27.4.0"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.11.0-staging.0_1668082305841_0.4681174454548398","host":"s3://npm-registry-packages"}},"2.11.0-staging.1":{"name":"@clerk/backend-core","version":"2.11.0-staging.1","license":"MIT","_id":"@clerk/backend-core@2.11.0-staging.1","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"ccc0643430154313f702ab6e06630deb7434f265","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.11.0-staging.1.tgz","fileCount":346,"integrity":"sha512-Uri9rYu0rayEF0iX5gNaPW2Iv/0NGltj1JGtAID39i7cQsWNDBriAxcQdxn3f0FOCHsPLr3VFel44oA5pzPhFA==","signatures":[{"sig":"MEYCIQDai5omsbyvaa5cbYfUisLu72FkaeVEqnoFygLNEZitiwIhAPWLSHGwVKOExNieD91YQBFsmTiXjH37HTqxjhgFbT9A","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":579611,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjbPoqACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrHMQ/+Kok26hiCbBzFRHS7jpiMDUlQdBABjjbb7/0C9tPvMw20QRoF\r\nd3S9zZRy5JpcG0gcpSBXYAu0+E4+kp0zaZxxRnGv4d9ISnndaRsCbwm1M+cP\r\nAtp9Lsc0FSD3UwLMofu9Iw4OQfG31dhgcEVnD673gNy3HcFC70BlyMDqfXCB\r\nvCds1+tXG8Ws6CNTTB4eV/CFLCNNDMHTcmNVhRB04fnaV+HfwNJN/UGEnJKv\r\n00XiTHvCArM5NjJbs3OB3l4lQnhl01aMKMVAOalgGNYpUj3wfT85kk0BzOAt\r\nit8XSy7hcs0cPS2Grkuz9wjKOly7W0jG3uC3Tx9WD1YKvYktjh95qlG4Ofwu\r\noYKHRMKwrG91ZRdPvphnso3HtHlM9t+Rz2tn7PvZabcoRXU7ObFXIrrOx/0q\r\nBPad8X0CReIJ359V7Ml1P5CvI/R4Gcu5P4KoBfIBRrLLlyqTsweTawiWDnAV\r\n7B+hdKFA2mKYTRhj+AaIioRkxPmOdweClRlZKhcArEQSYn5f3JjEd2brMzhn\r\nMjeIEA/PcLJK5exBdI9Ya51TdUe+LgJ7f+Ng75ZqvbTeB4PsCElh2wTkMMXL\r\n3HeYvObsaLsFAJPWVivZhZW96jKRCz8lN5PfKUisqbcYAweCvDt6mE79l1Sz\r\n8rl+RxR3BdI8/aSAuDufQHEs7QKOAIqBEKY=\r\n=pU7P\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev?utm_source=github&utm_medium=clerk_backend_core\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <img src=\"https://images.clerk.dev/static/clerk.svg\" alt=\"Clerk logo\" height=\"50\">\n  </a>\n  <br />\n</p>\n\n# @clerk/backend-code\n\n<div align=\"center\">\n\n[![Chat on Discord](https://img.shields.io/discord/856971667393609759.svg?logo=discord)](https://discord.com/invite/b5rXHjAg7A)\n[![Clerk documentation](https://img.shields.io/badge/documentation-clerk-green.svg)](https://clerk.dev/docs?utm_source=github&utm_medium=clerk_backend_core)\n[![Follow on Twitter](https://img.shields.io/twitter/follow/ClerkDev?style=social)](https://twitter.com/intent/follow?screen_name=ClerkDev)\n\n[Changelog](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/CHANGELOG.md)\n·\n[Report a Bug](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=bug&template=bug_report.md&title=Bug%3A+)\n·\n[Request a Feature](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=Feature%3A+)\n·\n[Ask a Question](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n\n</div>\n\n---\n\n## Overview\n\nThis package provides Clerk Backend API core resources and low-level authentication utilities for JavaScript environments. It is mostly used as the base for other Clerk SDKs.\n\n## Getting Started\n\n### Installation\n\n```sh\nnpm install @clerk/backend-core\n```\n\n### Build\n\nTo build the package locally with the TypeScript compiler, run:\n\n```sh\nnpm run build\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities, without being platform/environment, specific such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendApi](./src/api/ClerkBackendApi.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendApi` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n## Usage\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendApi](./src/api/ClerkBackendApi.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://reference.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendApi.ts#17) implementation.\n\n## Support\n\nYou can get in touch with us in any of the following ways:\n\n- Join our official community [Discord server](https://discord.com/invite/b5rXHjAg7A)\n- Open a [GitHub support issue](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n- Contact options listed on [our Support page](https://clerk.dev/support?utm_source=github&utm_medium=clerk_backend_core)\n\n## Contributing\n\nWe're open to all community contributions! If you'd like to contribute in any way, please read [our contribution guidelines](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/CONTRIBUTING.md).\n\n## Security\n\n`@clerk/backend-core` follows good practices of security, but 100% security cannot be assured.\n\n`@clerk/backend-core` is provided **\"as is\"** without any **warranty**. Use at your own risk.\n\n_For more information and to report security issues, please refer to our [security documentation](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/SECURITY.md)._\n\n## License\n\nThis project is licensed under the **MIT license**.\n\nSee [LICENSE](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/LICENSE) for more information.\n","engines":{"node":">=14"},"gitHead":"a6c556cbc4727ed856358341df079571c1db0923","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","lint":"eslint .","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix","clean":"rimraf ./dist"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v18.12.0+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"18.12.0","dependencies":{"tslib":"^2.3.1","node-fetch":"^2.6.0","@types/node":"^16.11.55","@clerk/types":"^3.15.1-staging.1","query-string":"^7.0.1","snakecase-keys":"^5.4.4","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.4.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","typescript":"*","@types/jest":"^27.4.0"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.11.0-staging.1_1668086314762_0.22919613899183222","host":"s3://npm-registry-packages"}},"2.11.0":{"name":"@clerk/backend-core","version":"2.11.0","license":"MIT","_id":"@clerk/backend-core@2.11.0","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"12a7ad6f13423f3c560d6e61196f71f0da948f36","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.11.0.tgz","fileCount":346,"integrity":"sha512-dG/bLk6m9QGd9KhuwPGvwwuZF+9WERNRvOZKkXwYZkd2rP1JLxOOLjRQyPWmppwitIn7kPEQrEOdcqioLFrL1w==","signatures":[{"sig":"MEQCIDGkmuZ/LWOKqTY894KLvh9RHFRbQmn1uZ4o+YYA4XlPAiA4S9mwigc+YFuQUMerJ+EaPine2wO90vPNZNccD3+96g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":579792,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjbQYUACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr3Kw//TtmTM+UfxJD5JrCi72OAdCJP/bc3XBMZcQQ/IWhjlAx4ssrG\r\nxrl7if4sCzVjY19Ef6m41q6qc73gDgMoc9C7TWyOWiT40m5b5GQZjj7ZOy5t\r\nAC1rwO0lsx7Xn21uVHf/00YSXsWGP/ixwDBP9r5ipN7svCT8rQRWbxktUUKr\r\nPRKze998dJiNQxnfPwJaFHvppY/tGZfF5GivfDr/IFRy+YvR9xgw3+1C0yQ7\r\nvIaJgw67wTV4rnQ92yGu8O++frfiXMpzOo1U0NJ9+DbPflf6r8Vv19HWxY7S\r\nKMpd+fp1xTyJ2yQkzxguRbWcsD7BsdFSTChk3OxhGrINlxLgIXcvh1tIcs6f\r\ngDQuNXD1h5YRaGdq77Mp2ZJG2ohTZZgzWgq8Ve0oSJnzHUtx+0aZMtJRdF4E\r\nTsFzArbpfMxijRlnLlzzn+Q5OIUw9iFRgX9oHZpQln7R8bCMdrMisxUlZVlw\r\nrSZXxeEsx1d9emvHkQ41c2xdGNIYLftl3JPh+xSlWaQUjHy6kdiFhzgE4/u/\r\nl3bm710EQcW07QiD6mI928a478qjLeYJFY9S2uK+dIm2Trnu2g3PzPfGO/uI\r\ndEX6ZDD3RcPGaYQPrl7zlRFMwiu5sR9e5DdrKph5QLZM/yPalmYVkqabxUO6\r\nzLzoeTjJTuw+Oju95FMNeLq22cCX3qx0cfQ=\r\n=dkrR\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","engines":{"node":">=14"},"gitHead":"2abac5bd840771e2be9298628228f5c9a755bbc9","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","lint":"eslint .","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix","clean":"rimraf ./dist"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v18.12.0+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"18.12.0","dependencies":{"tslib":"^2.3.1","node-fetch":"^2.6.0","@types/node":"^16.11.55","@clerk/types":"^3.15.1","query-string":"^7.0.1","snakecase-keys":"^5.4.4","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.4.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","typescript":"*","@types/jest":"^27.4.0"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.11.0_1668089363748_0.06106035459493908","host":"s3://npm-registry-packages"}},"2.11.1-staging.0":{"name":"@clerk/backend-core","version":"2.11.1-staging.0","license":"MIT","_id":"@clerk/backend-core@2.11.1-staging.0","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"32bee8b831c0b183a4f885fd548ae782273b0358","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.11.1-staging.0.tgz","fileCount":346,"integrity":"sha512-y3iyyBX/CmbUFLI1hM8ehuaHN8X5ijAedHbTtjTzzfR4n9bybujUA/pwdnl3G1ePJTCyCp1O8bRp3y+gj7BXag==","signatures":[{"sig":"MEQCICWzlSVMIGniwHQE6p7BIoOvy9gUtoE9Fp9cFz4bONqxAiBv6KXqfbs3n8xHYnNL+BHlbahCkiBuvrNfEbt+5/gyog==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":579812,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjbQuKACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp98Q/+I3xvYJvAAk1jvgpRyhZoprMuL4aupdgnhKfLO+eZfqahgeuS\r\nySHAk37a8uP/eDOFElsRcx574uuh8bDRAKxDsfLWl7jEWNnJJsAQI+hJoIKe\r\nXbybjuwi8c3UHD8gVREl1IwRejffxn9E1aAz6g4oUAxwt+mYOnWRtyTM+pk+\r\nZNcU+HQpnW8iTdIFoA5xmypoYkgzAG6UPu+mLA+dr392luiKkbaNVnOkiTLi\r\nwxATxmo64trgbYxpGOY8YkVMdQ0T6nADIAIGeBbx+xJwQzIiP3S3Chn8UC0g\r\nVPOObwRzeSpon83E+C0bEY29PAZqWec6mLqolfiO/tEwN0ErGBUCy2zgTzWW\r\n4Hu7QDE2KLHQbqrW2StYrFSVuttm5e8nrC6OHNrKvKRo3k/LMfwpX1cwPFiJ\r\nBUb7HclP5qOcWa7kawoOtzpe6R8hc11xeYCsOGC8Aaun0awUvgXiVLUqksYZ\r\n77rLC9OIbRPdY6bIqQovRrOjvmX/zIVlsrackI+AR3HlrADPkJOR5+593ttF\r\nznAZp2a0fIn9FjzWcKPnoUGnWb7gD3E3S7dfhulm0AdVBcw218exTUqqtCKU\r\nP3tmQgCYxc75JZp5w6glmZ4di26EIa3AmhJUhybqQUkAIxaDZH2DsOkCim/v\r\nYSxHfarPjZZ8WaYo/0rhKUG8n+WvY7F1PYU=\r\n=jFag\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev?utm_source=github&utm_medium=clerk_backend_core\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <img src=\"https://images.clerk.dev/static/clerk.svg\" alt=\"Clerk logo\" height=\"50\">\n  </a>\n  <br />\n</p>\n\n# @clerk/backend-code\n\n<div align=\"center\">\n\n[![Chat on Discord](https://img.shields.io/discord/856971667393609759.svg?logo=discord)](https://discord.com/invite/b5rXHjAg7A)\n[![Clerk documentation](https://img.shields.io/badge/documentation-clerk-green.svg)](https://clerk.dev/docs?utm_source=github&utm_medium=clerk_backend_core)\n[![Follow on Twitter](https://img.shields.io/twitter/follow/ClerkDev?style=social)](https://twitter.com/intent/follow?screen_name=ClerkDev)\n\n[Changelog](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/CHANGELOG.md)\n·\n[Report a Bug](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=bug&template=bug_report.md&title=Bug%3A+)\n·\n[Request a Feature](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=Feature%3A+)\n·\n[Ask a Question](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n\n</div>\n\n---\n\n## Overview\n\nThis package provides Clerk Backend API core resources and low-level authentication utilities for JavaScript environments. It is mostly used as the base for other Clerk SDKs.\n\n## Getting Started\n\n### Installation\n\n```sh\nnpm install @clerk/backend-core\n```\n\n### Build\n\nTo build the package locally with the TypeScript compiler, run:\n\n```sh\nnpm run build\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities, without being platform/environment, specific such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendApi](./src/api/ClerkBackendApi.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendApi` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n## Usage\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendApi](./src/api/ClerkBackendApi.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://reference.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendApi.ts#17) implementation.\n\n## Support\n\nYou can get in touch with us in any of the following ways:\n\n- Join our official community [Discord server](https://discord.com/invite/b5rXHjAg7A)\n- Open a [GitHub support issue](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n- Contact options listed on [our Support page](https://clerk.dev/support?utm_source=github&utm_medium=clerk_backend_core)\n\n## Contributing\n\nWe're open to all community contributions! If you'd like to contribute in any way, please read [our contribution guidelines](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/CONTRIBUTING.md).\n\n## Security\n\n`@clerk/backend-core` follows good practices of security, but 100% security cannot be assured.\n\n`@clerk/backend-core` is provided **\"as is\"** without any **warranty**. Use at your own risk.\n\n_For more information and to report security issues, please refer to our [security documentation](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/SECURITY.md)._\n\n## License\n\nThis project is licensed under the **MIT license**.\n\nSee [LICENSE](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/LICENSE) for more information.\n","engines":{"node":">=14"},"gitHead":"e428cd983008ccce9e41c63e5680fb2bd217b25d","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","lint":"eslint .","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix","clean":"rimraf ./dist"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v18.12.0+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"18.12.0","dependencies":{"tslib":"^2.3.1","node-fetch":"^2.6.0","@types/node":"^16.11.55","@clerk/types":"^3.15.2-staging.0","query-string":"^7.0.1","snakecase-keys":"^5.4.4","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.4.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","typescript":"*","@types/jest":"^27.4.0"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.11.1-staging.0_1668090761758_0.4358336383973995","host":"s3://npm-registry-packages"}},"2.11.1-staging.1":{"name":"@clerk/backend-core","version":"2.11.1-staging.1","license":"MIT","_id":"@clerk/backend-core@2.11.1-staging.1","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"5c9a99765cef683ad0bdc5b7dc715639962b4419","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.11.1-staging.1.tgz","fileCount":346,"integrity":"sha512-FpJMtZuOzAi8+Fv0P5EDzUN8dMgG6l9gJub0Sfs/SsVFWRVwY85B7Mapr47NYZbj416dvkUAMl/IF1FJ5KT+vw==","signatures":[{"sig":"MEYCIQDiBc14NrYEyxmKy2GBusc9RzMupr5BE2zODCmObBlkNgIhAOc67+35IygltIoqdAPQwzLklTJ8dZFXVYk9nPmNYDAI","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":579812,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjbQ/YACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoLNw/9HS15aHIfUGaoYqnHdSpdJEUW8xQg3bGwGe/XtVwUmKuJTWRX\r\nkmEJVSAEbIiSXs6WfnY72EJfCNImckcC2U73FI0DO8NbyB/VO8qowWogoW3t\r\nKvyvFXIpLyTCKDtOc6ueM+5Nkrg1CyDa1koPy9vV/5nryTdpWmaXNNOfZYkh\r\nv+4r6rq8wVwAEV51KpT/IabVakAkI7S9Vlr7iP6YjmRBAMnBuBxAY29ZVeIl\r\nMoyOjA/ubU8/KjTKHcaIhIzQN6Pu48ftjldA3Do2Ae8oesPRbrw38Jlcw3/s\r\naYVHgqmRhuomqPRh2HWB1UOwtZlqByd+jJGhDvk204pHH3CuLX7BP5ed/mGi\r\n/zbKAsWwj+BGYJd7MiJEfmYcPMDcTTHM5p9U6tpWNGKhwP1iJiMM2LETXL4P\r\nuBRDx7jl91kXiku+PpwSoioevfPKI9JWThqZWDNzmiULb7sN9VnIgTWxlSY/\r\nEYLhL7ZjIN5A5ybRpa9d927RiczeRCL2YsprqpGVhl07JGTzxjl+56Iz419t\r\n3bM/NrlDMDAKyj0UNgV/mftwx6X9Y2ZhMezUU4jHOdELEj9bTVxFkVS8d/bN\r\n+pUUa/W65Pm7YzagONFNd8U32tPj1yvou2R/u5PMeMzxMmHdEEUghb/zddQP\r\nziM2iK/lBdPWy+NBuf9jCu/QOwf/TDdYBWA=\r\n=cY+D\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev?utm_source=github&utm_medium=clerk_backend_core\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <img src=\"https://images.clerk.dev/static/clerk.svg\" alt=\"Clerk logo\" height=\"50\">\n  </a>\n  <br />\n</p>\n\n# @clerk/backend-code\n\n<div align=\"center\">\n\n[![Chat on Discord](https://img.shields.io/discord/856971667393609759.svg?logo=discord)](https://discord.com/invite/b5rXHjAg7A)\n[![Clerk documentation](https://img.shields.io/badge/documentation-clerk-green.svg)](https://clerk.dev/docs?utm_source=github&utm_medium=clerk_backend_core)\n[![Follow on Twitter](https://img.shields.io/twitter/follow/ClerkDev?style=social)](https://twitter.com/intent/follow?screen_name=ClerkDev)\n\n[Changelog](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/CHANGELOG.md)\n·\n[Report a Bug](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=bug&template=bug_report.md&title=Bug%3A+)\n·\n[Request a Feature](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=Feature%3A+)\n·\n[Ask a Question](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n\n</div>\n\n---\n\n## Overview\n\nThis package provides Clerk Backend API core resources and low-level authentication utilities for JavaScript environments. It is mostly used as the base for other Clerk SDKs.\n\n## Getting Started\n\n### Installation\n\n```sh\nnpm install @clerk/backend-core\n```\n\n### Build\n\nTo build the package locally with the TypeScript compiler, run:\n\n```sh\nnpm run build\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities, without being platform/environment, specific such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendApi](./src/api/ClerkBackendApi.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendApi` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n## Usage\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendApi](./src/api/ClerkBackendApi.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://reference.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendApi.ts#17) implementation.\n\n## Support\n\nYou can get in touch with us in any of the following ways:\n\n- Join our official community [Discord server](https://discord.com/invite/b5rXHjAg7A)\n- Open a [GitHub support issue](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n- Contact options listed on [our Support page](https://clerk.dev/support?utm_source=github&utm_medium=clerk_backend_core)\n\n## Contributing\n\nWe're open to all community contributions! If you'd like to contribute in any way, please read [our contribution guidelines](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/CONTRIBUTING.md).\n\n## Security\n\n`@clerk/backend-core` follows good practices of security, but 100% security cannot be assured.\n\n`@clerk/backend-core` is provided **\"as is\"** without any **warranty**. Use at your own risk.\n\n_For more information and to report security issues, please refer to our [security documentation](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/SECURITY.md)._\n\n## License\n\nThis project is licensed under the **MIT license**.\n\nSee [LICENSE](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/LICENSE) for more information.\n","engines":{"node":">=14"},"gitHead":"1233dd0f4118bd1ed652ebd454f4f63035a84600","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","lint":"eslint .","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix","clean":"rimraf ./dist"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v18.12.0+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"18.12.0","dependencies":{"tslib":"^2.3.1","node-fetch":"^2.6.0","@types/node":"^16.11.55","@clerk/types":"^3.15.2-staging.1","query-string":"^7.0.1","snakecase-keys":"^5.4.4","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.4.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","typescript":"*","@types/jest":"^27.4.0"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.11.1-staging.1_1668091863967_0.2898706606071282","host":"s3://npm-registry-packages"}},"2.11.1-staging.2":{"name":"@clerk/backend-core","version":"2.11.1-staging.2","license":"MIT","_id":"@clerk/backend-core@2.11.1-staging.2","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"dc150dbdde826cbab23fde5e9a26394b9d645df1","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.11.1-staging.2.tgz","fileCount":405,"integrity":"sha512-/zCVnvHNgKUdAPKhT1+I2U5BYYegdfb9d34Zrwm5GWdaV/RuD6ORkF9KMaFYVa4Vobs/3sf29awsG0tVvrXMpg==","signatures":[{"sig":"MEUCIGNEsQH+TS/xZh/iN3NuBkOyFzlhIk0yytFyukUbcVa5AiEA7C15lVOtSoM02neCrjBGA+xH6v4Unh9z9PnES6rLNjI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":625784,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjcrOAACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq1FA/+LyVPBQxaOsO27vJ9o1RLZjaM/cDwPLpmvClRu6OBuEfYq4gL\r\npQooh/SJk3aNy514bBZSrB+GS9o9NBZG6F6WkF67y2nTN7p6JmIX7RHyaJXd\r\nwM9TKInKywpr3PbFYSNMRx8J3a6lIS9p9Fq4oiYjFxp4ntbjjhmCSWvbgmfE\r\nBVKDzqeuwY+H/HYEZ6aHK/1x1+NvtqHp28MWFSySfz9trVbAB+zr/JdPkKX/\r\nHj7DNDdLgT4//5MJbUxq0EI/9n/VYlZmi6oF0jgAWmm7Livx9NilGjl9Ry32\r\ntwDEZbvMYWShsDDLEdzcvH+Z67DR4nCKGaLCaTkNdydQGl/jADXSA1Ej1viW\r\n/OQ2j++thdqA0iSUxTFmofFMrdr5yLJuhCu/ia+HmBlCowImeBw1sjoMqqWb\r\nDev7pMbaJq+NYMbucDo+308EsNxdvo1ZEqvN9yPkPbyjheZ1fXIQqWU+jwee\r\nVNe5u+9HqpRv3kRFhsyTZ1atAW8vXzW+z9bZGEo1SbTMw3oKJ8eNK+f2jozM\r\nh7XzUHg+/0ogeTJgnOLnHY/Ha6t4SVe9nOe0IMBzYKM5u6cd0vm1tWVmRu/D\r\nuC7I/7ArehWqqiyPSX7zfsZBDBaGLj32zR6dLnAYs1wshqbn1q6qegzwCLnY\r\nUSmKk1BmDwHT2gPRa6TXNS4V9AbVSUC1AKs=\r\n=NtfR\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev?utm_source=github&utm_medium=clerk_backend_core\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <img src=\"https://images.clerk.dev/static/clerk.svg\" alt=\"Clerk logo\" height=\"50\">\n  </a>\n  <br />\n</p>\n\n# @clerk/backend-core\n\n<div align=\"center\">\n\n[![Chat on Discord](https://img.shields.io/discord/856971667393609759.svg?logo=discord)](https://discord.com/invite/b5rXHjAg7A)\n[![Clerk documentation](https://img.shields.io/badge/documentation-clerk-green.svg)](https://clerk.dev/docs?utm_source=github&utm_medium=clerk_backend_core)\n[![Follow on Twitter](https://img.shields.io/twitter/follow/ClerkDev?style=social)](https://twitter.com/intent/follow?screen_name=ClerkDev)\n\n[Changelog](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/CHANGELOG.md)\n·\n[Report a Bug](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=bug&template=bug_report.md&title=Bug%3A+)\n·\n[Request a Feature](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=Feature%3A+)\n·\n[Ask a Question](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n\n</div>\n\n---\n\n## Overview\n\nThis package provides Clerk Backend API core resources and low-level authentication utilities for JavaScript environments. It is mostly used as the base for other Clerk SDKs.\n\n## Getting Started\n\n### Installation\n\n```sh\nnpm install @clerk/backend-core\n```\n\n### Build\n\nTo build the package locally with the TypeScript compiler, run:\n\n```sh\nnpm run build\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities, without being platform/environment, specific such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendApi](./src/api/ClerkBackendApi.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendApi` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n## Usage\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendApi](./src/api/ClerkBackendApi.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://reference.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendApi.ts#17) implementation.\n\n## Support\n\nYou can get in touch with us in any of the following ways:\n\n- Join our official community [Discord server](https://discord.com/invite/b5rXHjAg7A)\n- Open a [GitHub support issue](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n- Contact options listed on [our Support page](https://clerk.dev/support?utm_source=github&utm_medium=clerk_backend_core)\n\n## Contributing\n\nWe're open to all community contributions! If you'd like to contribute in any way, please read [our contribution guidelines](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/CONTRIBUTING.md).\n\n## Security\n\n`@clerk/backend-core` follows good practices of security, but 100% security cannot be assured.\n\n`@clerk/backend-core` is provided **\"as is\"** without any **warranty**. Use at your own risk.\n\n_For more information and to report security issues, please refer to our [security documentation](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/SECURITY.md)._\n\n## License\n\nThis project is licensed under the **MIT license**.\n\nSee [LICENSE](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/LICENSE) for more information.\n","engines":{"node":">=14"},"gitHead":"05254573036b1640300ed6e7187f5e083438a1fe","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","lint":"eslint .","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix","clean":"rimraf ./dist"},"_npmUser":{"name":"sokratis","email":"sokratis.vidros@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.13.0+x64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.13.0","dependencies":{"tslib":"^2.3.1","node-fetch":"^2.6.0","@types/node":"^16.11.55","@clerk/types":"^3.15.2-staging.1","query-string":"^7.0.1","snakecase-keys":"^5.4.4","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.4.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","typescript":"*","@types/jest":"^27.4.0"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.11.1-staging.2_1668461440573_0.2155596476284647","host":"s3://npm-registry-packages"}},"2.11.1-staging.3":{"name":"@clerk/backend-core","version":"2.11.1-staging.3","license":"MIT","_id":"@clerk/backend-core@2.11.1-staging.3","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"43c4319e3edc3f92d5ef45dd51b98be175244a0b","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.11.1-staging.3.tgz","fileCount":347,"integrity":"sha512-tjU0WI7pMMORmQvcc5M/HRDfFfcnF1msl1sA/rwDvR0IalTyznDUrV/D77YJR/zzZmm2e2z0eWsURoHdpPpAYg==","signatures":[{"sig":"MEQCIHic+5mOTp+NLhQt2sf30KBz2534R0S0ADJkL5Jrz5CtAiA/jbiPY6ArONoWsViCvdREqYkwneS0mS1xYVgn+Jx1fw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":581616,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjc2XnACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoTVA//ZE8TUsHkvUgztIaD021QoN7Io0CBJmw+0HRe4PfqHIkva+Qx\r\nMK6qO4zQWlAszjbj49NfWQT2fDoDSSTVVxJYypozWGgyu092IrDje1tkyYPl\r\nsnU4ZU1Kuqpz5vAXf7OYRTvlkS45F2z4gdF8N3N79UNgg7RzJtuiG7TJ7+IL\r\nBD8BDlAUFF0l/hiFYYj/sYCWBxBPs6RuNHy4WQmP/tsU8s2hnUVBgAxj5WRb\r\n+fspJMwUSdjigTREJoqAYue2k/etRH9tHNK/GxVLBsPhvasLTkszL3oK5Qt5\r\nk3tXgRsV0gfVvVz9Ig6kwG7jlVkLTUkET9snL8jLUW45LCcB0XGEqV2Vs36l\r\nvqjBdnDmwXhpSN6Z484Zb4RmsOBaCr31+x8esdE6xmReKUacEulCqeF/gakB\r\n61wEkflSfTgcQRAh3PGmGd3xj7JJerr00YNFgWVfUHlEhp79/Wwj/ao0wsbi\r\nR4k0skR+0pFT1SehDg3vUKyC5wDKsDgV6MHUMvIjO4V6qZiYgMvOOQeE6QBo\r\nOuavLlXrXbyawJZqukS3+0ZQ6OcVcZZZjf2dxiphLjdo5rW6oVif4/wdhTAy\r\npWKwxzzj+viPE00EiurGgnjhPJ/F/LieMplVYllPuVgQU5NX4Gm0L1754a6W\r\nnIAAO0M9w+QSNa9v1TQCvzmxMOzeep/6Vq4=\r\n=xcml\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev?utm_source=github&utm_medium=clerk_backend_core\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <img src=\"https://images.clerk.dev/static/clerk.svg\" alt=\"Clerk logo\" height=\"50\">\n  </a>\n  <br />\n</p>\n\n# @clerk/backend-core\n\n<div align=\"center\">\n\n[![Chat on Discord](https://img.shields.io/discord/856971667393609759.svg?logo=discord)](https://discord.com/invite/b5rXHjAg7A)\n[![Clerk documentation](https://img.shields.io/badge/documentation-clerk-green.svg)](https://clerk.dev/docs?utm_source=github&utm_medium=clerk_backend_core)\n[![Follow on Twitter](https://img.shields.io/twitter/follow/ClerkDev?style=social)](https://twitter.com/intent/follow?screen_name=ClerkDev)\n\n[Changelog](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/CHANGELOG.md)\n·\n[Report a Bug](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=bug&template=bug_report.md&title=Bug%3A+)\n·\n[Request a Feature](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=Feature%3A+)\n·\n[Ask a Question](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n\n</div>\n\n---\n\n## Overview\n\nThis package provides Clerk Backend API core resources and low-level authentication utilities for JavaScript environments. It is mostly used as the base for other Clerk SDKs.\n\n## Getting Started\n\n### Installation\n\n```sh\nnpm install @clerk/backend-core\n```\n\n### Build\n\nTo build the package locally with the TypeScript compiler, run:\n\n```sh\nnpm run build\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities, without being platform/environment, specific such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendApi](./src/api/ClerkBackendApi.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendApi` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n## Usage\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendApi](./src/api/ClerkBackendApi.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://reference.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendApi.ts#17) implementation.\n\n## Support\n\nYou can get in touch with us in any of the following ways:\n\n- Join our official community [Discord server](https://discord.com/invite/b5rXHjAg7A)\n- Open a [GitHub support issue](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n- Contact options listed on [our Support page](https://clerk.dev/support?utm_source=github&utm_medium=clerk_backend_core)\n\n## Contributing\n\nWe're open to all community contributions! If you'd like to contribute in any way, please read [our contribution guidelines](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/CONTRIBUTING.md).\n\n## Security\n\n`@clerk/backend-core` follows good practices of security, but 100% security cannot be assured.\n\n`@clerk/backend-core` is provided **\"as is\"** without any **warranty**. Use at your own risk.\n\n_For more information and to report security issues, please refer to our [security documentation](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/SECURITY.md)._\n\n## License\n\nThis project is licensed under the **MIT license**.\n\nSee [LICENSE](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/LICENSE) for more information.\n","engines":{"node":">=14"},"gitHead":"d97b61fcb4ff4ff01c7a4446dbe8896b1fe2ea6d","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","lint":"eslint .","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix","clean":"rimraf ./dist"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v18.12.0+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"18.12.0","dependencies":{"tslib":"^2.3.1","node-fetch":"^2.6.0","@types/node":"^16.11.55","@clerk/types":"^3.16.0-staging.0","query-string":"^7.0.1","snakecase-keys":"^5.4.4","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.4.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","typescript":"*","@types/jest":"^27.4.0"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.11.1-staging.3_1668507111372_0.030653416502127273","host":"s3://npm-registry-packages"}},"2.11.1":{"name":"@clerk/backend-core","version":"2.11.1","license":"MIT","_id":"@clerk/backend-core@2.11.1","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"122ccd1f49b179fbe0ea913051bf13e6eca03e00","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.11.1.tgz","fileCount":351,"integrity":"sha512-3SNYSUe91/DtgzAiOy7PnC9r1ig0PKeW4DQQqr+2T4hhCirJKJV1ttSsbu4vNNIaVS8eXK3hBLGvaAqTMxyMkg==","signatures":[{"sig":"MEUCIAtsLxrYhGtYUdoY4uBvou+stAtOWC8CRvMKSCpMvCtGAiEAmRAFKJ/ylaDv80Au0T2an/rZfS6ZPjL6t6XbNwT1Muc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":585200,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjc8PRACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpIjw//UJIUTBzd7HnfVTRaQiZvY8FUIu+ycmxS7E0NoUxrjNyBPmkg\r\nQHHvYkhsVev6xYGuHeDrCzvg4bzEhzivIT1VBENViUSpoEZ5YEHrdvFID8if\r\n0SK1ankdlPD0fxiphnZ8xvGC91olWilixJmuE1qV29PfBoYSK6Gug75BiiP8\r\nkSoPHVdir6YeJVpGeIP+x4ACtkhp3yfMeYMnr3zm8vDketiwO969O9Rz/MaW\r\n9j9sHc2BMWAksdtlUt5evPe6B0CWPX0w1uB6HcbGBG9GkPLQPqu5V5uuQcB9\r\nWUbYo3ZH0D6BTpTiZ3Cn5yPATu/5b5eNXMraBRYrZPr/6c/tLx3j99WFAnJ4\r\nqT83YysnpCRVFQNnH7mvl7Ju0nnhOh2GR8bg6PVxM0UJuwUO9yPd6kOLYpQs\r\nzu0qxexA7BXpCVC7H3wh+7RvWXRwZuElg/acF3j+PsHAyU3v0qoDbOltsY+N\r\nI/EdmAGVx2g2ge30bscG3CV2aZTyaUgAqEpkl9UEeWixORz2szovw7Yo4MBd\r\nk+unmv7TMfDQ65kIMLx0fxptqQkjoTr4+Wd72KJ2QBessaRheyuH3FiODq+d\r\nCW5Md0JiWoU/YdJXXS7T9C2FQhpZdFrOxo5Wf5B/HZgMyjoTJ/wXvyp9HeNl\r\nhxUydFrYaZAY+PNtUVlIsO451SoyjSEiRb8=\r\n=qoTk\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","engines":{"node":">=14"},"gitHead":"7edb3447ecbd58dda3d054154d3f27671f55cfa8","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","lint":"eslint .","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix","clean":"rimraf ./dist"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v18.12.0+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"18.12.0","dependencies":{"tslib":"^2.3.1","node-fetch":"^2.6.0","@types/node":"^16.11.55","@clerk/types":"^3.16.0","query-string":"^7.0.1","snakecase-keys":"^5.4.4","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.4.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","typescript":"*","@types/jest":"^27.4.0"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.11.1_1668531152791_0.33366384965606244","host":"s3://npm-registry-packages"}},"2.11.2-staging.0":{"name":"@clerk/backend-core","version":"2.11.2-staging.0","license":"MIT","_id":"@clerk/backend-core@2.11.2-staging.0","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"b3f6073c1567d3f6d42ece40e285d6ac05debf32","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.11.2-staging.0.tgz","fileCount":351,"integrity":"sha512-fHTqtV08D7Kb8ZzDbyZWwvXdURV4pfBoT0IOkVkSVTzKzX981A8i925EIVjJdyST1g3LuBIMb17RIgMUAGoyjQ==","signatures":[{"sig":"MEUCIDR2bfMu43BbRHUmd3Nym4IZZN7C+h1sKSLeZU6F2+Z2AiEAgOD1XBFr0igKPe7M21wxHuTCLKhTM1qPf1u92jdN38g=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":585220,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjd6gnACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrXwRAAj93B0F3q0/oqczyXEkxzvBNiSVMEhy/EWjU6cdFF9e6fDBfz\r\nmotntqwytEdR/QP5qyiKyaEdJzN1O4BL/Q+1VcDsvgwHLWnTuWr2e7liWLDL\r\nGPS5J/LCnNnna8k8bFUnxeWUYjSqSwTogmSoKhZZagwQITMEMryML+Cwz/u0\r\nIblqOLI6Zzr5lZHh1DXkl/yJYmDy7r05I/Yu7jGt0pPvAJUMC+y3wr7fvJQG\r\neLILGSpBs0V2tpShQbxlP2r5YFx6zzenDbFOvqhpUAr5cUbbGmPJo7+mFAxE\r\nhkR/hOArNCUoMP5rjqZuYVpn/kUC/B3ExvH90ec+gkPdA4fwQ6xfjaEfrm5l\r\nw6fJ0KTzG/IKihC2lF+GuXwRdgQYIaODzJ16SDDGXf+iyo4NL/EmOQPoU78r\r\nk/bDYhjOC1O2NkgTQvO6+PnX27MYm7fq8jkIpuDCq7uhg3rhgPqOxMq7lRMk\r\nkTSBzS62bwFjiLQT4Olq4BnNnb3FldrpdurqjnYUdEChyZxofn6S3vfud76y\r\nzKHxYNICMHZBp9Yxur4z+bndkIrs97WCnZd5aKVJaHw8JM485YOCsi4U0Hen\r\njDYRhUnWRAV7BGUqiURChtfD4q6F0KOAYbdc6OWF31xCAOXYWDpIAeSlnKMQ\r\nw8bOMURT/fHfYiG2jwIPs3LHt47MK35GIcQ=\r\n=SlQO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev?utm_source=github&utm_medium=clerk_backend_core\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <img src=\"https://images.clerk.dev/static/clerk.svg\" alt=\"Clerk logo\" height=\"50\">\n  </a>\n  <br />\n</p>\n\n# @clerk/backend-core\n\n<div align=\"center\">\n\n[![Chat on Discord](https://img.shields.io/discord/856971667393609759.svg?logo=discord)](https://discord.com/invite/b5rXHjAg7A)\n[![Clerk documentation](https://img.shields.io/badge/documentation-clerk-green.svg)](https://clerk.dev/docs?utm_source=github&utm_medium=clerk_backend_core)\n[![Follow on Twitter](https://img.shields.io/twitter/follow/ClerkDev?style=social)](https://twitter.com/intent/follow?screen_name=ClerkDev)\n\n[Changelog](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/CHANGELOG.md)\n·\n[Report a Bug](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=bug&template=bug_report.md&title=Bug%3A+)\n·\n[Request a Feature](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=Feature%3A+)\n·\n[Ask a Question](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n\n</div>\n\n---\n\n## Overview\n\nThis package provides Clerk Backend API core resources and low-level authentication utilities for JavaScript environments. It is mostly used as the base for other Clerk SDKs.\n\n## Getting Started\n\n### Installation\n\n```sh\nnpm install @clerk/backend-core\n```\n\n### Build\n\nTo build the package locally with the TypeScript compiler, run:\n\n```sh\nnpm run build\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities, without being platform/environment, specific such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendApi](./src/api/ClerkBackendApi.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendApi` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n## Usage\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendApi](./src/api/ClerkBackendApi.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://reference.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendApi.ts#17) implementation.\n\n## Support\n\nYou can get in touch with us in any of the following ways:\n\n- Join our official community [Discord server](https://discord.com/invite/b5rXHjAg7A)\n- Open a [GitHub support issue](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n- Contact options listed on [our Support page](https://clerk.dev/support?utm_source=github&utm_medium=clerk_backend_core)\n\n## Contributing\n\nWe're open to all community contributions! If you'd like to contribute in any way, please read [our contribution guidelines](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/CONTRIBUTING.md).\n\n## Security\n\n`@clerk/backend-core` follows good practices of security, but 100% security cannot be assured.\n\n`@clerk/backend-core` is provided **\"as is\"** without any **warranty**. Use at your own risk.\n\n_For more information and to report security issues, please refer to our [security documentation](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/SECURITY.md)._\n\n## License\n\nThis project is licensed under the **MIT license**.\n\nSee [LICENSE](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/LICENSE) for more information.\n","engines":{"node":">=14"},"gitHead":"5c17dee11c54badf8926990327a53f6e52fd6a3a","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","lint":"eslint .","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix","clean":"rimraf ./dist"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v18.12.0+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"18.12.0","dependencies":{"tslib":"^2.3.1","node-fetch":"^2.6.0","@types/node":"^16.11.55","@clerk/types":"^3.16.1-staging.0","query-string":"^7.0.1","snakecase-keys":"^5.4.4","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.4.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","typescript":"*","@types/jest":"^27.4.0"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.11.2-staging.0_1668786214979_0.6310276816854392","host":"s3://npm-registry-packages"}},"2.11.2-staging.1":{"name":"@clerk/backend-core","version":"2.11.2-staging.1","license":"MIT","_id":"@clerk/backend-core@2.11.2-staging.1","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"568a4137b3a0d4984d2c18f3e4599960326fc974","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.11.2-staging.1.tgz","fileCount":351,"integrity":"sha512-7P92TlKXTok1cgu5bZFEl1J7qegRGsMc59o32U8ucUDb9ANgk0MSTKGzrPsfrRiUA87cqRBIUyNMZSxjRQQS+w==","signatures":[{"sig":"MEQCIB18OmkGSzyWNHgIir4azaVMY/3KUm4A/kBrLvi2GkwJAiBsoLllX72Zkgc9XFfbulgZVJA6/XAfjDSUEv3IKfGruw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":585220,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjd9MeACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqqIBAAlPT2BHgJeSCzifhXtixhYbN9YSYVoNN9AxtF3BVtaUOq8OJD\r\nW9mj0k3IpB/2IB4gDlAj2jzvBYfY85F8cvD5eI8J4XQkDuQlKOvIgQofJ9AF\r\n77tNdborlLwohEk6BgIZ4k+VWGTg8g1JOIe25U2I8iXpSlTlXu56BGSzKOHl\r\nqCp4Q16KPimu/aDflKWh6nWww7JyCgRYMO2jYsC/oGSDfW3iZEy6JtaJ7AQY\r\nxv9hz0SlNrhvSkXZvFXulkvyHnGA3n0JVG5R/48TlkmT5ijDOyQF97YoBU6o\r\ncnL6z7/iB4gcl29mnDzDZ92st+swqfsyrBUWCFgQPPzbIS9+krmDVqrnT0eu\r\najpzoLnoaxlz8OAwo3iPryAkE+HoB5d7DWkpaKOVyXo86ZM0jKKC0sb6tqs0\r\ng0+VM33GuJzILu4xN3QSU+pokMXVSAiu1BEuQrTP3WOX5tyGiSLtDIO26Ysw\r\ntrfSA5tckmqJWSNFPMumyixeUBpPryFnhcjU8VRghTfEYx+FjM9Ht7XptwtI\r\n9O8BYEWlNpZVBqalt2AwoEsMJTzdhfSWxXri/qJwModJxKDALpbIyJVYmGml\r\nFabIB8+YmAVdTZ9SZrPS/NdcCiPZhSaLiFwEvZ02siiYeT2cc0tWYxxtE5Iv\r\neCnD26XY48Kc9iBUAsIibjyUBaH2CybyWTM=\r\n=s9Q+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev?utm_source=github&utm_medium=clerk_backend_core\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <img src=\"https://images.clerk.dev/static/clerk.svg\" alt=\"Clerk logo\" height=\"50\">\n  </a>\n  <br />\n</p>\n\n# @clerk/backend-core\n\n<div align=\"center\">\n\n[![Chat on Discord](https://img.shields.io/discord/856971667393609759.svg?logo=discord)](https://discord.com/invite/b5rXHjAg7A)\n[![Clerk documentation](https://img.shields.io/badge/documentation-clerk-green.svg)](https://clerk.dev/docs?utm_source=github&utm_medium=clerk_backend_core)\n[![Follow on Twitter](https://img.shields.io/twitter/follow/ClerkDev?style=social)](https://twitter.com/intent/follow?screen_name=ClerkDev)\n\n[Changelog](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/CHANGELOG.md)\n·\n[Report a Bug](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=bug&template=bug_report.md&title=Bug%3A+)\n·\n[Request a Feature](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=Feature%3A+)\n·\n[Ask a Question](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n\n</div>\n\n---\n\n## Overview\n\nThis package provides Clerk Backend API core resources and low-level authentication utilities for JavaScript environments. It is mostly used as the base for other Clerk SDKs.\n\n## Getting Started\n\n### Installation\n\n```sh\nnpm install @clerk/backend-core\n```\n\n### Build\n\nTo build the package locally with the TypeScript compiler, run:\n\n```sh\nnpm run build\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities, without being platform/environment, specific such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendApi](./src/api/ClerkBackendApi.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendApi` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n## Usage\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendApi](./src/api/ClerkBackendApi.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://reference.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendApi.ts#17) implementation.\n\n## Support\n\nYou can get in touch with us in any of the following ways:\n\n- Join our official community [Discord server](https://discord.com/invite/b5rXHjAg7A)\n- Open a [GitHub support issue](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n- Contact options listed on [our Support page](https://clerk.dev/support?utm_source=github&utm_medium=clerk_backend_core)\n\n## Contributing\n\nWe're open to all community contributions! If you'd like to contribute in any way, please read [our contribution guidelines](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/CONTRIBUTING.md).\n\n## Security\n\n`@clerk/backend-core` follows good practices of security, but 100% security cannot be assured.\n\n`@clerk/backend-core` is provided **\"as is\"** without any **warranty**. Use at your own risk.\n\n_For more information and to report security issues, please refer to our [security documentation](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/SECURITY.md)._\n\n## License\n\nThis project is licensed under the **MIT license**.\n\nSee [LICENSE](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/LICENSE) for more information.\n","engines":{"node":">=14"},"gitHead":"4335299986091c208f1685851c25b18f2d095388","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","lint":"eslint .","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix","clean":"rimraf ./dist"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v18.12.0+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"18.12.0","dependencies":{"tslib":"^2.3.1","node-fetch":"^2.6.0","@types/node":"^16.11.55","@clerk/types":"^3.16.1-staging.1","query-string":"^7.0.1","snakecase-keys":"^5.4.4","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.4.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","typescript":"*","@types/jest":"^27.4.0"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.11.2-staging.1_1668797214184_0.6044663073660292","host":"s3://npm-registry-packages"}},"2.11.2":{"name":"@clerk/backend-core","version":"2.11.2","license":"MIT","_id":"@clerk/backend-core@2.11.2","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"7a85a4c43f47e1dc3df2828b4e0017233195c043","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.11.2.tgz","fileCount":351,"integrity":"sha512-ZRPdo/bcBWRSTbNn8PmO1lP/oEy2cVZe9VOKFZin7N0dtcEd/CCJIOJL1pHoita5otYUN/y+1e/rZP9Sy0IHew==","signatures":[{"sig":"MEUCIQC1nCTYfsyb28L3fd9H0wC+01XCgjz4jGNci0f1tUjrAgIgeFAN5yWHWOQFmoW2W+o+022aSuHus+5lm1M2mQyV67c=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":585402,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjd9/6ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrH/w//Yqp7SfF0yhDjO246bJyi6/ZOyue+KBznopk8uAQg6kC2rbQt\r\n3gxLluQqof16rjLgH51kRtSA5sqm0Iiw8XXncmJ/ZZu1T4sl0jS53qCuPh6l\r\nXlVemwr7OT8uMDqcZSKR7SXs1YipkdfIKh1707RJMQFgAEP3VTr+uJ+vxLHv\r\nf+D2f7OYUIZNVNG+InvsEeDSJ8VWLkqRUTj7m2oK9Tyd1aCAEt9k6aRA+XWD\r\nPqHa7FP1UFB7ZAYDdliYw/FyJs59QVLqUBpCZ57xAFXOcigAHonVoIPZvqiy\r\nYcXlHTbuedFyJag6SZ5Kcd+DlAB7Vfj4yvgE7BORV6xFHbqe3ZLWe/N83BRd\r\nVWBbbA9Papt/d32m4O0TDYu/dIrjgPDIXek2LRp9YLPntb4K5VwtSdcMIOno\r\nmUpiI/QLveDWx5OTNJmpryvy+oFa1arx+pQYl3Q9kv++J9391iybn7QXkH4u\r\niJdi7oEzB0MwhShF4FWaajkDwcQgH4o+RMCyjs06EWtFqKMtolFeW3iUa8o+\r\nETRe4nDMdrSSDKElHbjsd+SQ/4gwQ1C2xip82HM7Ax7w0YNw25tGUZ4Kw40X\r\nCuhwzBHJ+NOg20gAepWfgvkc4iEp3QSwOCNj5kv7Tcr2CPuqT2f6NnH5Me7s\r\nnieO9FiOjI8JObtfL4ApHNFpFPdnnvaPEzM=\r\n=dvsR\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","engines":{"node":">=14"},"gitHead":"96a234838a27f05b358940161be3cae5048c6837","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","lint":"eslint .","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix","clean":"rimraf ./dist"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v18.12.0+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"18.12.0","dependencies":{"tslib":"^2.3.1","node-fetch":"^2.6.0","@types/node":"^16.11.55","@clerk/types":"^3.16.1","query-string":"^7.0.1","snakecase-keys":"^5.4.4","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.4.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","typescript":"*","@types/jest":"^27.4.0"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.11.2_1668800505746_0.680265382279418","host":"s3://npm-registry-packages"}},"2.11.3-staging.0":{"name":"@clerk/backend-core","version":"2.11.3-staging.0","license":"MIT","_id":"@clerk/backend-core@2.11.3-staging.0","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"25165125812dec32cf1f8314daaf2736bc363107","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.11.3-staging.0.tgz","fileCount":405,"integrity":"sha512-pdcgNx2sqctW9PIubB1D5p5ZCi65ldCgmPtv1TGHdQLVwzcfdSbP2Ljj8CfeRMp2HyRjQ/V/Uu9ohMFJ5b0WaA==","signatures":[{"sig":"MEUCIQCJ8MtiyBNSDcbP6J0GGUE3MQcjYePI0pHkuEp0Ae/HhgIgWpUvgfs0jGnu99E07nd6YpMy0c+ZErOHQL1MvD6ihK0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":626188,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjd/vKACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpDHxAAjnkXQjGfEIBVUcGzR0K7VlQn2Spcu+nPSEn94555AiRgdGe/\r\nPFOSJAi3/Noecjf1TZHdZm2sQtkgjKvDIZ47ffp1wMGQL+g5W3g5cC+QlZps\r\njcA2Z+98Q23hBbNdGe4SP7lmo7eTN9ScVbQeLzt4xJ5V6hOf6st661KEzw3Q\r\nfooQBCPNUVGTUlRX/qAoT9YqXtawP1CpoRO6x78NFq+8VFn5Yw8cc9Jc6BK+\r\nCOfuQ7xQmGmHvb4J7ESjfWD/yE7bwbdSxSHimRHUg921DNIohwe0x6quftOA\r\nNmCCqMVXNhXSlRoG/CNp3tVPpAyDbip1n8W/9DSPzk6u2DWZsGBwUC4qwJtg\r\nEAhMic4v/4Z8zcuEAt1MLJuw/ygal1EYKZsEfHnAETirmev2Jz2LtknhjLHi\r\nt+CQ4D5CzmSCinIOCNP6se6ai/yVpjCYbUhTSxRKVkFfSZ1m5q9+SvZ8giXl\r\nXw9G+EfMearWP4RkT/oUV9ELeDlye75IKapWlQ1i7qqviT+w6sXfO2vA/mjs\r\naKhfiaTJXTZ7msOOksbZ8oXFRm/BiuGobBLUw2qEoy9pp8LMnWafGFJ4U98w\r\ncze3jALyvEZ/z5dJbmZL5MCYtTryNbvWTzD2g1bfViAMGnl6KiJsON9Tjah+\r\nOaJNkjUBJ+Ag5YLl1ig7onf/PKwN0+QArXI=\r\n=rei4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev?utm_source=github&utm_medium=clerk_backend_core\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <img src=\"https://images.clerk.dev/static/clerk.svg\" alt=\"Clerk logo\" height=\"50\">\n  </a>\n  <br />\n</p>\n\n# @clerk/backend-core\n\n<div align=\"center\">\n\n[![Chat on Discord](https://img.shields.io/discord/856971667393609759.svg?logo=discord)](https://discord.com/invite/b5rXHjAg7A)\n[![Clerk documentation](https://img.shields.io/badge/documentation-clerk-green.svg)](https://clerk.dev/docs?utm_source=github&utm_medium=clerk_backend_core)\n[![Follow on Twitter](https://img.shields.io/twitter/follow/ClerkDev?style=social)](https://twitter.com/intent/follow?screen_name=ClerkDev)\n\n[Changelog](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/CHANGELOG.md)\n·\n[Report a Bug](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=bug&template=bug_report.md&title=Bug%3A+)\n·\n[Request a Feature](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=Feature%3A+)\n·\n[Ask a Question](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n\n</div>\n\n---\n\n## Overview\n\nThis package provides Clerk Backend API core resources and low-level authentication utilities for JavaScript environments. It is mostly used as the base for other Clerk SDKs.\n\n## Getting Started\n\n### Installation\n\n```sh\nnpm install @clerk/backend-core\n```\n\n### Build\n\nTo build the package locally with the TypeScript compiler, run:\n\n```sh\nnpm run build\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities, without being platform/environment, specific such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendApi](./src/api/ClerkBackendApi.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendApi` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n## Usage\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendApi](./src/api/ClerkBackendApi.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://reference.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendApi.ts#17) implementation.\n\n## Support\n\nYou can get in touch with us in any of the following ways:\n\n- Join our official community [Discord server](https://discord.com/invite/b5rXHjAg7A)\n- Open a [GitHub support issue](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n- Contact options listed on [our Support page](https://clerk.dev/support?utm_source=github&utm_medium=clerk_backend_core)\n\n## Contributing\n\nWe're open to all community contributions! If you'd like to contribute in any way, please read [our contribution guidelines](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/CONTRIBUTING.md).\n\n## Security\n\n`@clerk/backend-core` follows good practices of security, but 100% security cannot be assured.\n\n`@clerk/backend-core` is provided **\"as is\"** without any **warranty**. Use at your own risk.\n\n_For more information and to report security issues, please refer to our [security documentation](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/SECURITY.md)._\n\n## License\n\nThis project is licensed under the **MIT license**.\n\nSee [LICENSE](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/LICENSE) for more information.\n","engines":{"node":">=14"},"gitHead":"0fe923b8d13555c7b3964306cb7f8a82a973e050","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","lint":"eslint .","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix","clean":"rimraf ./dist"},"_npmUser":{"name":"sokratis","email":"sokratis.vidros@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.13.0+x64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.13.0","dependencies":{"tslib":"^2.3.1","node-fetch":"^2.6.0","@types/node":"^16.11.55","@clerk/types":"^3.17.0-staging.0","query-string":"^7.0.1","snakecase-keys":"^5.4.4","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.4.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","typescript":"*","@types/jest":"^27.4.0"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.11.3-staging.0_1668807626176_0.4701718823574512","host":"s3://npm-registry-packages"}},"2.11.3-staging.1":{"name":"@clerk/backend-core","version":"2.11.3-staging.1","license":"MIT","_id":"@clerk/backend-core@2.11.3-staging.1","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"7313f86005092c1d57102672100098b576b3b790","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.11.3-staging.1.tgz","fileCount":351,"integrity":"sha512-D+wfoEcYOOp5QVm8znHnZuP/vC2ToQK+q0KSpIfD3wzsOrA51jDufJZMwMcbJMsPm7ONdmxRGCjMXUa64mDkqA==","signatures":[{"sig":"MEYCIQCgkKcrreWqlnRk4YOtjRYhsbHszT+iGIQwPid3z/0QtwIhAJATer3YN9USTtiJ/wQmq7/nTh5cu05b+8kzExUJL2Nn","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":585422,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJje6gDACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrLfw/7BOS6kIAz6kaH5hm3gS6irhids1aNTCF0JnfrW7UsZX6sTl2H\r\nZYUcGM16hCwvWo0AB/Zb/BYn81JZd2qOmhAStec5skitF8UhzSfP0ah/pYBB\r\nkjdgzH78h/aRrREZx2W03jVFQG8inzrehntATyF0aD+h/aTM7Qsxz49EAyk5\r\nAJ64eFMd4Q6Bt2SP59Q8z7gjqEavpJS/MC9McIWBtU5B707Pfw0BPGyHVomo\r\ndzv+QFqgf/N1nP+SZoxuADWGYR4jz8dT9eksugyLcBVms0bOxkwAqNow8bEv\r\n3gzo/9TQAygt6oYw4myeDKZbreVmr+BZkBwAjFi7Vc2N4d3IuLnr6WkKz8hs\r\nbVEWq0IHZ9RuPJxmWb5xQaxjGoeh62n0e6av0AeDnQG5ShMp0TtXX7n3pl+P\r\nfqrAcWH5gAJcWVKDVO4jX8Lu6N0ugfxGBEwvWk9b2xVuEqKHj+AD/14Vjv0R\r\nxwH7/Z+u+BIt3k/qzWE22mVMFA7U+lOZBTtOsduqI/Hy5EXUwZ7lmS0/xcGq\r\n+Un5dKLcC3VSjxHY9IxEoQYypmAgh73cWk7uutxsh/oo5s0qJ4BvBwxrvoQV\r\njN0lWNIRyr7usIISlml03uYYIQ1z6/EGXBXNzco1cThP5j1hopMgGc0BA3sB\r\ng4rdifS7tB5Qx7iKhQuK6SkP17iHjMBEMjY=\r\n=lU58\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev?utm_source=github&utm_medium=clerk_backend_core\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <img src=\"https://images.clerk.dev/static/clerk.svg\" alt=\"Clerk logo\" height=\"50\">\n  </a>\n  <br />\n</p>\n\n# @clerk/backend-core\n\n<div align=\"center\">\n\n[![Chat on Discord](https://img.shields.io/discord/856971667393609759.svg?logo=discord)](https://discord.com/invite/b5rXHjAg7A)\n[![Clerk documentation](https://img.shields.io/badge/documentation-clerk-green.svg)](https://clerk.dev/docs?utm_source=github&utm_medium=clerk_backend_core)\n[![Follow on Twitter](https://img.shields.io/twitter/follow/ClerkDev?style=social)](https://twitter.com/intent/follow?screen_name=ClerkDev)\n\n[Changelog](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/CHANGELOG.md)\n·\n[Report a Bug](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=bug&template=bug_report.md&title=Bug%3A+)\n·\n[Request a Feature](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=Feature%3A+)\n·\n[Ask a Question](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n\n</div>\n\n---\n\n## Overview\n\nThis package provides Clerk Backend API core resources and low-level authentication utilities for JavaScript environments. It is mostly used as the base for other Clerk SDKs.\n\n## Getting Started\n\n### Installation\n\n```sh\nnpm install @clerk/backend-core\n```\n\n### Build\n\nTo build the package locally with the TypeScript compiler, run:\n\n```sh\nnpm run build\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities, without being platform/environment, specific such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendApi](./src/api/ClerkBackendApi.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendApi` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n## Usage\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendApi](./src/api/ClerkBackendApi.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://reference.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendApi.ts#17) implementation.\n\n## Support\n\nYou can get in touch with us in any of the following ways:\n\n- Join our official community [Discord server](https://discord.com/invite/b5rXHjAg7A)\n- Open a [GitHub support issue](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n- Contact options listed on [our Support page](https://clerk.dev/support?utm_source=github&utm_medium=clerk_backend_core)\n\n## Contributing\n\nWe're open to all community contributions! If you'd like to contribute in any way, please read [our contribution guidelines](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/CONTRIBUTING.md).\n\n## Security\n\n`@clerk/backend-core` follows good practices of security, but 100% security cannot be assured.\n\n`@clerk/backend-core` is provided **\"as is\"** without any **warranty**. Use at your own risk.\n\n_For more information and to report security issues, please refer to our [security documentation](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/SECURITY.md)._\n\n## License\n\nThis project is licensed under the **MIT license**.\n\nSee [LICENSE](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/LICENSE) for more information.\n","engines":{"node":">=14"},"gitHead":"4e31dd1f1b78a0923f74b51b07b896b4ac8fa75c","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","lint":"eslint .","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix","clean":"rimraf ./dist"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v18.12.0+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"18.12.0","dependencies":{"tslib":"^2.3.1","node-fetch":"^2.6.0","@types/node":"^16.11.55","@clerk/types":"^3.17.0-staging.1","query-string":"^7.0.1","snakecase-keys":"^5.4.4","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.4.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","typescript":"*","@types/jest":"^27.4.0"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.11.3-staging.1_1669048323051_0.6451356790390927","host":"s3://npm-registry-packages"}},"2.11.3-staging.2":{"name":"@clerk/backend-core","version":"2.11.3-staging.2","license":"MIT","_id":"@clerk/backend-core@2.11.3-staging.2","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"68a669fc1d7cd4904dfdca872c91c981bf715479","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.11.3-staging.2.tgz","fileCount":405,"integrity":"sha512-9OE4iYJxIbTCKtmD544PLhEWOo9tUr3OJfQiPPN8gbG0tVvyvNdwwENcI6dHdLr3jAqIrlinjvMveiJCVD/DrA==","signatures":[{"sig":"MEQCIHVqAqHT7gGlVzDGa+AwKWl+k4tUPc8AIdUP6xCha2zbAiBHXifDci4PmrjEJ+ApCG0vp29OfklsIi5ekjOjOIIVKA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":626410,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJje9rmACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpeSQ//aNhn7hWRB7YJR9s9hCBnDB3Xz8e5SuoOZN8+XOPk/IYhoBwe\r\nD62KSCjY2QLllHag+Z1z3PetlG+clMF8WGn3EOzkykHfuNtYxgj2Ox4honSu\r\naMBxwwDMlv/pHJTMu0P+LFCxGvqcfbRYOmeqiY6mrXb9jsOWZV50ABUQ1eYc\r\nN389EnYDiZfAppD9fTXpMkJr8umgqjYdDKAvGdpAZE149c3aIjZ7YhqgmpxC\r\nYWKPud08zq1LPfby+p2v1VvXXgwCoY5Fe4YhiaZyrI973HmGX/1HrmaD2nba\r\n9gCFZbJz+2B/em42Inw1IPRdkYGyukLPBhimMQeYLUvlYdtFT0bFAVs2PM/q\r\nBZ/AbBUnK1GlQTcptjiB376Xsbj2ypwyy23Q6pkdFunM9vAHK7szElH9cU1A\r\nv0HD4GyKHBaegTC7In1z9+zHT/Dao2NzyUegwCJ9g6rf3nW83gQW1KiIbfzn\r\nVxH3Pk/gG5f55f9W9yNbl9XOWIDQZ5nOLDM/LvXeynaNCJ7tUC0+DeD+NWq0\r\n4RcpVy1mV4C2Ab8OR2DdBsw4LvFHxAhDu0Hkmfe9nQks9k/sWQpjq79PDAHV\r\nyZwDNX/ONsznNXEiBv607+MsbDAf1lEG5El/0efwjPWV8XHuE7wC5Ih/vLve\r\nzWpTDjhZKySFFVw9vXD0lwhkqQUAz5eaIV0=\r\n=1J4O\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev?utm_source=github&utm_medium=clerk_backend_core\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <img src=\"https://images.clerk.dev/static/clerk.svg\" alt=\"Clerk logo\" height=\"50\">\n  </a>\n  <br />\n</p>\n\n# @clerk/backend-core\n\n<div align=\"center\">\n\n[![Chat on Discord](https://img.shields.io/discord/856971667393609759.svg?logo=discord)](https://discord.com/invite/b5rXHjAg7A)\n[![Clerk documentation](https://img.shields.io/badge/documentation-clerk-green.svg)](https://clerk.dev/docs?utm_source=github&utm_medium=clerk_backend_core)\n[![Follow on Twitter](https://img.shields.io/twitter/follow/ClerkDev?style=social)](https://twitter.com/intent/follow?screen_name=ClerkDev)\n\n[Changelog](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/CHANGELOG.md)\n·\n[Report a Bug](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=bug&template=bug_report.md&title=Bug%3A+)\n·\n[Request a Feature](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=Feature%3A+)\n·\n[Ask a Question](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n\n</div>\n\n---\n\n## Overview\n\nThis package provides Clerk Backend API core resources and low-level authentication utilities for JavaScript environments. It is mostly used as the base for other Clerk SDKs.\n\n## Getting Started\n\n### Installation\n\n```sh\nnpm install @clerk/backend-core\n```\n\n### Build\n\nTo build the package locally with the TypeScript compiler, run:\n\n```sh\nnpm run build\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities, without being platform/environment, specific such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendApi](./src/api/ClerkBackendApi.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendApi` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n## Usage\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendApi](./src/api/ClerkBackendApi.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://reference.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendApi.ts#17) implementation.\n\n## Support\n\nYou can get in touch with us in any of the following ways:\n\n- Join our official community [Discord server](https://discord.com/invite/b5rXHjAg7A)\n- Open a [GitHub support issue](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n- Contact options listed on [our Support page](https://clerk.dev/support?utm_source=github&utm_medium=clerk_backend_core)\n\n## Contributing\n\nWe're open to all community contributions! If you'd like to contribute in any way, please read [our contribution guidelines](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/CONTRIBUTING.md).\n\n## Security\n\n`@clerk/backend-core` follows good practices of security, but 100% security cannot be assured.\n\n`@clerk/backend-core` is provided **\"as is\"** without any **warranty**. Use at your own risk.\n\n_For more information and to report security issues, please refer to our [security documentation](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/SECURITY.md)._\n\n## License\n\nThis project is licensed under the **MIT license**.\n\nSee [LICENSE](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/LICENSE) for more information.\n","engines":{"node":">=14"},"gitHead":"6da5e9b9f775e2a77635261e572f9cc497bf1af9","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","lint":"eslint .","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix","clean":"rimraf ./dist"},"_npmUser":{"name":"sokratis","email":"sokratis.vidros@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.13.0+x64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.13.0","dependencies":{"tslib":"^2.3.1","node-fetch":"^2.6.0","@types/node":"^16.11.55","@clerk/types":"^3.17.0-staging.2","query-string":"^7.0.1","snakecase-keys":"^5.4.4","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.4.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","typescript":"*","@types/jest":"^27.4.0"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.11.3-staging.2_1669061350202_0.961670424642981","host":"s3://npm-registry-packages"}},"2.11.3":{"name":"@clerk/backend-core","version":"2.11.3","license":"MIT","_id":"@clerk/backend-core@2.11.3","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"6f2ec02a97cb442e9f295a38e112cbcccc4f1226","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.11.3.tgz","fileCount":351,"integrity":"sha512-l9KeXmnO8nPy+lexLk8x4BQHPbI+Cs3/5DtOCxlTJvRtOGQhfusyCgxksgpD45ACE0891U4IzliXqbUBRlTthQ==","signatures":[{"sig":"MEYCIQCcfMSX/hN2EFOFwrMmqCj8bquBTFSAw9cxOt5zLWDbzwIhAOlSy8jTYSi+ddtUb3hTswF5w/AN0LtXk/yJS5kqsGIF","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":585826,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjfL/sACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp4Ig/+OpifPimGcZ6Mxmfx93uue/87CU9LvreW2HewdEkCcBt6WNgB\r\nELCiDDJCFUA/hSiWQN3aUQZDad/W+dDgJtD/9SOfcpFlgboFxbwVpaQCy+4X\r\nfQL3IC8AvbrLZIUtAChtrK8WlbPmAxFhwyfH2kC3Zol234g3soXkSRrEwCkv\r\n0pzDj6ZwuBR1qNvaemRUALnL+Ee2DomW4UPZPyLoFffSKydWB1EFhk3UYZfn\r\nlT0DQpu2QQ8ZHz78AGDY4qPksLsNwpDYq4KyKdMgHe73V9kat/rHuvgNYzm/\r\nbdw0Lw+FMV6wAmuY+AIAoZ4R2CNZbyKzy0JHZe08j/u9EV1CLfK4Sd4qgwqg\r\nrUQ0uAUp9V8nfv9mB5Tliazk7LOG4jolQlF1DUUWn834K3tx384HKeGOY8h+\r\nm5MEzY8W//KAQ/RJH0Z9z2LumTH6D+ov9HhYZHkVx1zsIoNyuLmbuLEKXYOl\r\nWcAUG0ddo/tdXFIOPTKTo1+9HyBu7VPcs0nuIml9esVY6/vmeMoQNoXTB02P\r\no7//uRuqq0XGt/HktzTvgfvO3FYNrCANfc6Zor1O0Nxs1Q4nopo9HSBDdx7E\r\nYYVgem5O/60jAKzPoVWTvNHe9E7uuTC+NA0vdW1qGP9ofIhWciLXQpXrXbnC\r\nBjr+A4N9XGFYKgZyCieCiVcnTTe9/OGSitU=\r\n=W4lP\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","engines":{"node":">=14"},"gitHead":"1184c76f74d814a23a15d56d58186ecb36bf1afa","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","lint":"eslint .","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix","clean":"rimraf ./dist"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v18.12.0+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"18.12.0","dependencies":{"tslib":"^2.3.1","node-fetch":"^2.6.0","@types/node":"^16.11.55","@clerk/types":"^3.17.0","query-string":"^7.0.1","snakecase-keys":"^5.4.4","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.4.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","typescript":"*","@types/jest":"^27.4.0"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.11.3_1669119980456_0.035053546189526275","host":"s3://npm-registry-packages"}},"2.11.5-staging.0":{"name":"@clerk/backend-core","version":"2.11.5-staging.0","license":"MIT","_id":"@clerk/backend-core@2.11.5-staging.0","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"95857183fd2a89b43831b442dff0f31127f18e6e","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.11.5-staging.0.tgz","fileCount":351,"integrity":"sha512-Z1dyNyBYFTelo3KBeeOmLwlxJ4JvTcTZdowRt2cQO7Pd/P+xqNJwzf3E2tYjqBXk53aL30fq7FZ6lACQkvbOIw==","signatures":[{"sig":"MEUCIQDHePvR3qefye9BI8/mSqhNKk5yQmiLboHZPPqkwENFtAIgGlrg2lPOupctEGNnFkmSII0UTS2jYEM/iNwbujDmmXs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":586104,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjf4o0ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpWhQ//WbS4CseF8tR9oL1DaVSCrTN7Mi1yCs7SBxGRpuSpOn9a3BmG\r\neXfemw3rLpUpkOkQltwx7sLiL8Ir5CL/+vWxoSqCbLHcsEJYu1x5B8tHEee3\r\nuO3quSn7ZF2pQ2DDWoE8y/apGvyw8tSG70JNm21SQAQILunWc17TeQ8sMlge\r\n1itWxbCEhpZ4Dx0GfDj38uuzYvo7FT1OMs9iGO+bMQHopiiQdSTQ6wlILXzb\r\njDa86NgRrXj2hvWoHo2XmMbHQVEIrwwhFvAKUf0EoGfOfJ1/EhROZX4MvZLY\r\n1pEX07hO5lnKT/vkJndEfbvaNhSA+CXo/dI36rY/panOTD4ujX5bOoBtLNDh\r\nne88K/F1IxDred3NwYpzwYr6II3xe8YR816waEQajyN9GgDi2I9RkKSgysNe\r\nH1Qf4W1vZY72lH0ijdA9uA9qWqUCiPEjyw4kMj1vtGJ4d/pVXQPK4hs0Ocq4\r\nzQBc1WoC62+e7OqY1tZJ57CIxCE9R/jDzwFwB14nRD1eRz0eARlSdFKO1SnH\r\nMv2wNNzx2poJK2ZCBW/wxxLueUOFvJe7eIKTGr2YKYlxObRd4Fx2NuOoD3Xh\r\nLp8cghf2PoHqTu/ETc1JwV3gKV280P9SPyWcWknkQBJCSVReTnX70FdW4wxp\r\nWhVfRbfPi/2sj8hcnhOWCQlkh3yHa1XY0SY=\r\n=Kohg\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev?utm_source=github&utm_medium=clerk_backend_core\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <picture>\n      <source media=\"(prefers-color-scheme: dark)\" srcset=\"../../docs/clerk-logo-dark.png\">\n      <img src=\"../../docs/clerk-logo-light.png\" height=\"64\">\n    </picture>\n  </a>\n  <br />\n</p>\n\n# @clerk/backend-core\n\n<div align=\"center\">\n\n[![Chat on Discord](https://img.shields.io/discord/856971667393609759.svg?logo=discord)](https://discord.com/invite/b5rXHjAg7A)\n[![Clerk documentation](https://img.shields.io/badge/documentation-clerk-green.svg)](https://clerk.dev/docs?utm_source=github&utm_medium=clerk_backend_core)\n[![Follow on Twitter](https://img.shields.io/twitter/follow/ClerkDev?style=social)](https://twitter.com/intent/follow?screen_name=ClerkDev)\n\n[Changelog](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/CHANGELOG.md)\n·\n[Report a Bug](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=bug&template=bug_report.md&title=Bug%3A+)\n·\n[Request a Feature](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=Feature%3A+)\n·\n[Ask a Question](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n\n</div>\n\n---\n\n## Overview\n\nThis package provides Clerk Backend API core resources and low-level authentication utilities for JavaScript environments. It is mostly used as the base for other Clerk SDKs.\n\n## Getting Started\n\n### Installation\n\n```sh\nnpm install @clerk/backend-core\n```\n\n### Build\n\nTo build the package locally with the TypeScript compiler, run:\n\n```sh\nnpm run build\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities, without being platform/environment, specific such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendApi](./src/api/ClerkBackendApi.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendApi` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n## Usage\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendApi](./src/api/ClerkBackendApi.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://reference.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendApi.ts#17) implementation.\n\n## Support\n\nYou can get in touch with us in any of the following ways:\n\n- Join our official community [Discord server](https://discord.com/invite/b5rXHjAg7A)\n- Open a [GitHub support issue](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n- Contact options listed on [our Support page](https://clerk.dev/support?utm_source=github&utm_medium=clerk_backend_core)\n\n## Contributing\n\nWe're open to all community contributions! If you'd like to contribute in any way, please read [our contribution guidelines](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/CONTRIBUTING.md).\n\n## Security\n\n`@clerk/backend-core` follows good practices of security, but 100% security cannot be assured.\n\n`@clerk/backend-core` is provided **\"as is\"** without any **warranty**. Use at your own risk.\n\n_For more information and to report security issues, please refer to our [security documentation](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/SECURITY.md)._\n\n## License\n\nThis project is licensed under the **MIT license**.\n\nSee [LICENSE](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/LICENSE) for more information.\n","engines":{"node":">=14"},"gitHead":"13368df8733d80efd798dc759026c6a2ffbbe79e","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","lint":"eslint .","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix","clean":"rimraf ./dist"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.18.1+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.18.1","dependencies":{"tslib":"^2.3.1","node-fetch":"^2.6.0","@types/node":"^16.11.55","@clerk/types":"^3.17.2-staging.0","query-string":"^7.0.1","snakecase-keys":"^5.4.4","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.4.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","typescript":"*"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.11.5-staging.0_1669302836413_0.33343475569260517","host":"s3://npm-registry-packages"}},"2.11.5":{"name":"@clerk/backend-core","version":"2.11.5","license":"MIT","_id":"@clerk/backend-core@2.11.5","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"7132a1e92c36251414e86c22002edb857a6b8efe","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.11.5.tgz","fileCount":351,"integrity":"sha512-KQiio+fAzQosdJofT3GuyKh02xsLyk6htmCTOMuIStkqEraOrjAhcFZhDTi5cgjFuhoRznfK6T944Mf/S326PA==","signatures":[{"sig":"MEYCIQDDm3grSIXH67kEkTnzC/XeW1TdMsMyDA6oU+7M0kms9AIhAKt3h8acetu2b4NxdsnULVhetZwtSpw39N2dC8+xe2rF","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":586286,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjgJCpACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoiUg/+NmO+jbTYrvbNpgnC6C6NvFl2lCOyGLIkxlpM32tcIuS95UDY\r\noijxF1tn09nhTcRBWU/xXVYKnoFmziMnz/wNoY3sTynFjJDZalzb6a/xtNOj\r\nUJge0WI4In/I1E/vJWEvPieHn5L68Y/vmDkrO9bjKJJPSeATutKm54m6i62S\r\nmwDalOdHUXmCZKAXhddwVaCFG+8Zl/5CGyV7VImqHezQpJPxtJNZkp/4on7b\r\nOwsBWnEdGgYoN1Lj3+cb3o5I7YIV7ZAXkEv2aoZ4aGGgXxjqjksgwwWNtwBV\r\nxLj2MfW6ZCZb49XbQM30ATYfdnWqtgow6vkoMrdWnYcHMLp75UpOd9oSt0bB\r\nbwwkOWV8lDoZV5a9Fo3hHsUctJYFf9fC9aHyugbA7/FYpLnAiUW26d61c+P8\r\nU8gDXdLyKjTP7X9RyLlBSdZiRvdfy27mP1Uiwj9S6KjU53kD2tpjSu5CRe0q\r\nkamR+YdBX0UPoWCbA6p49eJ12qcSTWnQ5G3NJsz5JMjtSB+3yuwlBUCt4p2w\r\nzhu6c8UW2XIvZrisbD+F5mnH/TkK+heZ0gsZv/8gAqLVwZBce7uquTXPR2K4\r\n84r1bYeKWqpLDPP+a+5+9tocHyLSnrfweopA7ql0WvJKJO8j2thv9DMZ+gyM\r\n32MGmtlCfXvFOL30+e3Ep6MQjmvc2Ivieos=\r\n=Uc2N\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","engines":{"node":">=14"},"gitHead":"68b6374dc0322b6249e148efc8fe8505fe54687c","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","lint":"eslint .","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix","clean":"rimraf ./dist"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.18.1+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.18.1","dependencies":{"tslib":"^2.3.1","node-fetch":"^2.6.0","@types/node":"^16.11.55","@clerk/types":"^3.17.2","query-string":"^7.0.1","snakecase-keys":"^5.4.4","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.4.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","typescript":"*"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.11.5_1669370025697_0.0903942661470829","host":"s3://npm-registry-packages"}},"2.11.6-staging.0":{"name":"@clerk/backend-core","version":"2.11.6-staging.0","license":"MIT","_id":"@clerk/backend-core@2.11.6-staging.0","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"16f453142ef1c9c8511bd9b020bcc79aa49fa16d","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.11.6-staging.0.tgz","fileCount":351,"integrity":"sha512-UdKlPYxaWjWcCkRoHyIi4qUspy/OrwKqm1WkQ/V5Q+IatvUzU9sgvA7eCIfqASj4SxkOuJzNKFS0ikZETtBBoQ==","signatures":[{"sig":"MEUCIDPp3ep7j4YR8664I3in1BKbqgMXTO6+7VkbRCZzcM8YAiEA4qI3L2gu/YVv3Cg2sAzFZ3qM0t2BMex/2DYjNzBv/YI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":586368,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjgMS4ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqfXRAAk2FS9oboi3HYp9Dy20KZ7cir7t46XnRywCLgm3yi8Pv+teQ9\r\nl4xkjZXvSIkseeW3pAdGKVex46Wq3MmWZlErIkFL5YxyRgT5ehNQIGHhpOvn\r\ne8amsl3+PPQ0gl3wrgx/EdbNB4kLGJX857aZiiMg/HDV4N8DA66h4yj9KjD1\r\nEG57xqQ32jteVcaK6ICDfF3hO9mhhyHNfq3yUGFrtQzjuFJbWrXI7k/2A3/I\r\nsdrUCVJoM4F1rPsMgU8PFygWwb3qmret3LnJ+aSk6decVHbzGkvpMVzNG6O4\r\nhlKYlW2GK4/olo8EoTf7LHpIiALm2GO3YYpteoryaIJUJiDrWj+k+lz7yTgI\r\noV7ubSFcDqIwtfEwB4iHECzdxngSveEfOvR4vuzTPPwoFpQHw69uGFJxgFiX\r\nZz4u8VEcdJWHYGq1P8Lfhxea/ALbgpX/DHDrEoNzv2YzqBhjik3FoOIDTP3R\r\nG1J4ClHyFqdZcMgjLcuguafhQDi9vvPYn6YDS/ZE6XyAv6VoSDJyDtMs6xPZ\r\nhxpcQ76gtxpX0o1b1CVMj3BqYCFopqFkZC/RGjmHx71aqbQBJp6rRSduJg1B\r\n5XjBKthqaQfGzOLujJRsh/s0f25O48fVwmuo9HOmK3H1nNg4BTHY+c4NeOao\r\nPTCtP1oGsovDiXKbYHeV6OxhE2RMi9kgDX0=\r\n=5lF4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev?utm_source=github&utm_medium=clerk_backend_core\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <picture>\n      <source media=\"(prefers-color-scheme: dark)\" srcset=\"https://dashboard.clerk.dev/assets/logo-dark-mode-400x400.png\">\n      <img src=\"https://dashboard.clerk.dev/assets/logo-light-mode-400x400.png\" height=\"64\">\n    </picture>\n  </a>\n  <br />\n</p>\n\n# @clerk/backend-core\n\n<div align=\"center\">\n\n[![Chat on Discord](https://img.shields.io/discord/856971667393609759.svg?logo=discord)](https://discord.com/invite/b5rXHjAg7A)\n[![Clerk documentation](https://img.shields.io/badge/documentation-clerk-green.svg)](https://clerk.dev/docs?utm_source=github&utm_medium=clerk_backend_core)\n[![Follow on Twitter](https://img.shields.io/twitter/follow/ClerkDev?style=social)](https://twitter.com/intent/follow?screen_name=ClerkDev)\n\n[Changelog](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/CHANGELOG.md)\n·\n[Report a Bug](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=bug&template=bug_report.md&title=Bug%3A+)\n·\n[Request a Feature](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=Feature%3A+)\n·\n[Ask a Question](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n\n</div>\n\n---\n\n## Overview\n\nThis package provides Clerk Backend API core resources and low-level authentication utilities for JavaScript environments. It is mostly used as the base for other Clerk SDKs.\n\n## Getting Started\n\n### Installation\n\n```sh\nnpm install @clerk/backend-core\n```\n\n### Build\n\nTo build the package locally with the TypeScript compiler, run:\n\n```sh\nnpm run build\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities, without being platform/environment, specific such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendApi](./src/api/ClerkBackendApi.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendApi` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n## Usage\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendApi](./src/api/ClerkBackendApi.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://reference.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendApi.ts#17) implementation.\n\n## Support\n\nYou can get in touch with us in any of the following ways:\n\n- Join our official community [Discord server](https://discord.com/invite/b5rXHjAg7A)\n- Open a [GitHub support issue](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n- Contact options listed on [our Support page](https://clerk.dev/support?utm_source=github&utm_medium=clerk_backend_core)\n\n## Contributing\n\nWe're open to all community contributions! If you'd like to contribute in any way, please read [our contribution guidelines](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/CONTRIBUTING.md).\n\n## Security\n\n`@clerk/backend-core` follows good practices of security, but 100% security cannot be assured.\n\n`@clerk/backend-core` is provided **\"as is\"** without any **warranty**. Use at your own risk.\n\n_For more information and to report security issues, please refer to our [security documentation](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/SECURITY.md)._\n\n## License\n\nThis project is licensed under the **MIT license**.\n\nSee [LICENSE](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/LICENSE) for more information.\n","engines":{"node":">=14"},"gitHead":"fb1c7aecf6d6f253cff95a4de082163768926f86","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","lint":"eslint .","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix","clean":"rimraf ./dist"},"_npmUser":{"name":"sokratis","email":"sokratis.vidros@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.13.0+x64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.13.0","dependencies":{"tslib":"^2.3.1","node-fetch":"^2.6.0","@types/node":"^16.11.55","@clerk/types":"^3.18.0-staging.0","query-string":"^7.0.1","snakecase-keys":"^5.4.4","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.4.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","typescript":"*"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.11.6-staging.0_1669383352648_0.4766591815531691","host":"s3://npm-registry-packages"}},"2.11.6":{"name":"@clerk/backend-core","version":"2.11.6","license":"MIT","_id":"@clerk/backend-core@2.11.6","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"fe549a4491abad904c17f979989e02306bba7689","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.11.6.tgz","fileCount":351,"integrity":"sha512-nvpsYCX3rPSWNfBCIntwxWyKJIaEZDIH9PZwdbj/bPdjsxVr5VeJdw/8Sa6rz/x5keFpX5xiWLyKRRCewv4FeA==","signatures":[{"sig":"MEQCIDJwzbj1Pn0ic65tdJ6c+7ePwT6BUck4GZHUcnPzS5a9AiATYLTjvu+8k//HZc9j3e/zrNveGaNyt6mDb0AoxmivsA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":586550,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjgSuCACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp6DxAAhnaTRs5hk86v/F4l1vlFEShKHUIMF7wDka0DCCUxSg7eO0pP\r\n/BrdgnGm+b3HPC3V+Llrk4sgWyiSjANHx7W34b7e85sq7ICA01eqo8Q6tvB8\r\no6rIQ5VbvzUIa71JNXHYK1Q6FwM3McdzxSt8nLoRr/B2AwHvxyHpJSUDKUAU\r\nWCOqDFeJeljyOmQe6uxhzS24zN2qqYp3VK3V33aaYLT2TjrxFAX7rQIHmSZb\r\n3cqIGi4xVWwp5LxDwAU9Mw7gVMUmxPyW/4t5xllRGZsnakV1zPqTVmb4PvT6\r\nULoUS7GsJhj+Fg0gJXXggqYQ0kEu0MiqZ43m7QUrHHyb4o88bb1Riy73bmxC\r\nuRT8wXTaGKsCZRp5jtFLV6Hr0wctar9MVNgz1MiXMLOi25NUzxwT8E6wIFvQ\r\n54Oy3IcVf3DEr0/aqAQDdPK0Tp1U36zSAb0w+r088tM3rYe7EFTxVPuIaLzA\r\nT+nvOjw/kHiGHkpVSBymk15A/kb7EWwQwwzLDcLMOsTffADqmzcBwq2lK80k\r\n9KQQVktBvODeklQFCfJ4/FygNHTMMvutHE/2UA5g74TVpoDCue4XEUPy4dTa\r\nmlWmq4FmmBidkL00dBA0KKH1GDMzOMDl2Fceqv4zwDIsDMjksqDlFWfR3rEB\r\nxbVKyQPd68t1SqXFudaEXrHLNCqxN2LzeIE=\r\n=jNvr\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","types":"./dist/cjs/index.d.ts","module":"dist/mjs/index.js","engines":{"node":">=14"},"gitHead":"1b19a43b61f712756ab4d8c9ccbee6e8bddbe4ce","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","lint":"eslint .","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix","clean":"rimraf ./dist"},"_npmUser":{"name":"sokratis","email":"sokratis.vidros@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"8.15.0","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.13.0","dependencies":{"tslib":"^2.3.1","node-fetch":"^2.6.0","@types/node":"^16.11.55","@clerk/types":"^3.18.0","query-string":"^7.0.1","snakecase-keys":"^5.4.4","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.4.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","typescript":"*"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.11.6_1669409665724_0.8548289196869618","host":"s3://npm-registry-packages"}},"2.11.7-staging.0":{"name":"@clerk/backend-core","version":"2.11.7-staging.0","license":"MIT","_id":"@clerk/backend-core@2.11.7-staging.0","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"f8fceedcd5485c2ffbd90231c6a90a0dee29d31f","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.11.7-staging.0.tgz","fileCount":351,"integrity":"sha512-GhNlwKfKntMiukSQcmWdHi3MySv8IuNOnx7V11PjBuLJV5jEzaXXDthEJl13T/WOJax+pvDlXCGmhigsJCTTlA==","signatures":[{"sig":"MEYCIQDR7qKXYF6GbWC400zYxYuEhpFDreZF2rBpg6a8RW3GfwIhAOlYPtLtnaycD608GTetvXYSMoW+HRd/D2OkBlhHsclS","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":586570,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjhekOACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpexQ//RjEyV1fb+Wv8ny8pPJa9mPhNVDLTpX6DGkdJhOt5Y7WNXMFE\r\n94fmAaSaWHepP3vN8lE8//4zvMY1RW+ve+Fy0L8v+jiMOmZ7U+f4/Q01Y+zQ\r\ni/XCMu1r0t735Hkhh53JhckXHgDhIxp5RrFcNIAOKoJGRs2BhKazHaIDo4Kf\r\n+m+YQ5/jc1zD7dFh5mci/i7JxTNAZ2oH7WZtjVYN/c2txe4daH7KLaRDdejz\r\niFuhs02Y92ERB1uN8o5g5EwZn7V5zsU4aYbboPIa457msMGtkU5HOchCgV4C\r\nAiTNMranUeSd01eBMHO6il7r9CkUFA1J1B4p7+rGh5l/gBwqE7B/P44f3uSy\r\n634wxf/lDBn4I3kKMyFn/3KLD1/gA9FiAbNd7MBCm9zUpj3UvzMiYqWxz6ff\r\n9nxktRUzG3v8aRjOdwNtiLGXvFJeQ+1mHIYt0gWGXicC5qhnPOkxd8Js6H8G\r\nUO8syN1d5wM554pXKbc9HyQzBhauRjWQ/9hHeS2OsSFEr4GYLKzESOrLJjBv\r\ng2Zb3aT+KY7sP2MCc8eD/+TYm7Rn6yxBaFCuC0+bvOs6/ykcaSkupflzJO0+\r\nrAP/1p6lsLBnirziD7bodvXGwcp4hb+L4l9926O83R6nt9HtdBUDv1YcOkI5\r\n+ODvZlovPCMEgAytjQkF3UbG+5J3xtsOttc=\r\n=kNLz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev?utm_source=github&utm_medium=clerk_backend_core\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <picture>\n      <source media=\"(prefers-color-scheme: dark)\" srcset=\"https://dashboard.clerk.dev/assets/logo-dark-mode-400x400.png\">\n      <img src=\"https://dashboard.clerk.dev/assets/logo-light-mode-400x400.png\" height=\"64\">\n    </picture>\n  </a>\n  <br />\n</p>\n\n# @clerk/backend-core\n\n<div align=\"center\">\n\n[![Chat on Discord](https://img.shields.io/discord/856971667393609759.svg?logo=discord)](https://discord.com/invite/b5rXHjAg7A)\n[![Clerk documentation](https://img.shields.io/badge/documentation-clerk-green.svg)](https://clerk.dev/docs?utm_source=github&utm_medium=clerk_backend_core)\n[![Follow on Twitter](https://img.shields.io/twitter/follow/ClerkDev?style=social)](https://twitter.com/intent/follow?screen_name=ClerkDev)\n\n[Changelog](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/CHANGELOG.md)\n·\n[Report a Bug](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=bug&template=bug_report.md&title=Bug%3A+)\n·\n[Request a Feature](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=Feature%3A+)\n·\n[Ask a Question](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n\n</div>\n\n---\n\n## Overview\n\nThis package provides Clerk Backend API core resources and low-level authentication utilities for JavaScript environments. It is mostly used as the base for other Clerk SDKs.\n\n## Getting Started\n\n### Installation\n\n```sh\nnpm install @clerk/backend-core\n```\n\n### Build\n\nTo build the package locally with the TypeScript compiler, run:\n\n```sh\nnpm run build\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities, without being platform/environment, specific such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendApi](./src/api/ClerkBackendApi.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendApi` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n## Usage\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendApi](./src/api/ClerkBackendApi.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://reference.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendApi.ts#17) implementation.\n\n## Support\n\nYou can get in touch with us in any of the following ways:\n\n- Join our official community [Discord server](https://discord.com/invite/b5rXHjAg7A)\n- Open a [GitHub support issue](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n- Contact options listed on [our Support page](https://clerk.dev/support?utm_source=github&utm_medium=clerk_backend_core)\n\n## Contributing\n\nWe're open to all community contributions! If you'd like to contribute in any way, please read [our contribution guidelines](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/CONTRIBUTING.md).\n\n## Security\n\n`@clerk/backend-core` follows good practices of security, but 100% security cannot be assured.\n\n`@clerk/backend-core` is provided **\"as is\"** without any **warranty**. Use at your own risk.\n\n_For more information and to report security issues, please refer to our [security documentation](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/SECURITY.md)._\n\n## License\n\nThis project is licensed under the **MIT license**.\n\nSee [LICENSE](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/LICENSE) for more information.\n","engines":{"node":">=14"},"gitHead":"0327b3247f0d0325f66f1beefebc19d1141cea03","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","lint":"eslint .","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix","clean":"rimraf ./dist"},"_npmUser":{"name":"sokratis","email":"sokratis.vidros@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.18.1+x64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.18.1","dependencies":{"tslib":"^2.3.1","node-fetch":"^2.6.0","@types/node":"^16.11.55","@clerk/types":"^3.19.0-staging.0","query-string":"^7.0.1","snakecase-keys":"^5.4.4","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.4.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","typescript":"*"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.11.7-staging.0_1669720333973_0.9065563179958394","host":"s3://npm-registry-packages"}},"2.11.7-staging.1":{"name":"@clerk/backend-core","version":"2.11.7-staging.1","license":"MIT","_id":"@clerk/backend-core@2.11.7-staging.1","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"0983e9adba6b4890ed9b1676305eb2753cce526e","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.11.7-staging.1.tgz","fileCount":351,"integrity":"sha512-0Vv51kUYtAzrF2eB+Nw6qYy2jEdrIZO+rgmoBZS8mVR1oRHq3t1Hc+AqE4TSDF2Sw3Z+gHXKRqDXPOsLRm9c+A==","signatures":[{"sig":"MEUCIHiDbkYINTRVVFOqsdWGjR59D3QKWY/4mrMKAC3ygfTTAiEAu3W5b/r5v2n6xBwO7GbdugqHoYpQaySkO/w0WFEMHIs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":586570,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjhgHBACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpYWQ/+JC5QqmnUjdN5OHWJfM1uGpvlcJrDBVHrA0ty7IadS5YI0XQL\r\nTlvZMVEc6fF4j/aNItmDIOyhz7eg8n2VLfytqgtvlDcvZYXMMY1Jth+zqdVJ\r\n93TvVBF/1363iYyCFeVCLsVszqXjj9d440ANw00JqVKlisoXn5754rpeuiz4\r\n/Av/PvdT41KZSf8Gqgx7gUPBNwEC5Lpf/ZezDlFGg0Kz4nD9wlK53vQgCVS2\r\nRh5uXOuayKuj+tdKq7rJRAVxvvr4Zfnp3zwQVbTwVmVk94NH8ikMaRC+Moj9\r\nUU0otKkQywhuvRihHSJqvMcjiXFD4TO7Bya+skvGLe1BK+5fCvwpMS/dnEuX\r\nlsWUhw6HzJ5dfuivj7ELhQAsWz9L9fbBI6MTXNYQsQcRAS7iYKYytdggQLX1\r\nmQ2Y7n264ZFd0FrhNsxtvXRZSZubdcagqxsImaf7ZeXiS46BtumEsoIXfLfd\r\nI3S87DyTEov9p6abXjoKDGHO1jqlA/aHD9HX8G38hf8P8/6o2pose46J+5aV\r\nC0sUXZFutPnipj0vszkUjvSEwkd+418sutLHHyk+GfKwWQc5hE2AWIEdu87F\r\n8c50iWBuyClJfPGXd1wV2accfx5iTMH7nISb/U1yTYD3nKxW+7PvY+ucnSwF\r\nnjlIZac9BVSnSn3/zroUQsknyecd5gZwGTo=\r\n=lMYj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev?utm_source=github&utm_medium=clerk_backend_core\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <picture>\n      <source media=\"(prefers-color-scheme: dark)\" srcset=\"https://dashboard.clerk.dev/assets/logo-dark-mode-400x400.png\">\n      <img src=\"https://dashboard.clerk.dev/assets/logo-light-mode-400x400.png\" height=\"64\">\n    </picture>\n  </a>\n  <br />\n</p>\n\n# @clerk/backend-core\n\n<div align=\"center\">\n\n[![Chat on Discord](https://img.shields.io/discord/856971667393609759.svg?logo=discord)](https://discord.com/invite/b5rXHjAg7A)\n[![Clerk documentation](https://img.shields.io/badge/documentation-clerk-green.svg)](https://clerk.dev/docs?utm_source=github&utm_medium=clerk_backend_core)\n[![Follow on Twitter](https://img.shields.io/twitter/follow/ClerkDev?style=social)](https://twitter.com/intent/follow?screen_name=ClerkDev)\n\n[Changelog](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/CHANGELOG.md)\n·\n[Report a Bug](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=bug&template=bug_report.md&title=Bug%3A+)\n·\n[Request a Feature](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=Feature%3A+)\n·\n[Ask a Question](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n\n</div>\n\n---\n\n## Overview\n\nThis package provides Clerk Backend API core resources and low-level authentication utilities for JavaScript environments. It is mostly used as the base for other Clerk SDKs.\n\n## Getting Started\n\n### Installation\n\n```sh\nnpm install @clerk/backend-core\n```\n\n### Build\n\nTo build the package locally with the TypeScript compiler, run:\n\n```sh\nnpm run build\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities, without being platform/environment, specific such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendApi](./src/api/ClerkBackendApi.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendApi` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n## Usage\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendApi](./src/api/ClerkBackendApi.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://reference.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendApi.ts#17) implementation.\n\n## Support\n\nYou can get in touch with us in any of the following ways:\n\n- Join our official community [Discord server](https://discord.com/invite/b5rXHjAg7A)\n- Open a [GitHub support issue](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n- Contact options listed on [our Support page](https://clerk.dev/support?utm_source=github&utm_medium=clerk_backend_core)\n\n## Contributing\n\nWe're open to all community contributions! If you'd like to contribute in any way, please read [our contribution guidelines](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/CONTRIBUTING.md).\n\n## Security\n\n`@clerk/backend-core` follows good practices of security, but 100% security cannot be assured.\n\n`@clerk/backend-core` is provided **\"as is\"** without any **warranty**. Use at your own risk.\n\n_For more information and to report security issues, please refer to our [security documentation](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/SECURITY.md)._\n\n## License\n\nThis project is licensed under the **MIT license**.\n\nSee [LICENSE](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/LICENSE) for more information.\n","engines":{"node":">=14"},"gitHead":"86aac4f6fd648d9f1348091cfd63ec4a6e453216","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","lint":"eslint .","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix","clean":"rimraf ./dist"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.18.1+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.18.1","dependencies":{"tslib":"^2.3.1","node-fetch":"^2.6.0","@types/node":"^16.11.55","@clerk/types":"^3.19.0-staging.1","query-string":"^7.0.1","snakecase-keys":"^5.4.4","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.4.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","typescript":"*"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.11.7-staging.1_1669726656759_0.5918428603329398","host":"s3://npm-registry-packages"}},"2.11.7-staging.2":{"name":"@clerk/backend-core","version":"2.11.7-staging.2","license":"MIT","_id":"@clerk/backend-core@2.11.7-staging.2","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"8711bbc1f782c3658edae6a3630962dd387b72a7","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.11.7-staging.2.tgz","fileCount":351,"integrity":"sha512-ks90qG+fcHBggLB+elQb8z9/G1q9sN7cDCRRU4t8GXmt65dS/DtQsiOA5Eso2QasFcDB5cuXlKFynPCidNGZ9Q==","signatures":[{"sig":"MEYCIQDKXARi6jfL9IZ9T0asDDwarwjS1c8Y0w2pS5s2+DJw0AIhANnU1gSGts1X1OEzHxJ8dJG8lzyLSd5yutMbbqJ1ydY+","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":586570,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjhgRDACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrQmQ//R+O02RUIgiI46QeHKU5QCTutWTcwlctj9KEHhHDkFJC+GtyF\r\ngiWTQz3MHhTFJANGZnvNzOD78ZaqyP3f1z6dJHnpCrNQm56s8kHkAiDnfIPj\r\nhEIQFowgkWxDKmpr48gqJAnyCkOyupLGfvX4WOnxjS4pFqXfUvTqPz62hFjM\r\ne6+cCi9Eumgc+x9fQ4qCHb2OAYXisOdAf2YcYAa05n+3suerhNXUPsts1kM8\r\ncjqSjEDbhIIzIRPliR2XqL4L4zFQNawXvvisyvx6kU3rPeL6tyNJ2t1BfV9J\r\nXrPvNg0UHFgeRLGcILFvSyRerUOcqu7+8Iq0r9WiZEgKV/7uJYkrQQBYVQYg\r\n69/0c5XsPfwLTnETpuvAQvaeBcHuQ+AxCqHOn2bfxmQUrXB7UbCO5y4mrB+B\r\nVwcNjgPr/jcdyO3XJPcSVjRh01MY+C4f7mXt7vdNNdSMwaraQJ/WKC9xBl25\r\ni6Lzg8dSlIqJ7wZb6UGUzRnCAuSrExGQ3O7UdQq7pOuIDXmxsy3zXIQc7ziA\r\nTsBiBi+4YnzgWelONMja5o1+xO1iWAWci1U4eyJZAS/Hg4uv87+mLvwkjAb5\r\nrFzZObpANUmILFzoAufyR+RGcJzPCJ7vpf8znUu9z2m12g8UlXhTQmdh6QNy\r\nuPK6ZwMuNLPAkkdaTALgECPvj/gNF7Nhzek=\r\n=PpFr\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev?utm_source=github&utm_medium=clerk_backend_core\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <picture>\n      <source media=\"(prefers-color-scheme: dark)\" srcset=\"https://dashboard.clerk.dev/assets/logo-dark-mode-400x400.png\">\n      <img src=\"https://dashboard.clerk.dev/assets/logo-light-mode-400x400.png\" height=\"64\">\n    </picture>\n  </a>\n  <br />\n</p>\n\n# @clerk/backend-core\n\n<div align=\"center\">\n\n[![Chat on Discord](https://img.shields.io/discord/856971667393609759.svg?logo=discord)](https://discord.com/invite/b5rXHjAg7A)\n[![Clerk documentation](https://img.shields.io/badge/documentation-clerk-green.svg)](https://clerk.dev/docs?utm_source=github&utm_medium=clerk_backend_core)\n[![Follow on Twitter](https://img.shields.io/twitter/follow/ClerkDev?style=social)](https://twitter.com/intent/follow?screen_name=ClerkDev)\n\n[Changelog](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/CHANGELOG.md)\n·\n[Report a Bug](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=bug&template=bug_report.md&title=Bug%3A+)\n·\n[Request a Feature](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=Feature%3A+)\n·\n[Ask a Question](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n\n</div>\n\n---\n\n## Overview\n\nThis package provides Clerk Backend API core resources and low-level authentication utilities for JavaScript environments. It is mostly used as the base for other Clerk SDKs.\n\n## Getting Started\n\n### Installation\n\n```sh\nnpm install @clerk/backend-core\n```\n\n### Build\n\nTo build the package locally with the TypeScript compiler, run:\n\n```sh\nnpm run build\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities, without being platform/environment, specific such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendApi](./src/api/ClerkBackendApi.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendApi` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n## Usage\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendApi](./src/api/ClerkBackendApi.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://reference.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendApi.ts#17) implementation.\n\n## Support\n\nYou can get in touch with us in any of the following ways:\n\n- Join our official community [Discord server](https://discord.com/invite/b5rXHjAg7A)\n- Open a [GitHub support issue](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n- Contact options listed on [our Support page](https://clerk.dev/support?utm_source=github&utm_medium=clerk_backend_core)\n\n## Contributing\n\nWe're open to all community contributions! If you'd like to contribute in any way, please read [our contribution guidelines](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/CONTRIBUTING.md).\n\n## Security\n\n`@clerk/backend-core` follows good practices of security, but 100% security cannot be assured.\n\n`@clerk/backend-core` is provided **\"as is\"** without any **warranty**. Use at your own risk.\n\n_For more information and to report security issues, please refer to our [security documentation](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/SECURITY.md)._\n\n## License\n\nThis project is licensed under the **MIT license**.\n\nSee [LICENSE](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/LICENSE) for more information.\n","engines":{"node":">=14"},"gitHead":"124521112fda9691cb7f954f6cf82aadbc14d1cb","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","lint":"eslint .","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix","clean":"rimraf ./dist"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.18.1+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.18.1","dependencies":{"tslib":"^2.3.1","node-fetch":"^2.6.0","@types/node":"^16.11.55","@clerk/types":"^3.19.0-staging.2","query-string":"^7.0.1","snakecase-keys":"^5.4.4","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.4.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","typescript":"*"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.11.7-staging.2_1669727298726_0.9200892225391823","host":"s3://npm-registry-packages"}},"2.11.7-staging.3":{"name":"@clerk/backend-core","version":"2.11.7-staging.3","license":"MIT","_id":"@clerk/backend-core@2.11.7-staging.3","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"f4c3d7b48b4dfa01649728aba1ecdf9c431fcc3c","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.11.7-staging.3.tgz","fileCount":351,"integrity":"sha512-lsl8xKZIn7+pNN8zXImAQ1QAF1FaBYZyAjnu7E4oXkXlXCywGmBvmYeGL+rnFXI+EOe0ve9GbtcoYYYx3yB+5A==","signatures":[{"sig":"MEQCIGdC8Ap2hv7O8w1bcsLFxApYMVu8+54wDAu+VcQ2OIONAiAwTT5pAncRnykmZLNw3NqJoosMCg0vR0Iq5bHlY2Itzg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":586570,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjhkeqACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqQPQ/+P/flDxEGNXKgZXLNXfqm/4rKXXUqNtmyWRVG39+8aiBWl/eK\r\nbfud4kaEZpjuaT8HoU/gvFyGSJFgWYK6pu7LguyogfjHZzNtyIfHcqZ0Ui55\r\nI5DV01n6tj2UX7u+NQRhKEXE8XykwVMLdov1BlYYE88RVfUVOWhIeZq3XSQt\r\npuojBgoL5FVThgRSEflHaq3f1QEG8xRMMoPtFtYA1unD5+h49pt6QzX8vHst\r\nfSl2Z9BfKt6rEKa56F9R5z0Bu4RH+iW0FFkFbQ+4tRAlJxHxlFZZnZMlePEk\r\nbGKMZsEIQq2rcTSOtJdhMEs9J0ia68s/Ka0tUB/c1JtLIfCHH0rs7Ea1yoKi\r\nFVJbRPaguXyLvsrfMRBewRVlC6GukqdN0VIkjZZbp01Vt+AO9vg/TXg2gseN\r\nW3RrdyhGzKUXhkuoGuxfp97+erSZGYhKAIYLvfO+pIhaWjbZxf3DjMtdVC6f\r\nFmnK8htH28Jn6bhqGfCL440AJy165OnGnpnQTw1QiiioxENeKou+AtR1guJZ\r\nqANwUiCtXLa5sJv5Vu3M/ZD51iuwoqdOlTfwn3gqGvZBusuaMPbW6ZLJFmQ+\r\n92GvtJ1d9RUK8cMPw7/sksOHiM+4+N44niB9aznNihJ+/MUspPuQt2/yUERx\r\nxHmmedWa0sNBttt/7fISq4anK/GcQgKv3v0=\r\n=Eaqb\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev?utm_source=github&utm_medium=clerk_backend_core\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <picture>\n      <source media=\"(prefers-color-scheme: dark)\" srcset=\"https://dashboard.clerk.dev/assets/logo-dark-mode-400x400.png\">\n      <img src=\"https://dashboard.clerk.dev/assets/logo-light-mode-400x400.png\" height=\"64\">\n    </picture>\n  </a>\n  <br />\n</p>\n\n# @clerk/backend-core\n\n<div align=\"center\">\n\n[![Chat on Discord](https://img.shields.io/discord/856971667393609759.svg?logo=discord)](https://discord.com/invite/b5rXHjAg7A)\n[![Clerk documentation](https://img.shields.io/badge/documentation-clerk-green.svg)](https://clerk.dev/docs?utm_source=github&utm_medium=clerk_backend_core)\n[![Follow on Twitter](https://img.shields.io/twitter/follow/ClerkDev?style=social)](https://twitter.com/intent/follow?screen_name=ClerkDev)\n\n[Changelog](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/CHANGELOG.md)\n·\n[Report a Bug](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=bug&template=bug_report.md&title=Bug%3A+)\n·\n[Request a Feature](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=Feature%3A+)\n·\n[Ask a Question](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n\n</div>\n\n---\n\n## Overview\n\nThis package provides Clerk Backend API core resources and low-level authentication utilities for JavaScript environments. It is mostly used as the base for other Clerk SDKs.\n\n## Getting Started\n\n### Installation\n\n```sh\nnpm install @clerk/backend-core\n```\n\n### Build\n\nTo build the package locally with the TypeScript compiler, run:\n\n```sh\nnpm run build\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities, without being platform/environment, specific such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendApi](./src/api/ClerkBackendApi.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendApi` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n## Usage\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendApi](./src/api/ClerkBackendApi.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://reference.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendApi.ts#17) implementation.\n\n## Support\n\nYou can get in touch with us in any of the following ways:\n\n- Join our official community [Discord server](https://discord.com/invite/b5rXHjAg7A)\n- Open a [GitHub support issue](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n- Contact options listed on [our Support page](https://clerk.dev/support?utm_source=github&utm_medium=clerk_backend_core)\n\n## Contributing\n\nWe're open to all community contributions! If you'd like to contribute in any way, please read [our contribution guidelines](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/CONTRIBUTING.md).\n\n## Security\n\n`@clerk/backend-core` follows good practices of security, but 100% security cannot be assured.\n\n`@clerk/backend-core` is provided **\"as is\"** without any **warranty**. Use at your own risk.\n\n_For more information and to report security issues, please refer to our [security documentation](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/SECURITY.md)._\n\n## License\n\nThis project is licensed under the **MIT license**.\n\nSee [LICENSE](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/LICENSE) for more information.\n","engines":{"node":">=14"},"gitHead":"9133916dc3e7482543b63ec26444580a73b5801e","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","lint":"eslint .","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix","clean":"rimraf ./dist"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.18.1+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.18.1","dependencies":{"tslib":"^2.3.1","node-fetch":"^2.6.0","@types/node":"^16.11.55","@clerk/types":"^3.19.0-staging.3","query-string":"^7.0.1","snakecase-keys":"^5.4.4","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.4.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","typescript":"*"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.11.7-staging.3_1669744554629_0.4828990499268082","host":"s3://npm-registry-packages"}},"2.11.7-staging.4":{"name":"@clerk/backend-core","version":"2.11.7-staging.4","license":"MIT","_id":"@clerk/backend-core@2.11.7-staging.4","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"eaa4b0b7af725cbe2aa4e9860e36a1b7d96a77e4","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.11.7-staging.4.tgz","fileCount":351,"integrity":"sha512-W5Q19IkgL4/jmL1nR+Cyxm8FHwW1Pt/3YjFZuIU1tNLksR/4IKlwYbJNgftL3h7XnTRNoIaT4UH0iEZq2E8Jbw==","signatures":[{"sig":"MEUCIQCdZ+ZYBXjhVycbOTn07mMRWi2mKDdoCa6fb5BJiIqr7wIgfAoPx8GX6gAeHHeav4b1kOvbSe4hCf8bRjE/go79y8M=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":586666,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjhn4pACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq40w//Z5KLcwYFZVY+YTqyHTjjX8mxpO9TsmT5bysHeFLHTL/aieEp\r\n0iHlbiNbuMNRi+L1z/G9S29669at7abBYiMVSkSnFonmYdotUTamJVTnsHBB\r\nlSgoAZ0hjFwlSY2obvda8uKkJp3r+qSs6H8EPrl14H3TFH58uihrI442lNkk\r\nFOq5G6QWzGS7sIyY1Q5poh51PsjXdye143gcoaVsaJIXBc+fOzZ9X/koK0/+\r\nlIaXjBio4Lbi/7JXtzcLUx1SQfR093PPkSbtaXDR/AoTM2+hk0j7dfiSsOtf\r\nfrpUBK3f8MOeeE2fd3bdJ2wWz1PgVQgHXXoBYgZ7tpu18ZORvCJuATWi0T8N\r\npH0EVL12u7pCxbbjTdcDDxzMnwuWPjvG4K7YNydlGNDc9eQoyz9xFCBsXM2x\r\nZrBThl3YG0xexIwQvskUjYIHvk8bMjusSRd1XQZGXXcBrpOn3JOPnT2+kxD+\r\nMxc5x0eWA/Cn5ZW9MFSlbcN81I8XOS0PPSDp+aht8frRc6ueikaK5g1EXv8A\r\ngTyGXFH3QOOb+uR297f65hgmFdsAnbKJYntSclb/tJwxYt1Kb2XFicFaYEq6\r\nOi2Bf+8pb0N7L4hTseSAPBCXkMZldvFi9s21keS85qA6rwpI6tMEr1v3RpXC\r\nLRXEN65XpN0twx3U787XIhIqs2E+GNu/hIM=\r\n=Vshx\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev?utm_source=github&utm_medium=clerk_backend_core\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <picture>\n      <img src=\"https://images.clerk.dev/static/logo-light-mode-400x400.png\" height=\"64\">\n    </picture>\n  </a>\n  <br />\n</p>\n\n# @clerk/backend-core\n\n<div align=\"center\">\n\n[![Chat on Discord](https://img.shields.io/discord/856971667393609759.svg?logo=discord)](https://discord.com/invite/b5rXHjAg7A)\n[![Clerk documentation](https://img.shields.io/badge/documentation-clerk-green.svg)](https://clerk.dev/docs?utm_source=github&utm_medium=clerk_backend_core)\n[![Follow on Twitter](https://img.shields.io/twitter/follow/ClerkDev?style=social)](https://twitter.com/intent/follow?screen_name=ClerkDev)\n\n[Changelog](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/CHANGELOG.md)\n·\n[Report a Bug](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=bug&template=bug_report.md&title=Bug%3A+)\n·\n[Request a Feature](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=Feature%3A+)\n·\n[Ask a Question](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n\n</div>\n\n---\n\n## Overview\n\nThis package provides Clerk Backend API core resources and low-level authentication utilities for JavaScript environments. It is mostly used as the base for other Clerk SDKs.\n\n## Getting Started\n\n### Installation\n\n```sh\nnpm install @clerk/backend-core\n```\n\n### Build\n\nTo build the package locally with the TypeScript compiler, run:\n\n```sh\nnpm run build\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities, without being platform/environment, specific such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendApi](./src/api/ClerkBackendApi.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendApi` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n## Usage\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendApi](./src/api/ClerkBackendApi.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://reference.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendApi.ts#17) implementation.\n\n## Support\n\nYou can get in touch with us in any of the following ways:\n\n- Join our official community [Discord server](https://discord.com/invite/b5rXHjAg7A)\n- Open a [GitHub support issue](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n- Contact options listed on [our Support page](https://clerk.dev/support?utm_source=github&utm_medium=clerk_backend_core)\n\n## Contributing\n\nWe're open to all community contributions! If you'd like to contribute in any way, please read [our contribution guidelines](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/CONTRIBUTING.md).\n\n## Security\n\n`@clerk/backend-core` follows good practices of security, but 100% security cannot be assured.\n\n`@clerk/backend-core` is provided **\"as is\"** without any **warranty**. Use at your own risk.\n\n_For more information and to report security issues, please refer to our [security documentation](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/SECURITY.md)._\n\n## License\n\nThis project is licensed under the **MIT license**.\n\nSee [LICENSE](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/LICENSE) for more information.\n","engines":{"node":">=14"},"gitHead":"f15abf695be6fccc46f789ea2f9791a2dff632b9","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","lint":"eslint .","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix","clean":"rimraf ./dist"},"_npmUser":{"name":"sokratis","email":"sokratis.vidros@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.18.1+x64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.18.1","dependencies":{"tslib":"^2.3.1","node-fetch":"^2.6.0","@types/node":"^16.11.55","@clerk/types":"^3.19.0-staging.4","query-string":"^7.0.1","snakecase-keys":"^5.4.4","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.4.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","typescript":"*"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.11.7-staging.4_1669758504998_0.7538499215156562","host":"s3://npm-registry-packages"}},"2.11.7":{"name":"@clerk/backend-core","version":"2.11.7","license":"MIT","_id":"@clerk/backend-core@2.11.7","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"3d20478d9c5135c1bc239f9b1eaee0da0deedc28","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.11.7.tgz","fileCount":351,"integrity":"sha512-tD4XtOjp3m7xnnK9oyu70kSpPJxDC13X6gmrRpKA4+mkSOyXvj3t54OeaWMxk+uPwjcEbjRAzkS1BZVCUPa4Ug==","signatures":[{"sig":"MEUCIDzwIGKu11+0yHSGZjK7Zszi/oDPhZX4BLCoUxmHSjC4AiEApM+k/fB7+I/sCJ6t7upql4B49jZFJ1FNUJ6PbwnoVpM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":586848,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjhxneACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr3PA/9GJu06pBfSvFaETaXVSpNX1egAinTTKvHzJOdM0DxcB+nVQJH\r\nfX/xOuOidAYwVhSQ52RNGniOzOq7VgHz+E7KvjrYnoMrWMmGiJC8UeQpXPOe\r\n6kgmOYk5heB7ycSYqATb0KB5D7opPjVtKhxP3ANWAuqDdHf4xG9wxe/cn3yx\r\nWV9U3JksPiww8IdiT0yCtbQZ27cQZG61urqH3w5hthf3xso2WP31SDdxWG2U\r\n0W20CVxTB56sAnopds2mXs3Gud911G0p7tr1FfjL4LhvoK9a7BfXiWRX0+p6\r\nM/8VFicHRAgNRChOoIEwcYIkM1j5bbk4A7t6z7CxblMzcJUwpTU6mu9wj2/p\r\n8IiUH2spN9TZmODIXx9uDpR9VOwEHn/HIZIKVTtkEfOk/rR/48rNtjt+gK//\r\n6tXuprMKrT28iMydr7rNeQw6xKHRsq9k8AGJ8lfZt2Onv2f0KSqdFwPT7oOK\r\nsYQKQ2FFu+7qix6M37M+SkYcrdyOa+xTeFEeprpfImuDeOKtwjcX+p/jmXrM\r\nBIvWGyJEImS+04cPu+wx7PTAWP/HN4GvyZpb/uComDhVV7UW1iYbMr1U/mPc\r\n5mf9KEmoazMk82usyut+/GPBZLxpQxl9/HAwn9WkVnvYGojj5X1HHDjASDoP\r\nahg7Kp1mc1VdC4iLHx1PvcrWDwRptb/Q5Pw=\r\n=X4ZP\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","engines":{"node":">=14"},"gitHead":"9d8812fd098ed71f2135bad5bf47efa244c61535","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","lint":"eslint .","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix","clean":"rimraf ./dist"},"_npmUser":{"name":"sokratis","email":"sokratis.vidros@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.18.1+x64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.18.1","dependencies":{"tslib":"^2.3.1","node-fetch":"^2.6.0","@types/node":"^16.11.55","@clerk/types":"^3.19.0","query-string":"^7.0.1","snakecase-keys":"^5.4.4","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.4.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","typescript":"*"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.11.7_1669798366157_0.4415548784579171","host":"s3://npm-registry-packages"}},"2.11.8-staging.0":{"name":"@clerk/backend-core","version":"2.11.8-staging.0","license":"MIT","_id":"@clerk/backend-core@2.11.8-staging.0","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"fd4bfa7482f2c09c9d52fe68debd207c486c5b55","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.11.8-staging.0.tgz","fileCount":351,"integrity":"sha512-5PwTFX7CG4qpE2zLpCzUksicQWXcwJzi25DoA2k5ad/bWsTQ/64Aatiandv1OPIpeMva0YjPfw3ikbvndw+doA==","signatures":[{"sig":"MEUCIQCKOuAOESRJnV01Xlp65Zz4mXrgiAFXXygZSJvcx/4rzgIgRPXoeOnAzQFr2O54JgSwFk+y/1j9qPVMuH+ZVA0G6+M=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":586868,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjic+HACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmri7w/+LDsJh7JcckNZNodrJegZ+gXvb145/xpQX04tj/7elrS2OI5X\r\n5JrlPntJiYm9fpcz8QBXhdDJDlNhULlkxSD5x9ikWhXOUCHShMne9DPfnZag\r\nQlrlU2WDUSrylemzKpiLs/sSiYCklM6Po5tlXq2eEAyEhN7hSCqpoxYtN4s9\r\nsdZS89XSAuIQhEaF+UiIiewaN1k2hJGS9YTOIT/7wixkMJyR7iAM5tm3kcHH\r\nyaXveVe2bfZpU8kkWIt0nqH4LGEUa+onsukaY/d7QqR9kp/KXEEFPh3dT410\r\nuWPH5c/SuiFusNm/lMj8VMCDGKby/c3JNaP+0x44Tdm35gAS76Bt6xm9egm2\r\ncsGL3Ho0GCSO+e+JAufpavoKzb0AaRIg/WQfaMK//0S1pK6P1IOwwE0a0c2d\r\n4KhO0cU2N1e8ayr3hdMUXozNIUiljtfTVtr7y5WmF8PDmd1DUki/ilJC92Kh\r\nTkLbArVVCLl0PBmI3iESeu65h2UcODCjrrWYlnL8u8VZsLWqmjR2Da/21CBJ\r\nc2S8YpYpfgssTMUiFqg3aeCSIpwQySKQzKY0Pr1aPpRKm0c/qhpnmu49lA1E\r\nKdlL68bp8aOsULfwqzMJAe4bKGw+eY5QGgcYYSj1lTC8gECc/k0pWBul1MJj\r\nbuSrG3LedWoI0xG1nludxiWrIhthCM+2k44=\r\n=bq23\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev?utm_source=github&utm_medium=clerk_backend_core\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <picture>\n      <img src=\"https://images.clerk.dev/static/logo-light-mode-400x400.png\" height=\"64\">\n    </picture>\n  </a>\n  <br />\n</p>\n\n# @clerk/backend-core\n\n<div align=\"center\">\n\n[![Chat on Discord](https://img.shields.io/discord/856971667393609759.svg?logo=discord)](https://discord.com/invite/b5rXHjAg7A)\n[![Clerk documentation](https://img.shields.io/badge/documentation-clerk-green.svg)](https://clerk.dev/docs?utm_source=github&utm_medium=clerk_backend_core)\n[![Follow on Twitter](https://img.shields.io/twitter/follow/ClerkDev?style=social)](https://twitter.com/intent/follow?screen_name=ClerkDev)\n\n[Changelog](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/CHANGELOG.md)\n·\n[Report a Bug](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=bug&template=bug_report.md&title=Bug%3A+)\n·\n[Request a Feature](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=Feature%3A+)\n·\n[Ask a Question](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n\n</div>\n\n---\n\n## Overview\n\nThis package provides Clerk Backend API core resources and low-level authentication utilities for JavaScript environments. It is mostly used as the base for other Clerk SDKs.\n\n## Getting Started\n\n### Installation\n\n```sh\nnpm install @clerk/backend-core\n```\n\n### Build\n\nTo build the package locally with the TypeScript compiler, run:\n\n```sh\nnpm run build\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities, without being platform/environment, specific such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendApi](./src/api/ClerkBackendApi.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendApi` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n## Usage\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendApi](./src/api/ClerkBackendApi.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://reference.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendApi.ts#17) implementation.\n\n## Support\n\nYou can get in touch with us in any of the following ways:\n\n- Join our official community [Discord server](https://discord.com/invite/b5rXHjAg7A)\n- Open a [GitHub support issue](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n- Contact options listed on [our Support page](https://clerk.dev/support?utm_source=github&utm_medium=clerk_backend_core)\n\n## Contributing\n\nWe're open to all community contributions! If you'd like to contribute in any way, please read [our contribution guidelines](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/CONTRIBUTING.md).\n\n## Security\n\n`@clerk/backend-core` follows good practices of security, but 100% security cannot be assured.\n\n`@clerk/backend-core` is provided **\"as is\"** without any **warranty**. Use at your own risk.\n\n_For more information and to report security issues, please refer to our [security documentation](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/SECURITY.md)._\n\n## License\n\nThis project is licensed under the **MIT license**.\n\nSee [LICENSE](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/LICENSE) for more information.\n","engines":{"node":">=14"},"gitHead":"1ae03caa1be32ddc6e40ea084427b4a2ce5dcc10","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","lint":"eslint .","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix","clean":"rimraf ./dist"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.18.1+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.18.1","dependencies":{"tslib":"^2.3.1","node-fetch":"^2.6.0","@types/node":"^16.11.55","@clerk/types":"^3.20.0-staging.0","query-string":"^7.0.1","snakecase-keys":"^5.4.4","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.4.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","typescript":"*"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.11.8-staging.0_1669975943451_0.8135279752825799","host":"s3://npm-registry-packages"}},"2.11.8":{"name":"@clerk/backend-core","version":"2.11.8","license":"MIT","_id":"@clerk/backend-core@2.11.8","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"8620a660b79de64ad4bd41c0d8ccf360167d98f7","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.11.8.tgz","fileCount":351,"integrity":"sha512-wTBs++WAcKbHxmx37akQzzLs6jmJfMyAOY0UYeARsUFNZW4BnLFyVTQwt2ZcWtgar8zQK0Xgp/cRH1KerJKO6g==","signatures":[{"sig":"MEQCIDJ8fGfvQ1zZkWSo9dd0yYv5DMtvjhdk1PUhfXzD+uL1AiAprsRANYSVrgtpBl2gPsWspjBsL18/IoOBz+ul1/JHFg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":587050,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjifUSACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr3xhAAiwMVb32C+VBBlTQ6YCRfD8zwyt5TkcKPvPx2k1crlf/+xfnH\r\n1IC7qoZZrQdofF4E6BGLeCDxHh67BdQKKqnDLliev+TezCw4iSQ50jCX5Tbu\r\nH9TtgslVcT/b5St34klZGDtiDZkpwhbzR+dEcGuwW83nx+dnpVX17X4RVvxS\r\no/dtIfk62S/yt83b7QKWkrXN94Cgoq3TGRswETeHOoZgqaH79+hQRMCw8AF4\r\n+WbpHenUPSJwYJYjnjCg4gq7zIxUwrUSWajYvD75m3QeLut6DQMmPA07yBJS\r\nyw3FyXblSRwAI/9IgzDvC26S+YEmeBU2yUOldTLORJU8/yLZnJvnMV7q5yAb\r\n+ZPxIMbYWAjWHr8AENlVKmAb62rO6sC67MImk5oubxRJmkslynMJATFW74FB\r\nEdtjcZw7GG1BEUEyZjokmA9I/SDK4aMrAf5fHYPUj1t1wPd95qIqQ3r628d8\r\n4aL1Cf+t874CEM3Jdxo1YxTdHvQ2Qm5s+KYdcjIevQzbMu/YzaxPgVWtQQLd\r\nNO9PP5AcuVlyOE6nFySZg7TNaQExWBrBL0uVW47UkBP7Q7W7nq+p6c6qf6BH\r\nx6MIgPD2B2QGMDu8lUpvfcDCxR92TVehXOxiJvluXcllHfN6cCw8l+/mQPBU\r\nbCAG9haxXWK48fAAlE74utIaZDgG0oF90n8=\r\n=/xc+\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","engines":{"node":">=14"},"gitHead":"41692027cda67ea7ca44dc5994cd9b7dcb98f03a","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","lint":"eslint .","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix","clean":"rimraf ./dist"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.18.1+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.18.1","dependencies":{"tslib":"^2.3.1","node-fetch":"^2.6.0","@types/node":"^16.11.55","@clerk/types":"^3.20.0","query-string":"^7.0.1","snakecase-keys":"^5.4.4","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.4.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","typescript":"*"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.11.8_1669985554072_0.4386017486859264","host":"s3://npm-registry-packages"}},"2.11.9-staging.0":{"name":"@clerk/backend-core","version":"2.11.9-staging.0","license":"MIT","_id":"@clerk/backend-core@2.11.9-staging.0","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"aabf90d1166c03ce6060f6baf520663f835957e3","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.11.9-staging.0.tgz","fileCount":351,"integrity":"sha512-BTZj/GqywbCW8KApJ4R/kz2KQE++esDbGJSCOgMv+vh8tG9i1ck8358XDYheZaJuARw9XdccZPAHdyxA3xEh5g==","signatures":[{"sig":"MEYCIQCzKlQxHZ2FbkXNH8LEZIe8O16yE6c0ca6ettLLpTTwngIhAIbrlzFa/6diUm9XfGl8q2ewV8zzQ4xpcX44H1iJ9qnA","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":587070,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjkHClACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpENRAAkVxc/08C3TV0HZ2Afcvw/Na3r/as6Sb5BLuIdYjTxRBqiHwk\r\nGnwqx9Izp1B2J7JWosdWLs4RCDLLF0YrifPfDOwCvqnNfpNg+EPFki/ZSe2P\r\nYx9RWyQdAvvnhs48eMhbOVLEksPYNelBd+aSKNYjY5Q/hgvYTjNmxNtHJdkl\r\nVlTadTlwVDFFpAoaR6ayFSvRed00Tq3Wasbg/V2D6StnJkqEPvl3mr6n0jRc\r\n2cYK8vYgx7bf1hvBVkMgmE2NS/HG5Ta5YxTX96FLw33N7j2DE4alfVQSYzvI\r\n7UOkrtvAGw+Wvt0YsNLJKIo7o7crBQ/ghtJQKYRbeXwI0CQETpQaMcTJ2r19\r\n7R1l7r7jm+b5Mq3N5gLPgGjfBGARVPJ8cKfrrcTcQB7iC0FH93vsYIXPxsyO\r\nvaz2t8WJ2MFV9Aq5TM2qWgS9L1WkVZYHMesz67B/M3hQAYFebAhhGX4ODn02\r\nUFOC8Q41MutiRbHSqD+ywZD9ELMavXQ78QqhelDercO1lmUdhyqp9sCyqV8V\r\n/rTq5QcFmtUxbfIfwnsk7JnNkz6dUwYYmECObJRf3Z0ANYM8lD91VR2b8Vdu\r\nL1rXWZwcEAuIWd0YUFaQeQSSP754/yvMPemMuZ8QPaiJBMCfWYx5i3JZwUEx\r\nXnkCsF0OMPm/rwVwA/Ew+AV/U8V7bp6VHUY=\r\n=IKuE\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev?utm_source=github&utm_medium=clerk_backend_core\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <picture>\n      <img src=\"https://images.clerk.dev/static/logo-light-mode-400x400.png\" height=\"64\">\n    </picture>\n  </a>\n  <br />\n</p>\n\n# @clerk/backend-core\n\n<div align=\"center\">\n\n[![Chat on Discord](https://img.shields.io/discord/856971667393609759.svg?logo=discord)](https://discord.com/invite/b5rXHjAg7A)\n[![Clerk documentation](https://img.shields.io/badge/documentation-clerk-green.svg)](https://clerk.dev/docs?utm_source=github&utm_medium=clerk_backend_core)\n[![Follow on Twitter](https://img.shields.io/twitter/follow/ClerkDev?style=social)](https://twitter.com/intent/follow?screen_name=ClerkDev)\n\n[Changelog](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/CHANGELOG.md)\n·\n[Report a Bug](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=bug&template=bug_report.md&title=Bug%3A+)\n·\n[Request a Feature](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=Feature%3A+)\n·\n[Ask a Question](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n\n</div>\n\n---\n\n## Overview\n\nThis package provides Clerk Backend API core resources and low-level authentication utilities for JavaScript environments. It is mostly used as the base for other Clerk SDKs.\n\n## Getting Started\n\n### Installation\n\n```sh\nnpm install @clerk/backend-core\n```\n\n### Build\n\nTo build the package locally with the TypeScript compiler, run:\n\n```sh\nnpm run build\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities, without being platform/environment, specific such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendApi](./src/api/ClerkBackendApi.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendApi` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n## Usage\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendApi](./src/api/ClerkBackendApi.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://reference.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendApi.ts#17) implementation.\n\n## Support\n\nYou can get in touch with us in any of the following ways:\n\n- Join our official community [Discord server](https://discord.com/invite/b5rXHjAg7A)\n- Open a [GitHub support issue](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n- Contact options listed on [our Support page](https://clerk.dev/support?utm_source=github&utm_medium=clerk_backend_core)\n\n## Contributing\n\nWe're open to all community contributions! If you'd like to contribute in any way, please read [our contribution guidelines](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/CONTRIBUTING.md).\n\n## Security\n\n`@clerk/backend-core` follows good practices of security, but 100% security cannot be assured.\n\n`@clerk/backend-core` is provided **\"as is\"** without any **warranty**. Use at your own risk.\n\n_For more information and to report security issues, please refer to our [security documentation](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/SECURITY.md)._\n\n## License\n\nThis project is licensed under the **MIT license**.\n\nSee [LICENSE](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/LICENSE) for more information.\n","engines":{"node":">=14"},"gitHead":"ac2f47aa5d58f8b4fa8a2b80331f60479edf0e3b","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","lint":"eslint .","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix","clean":"rimraf ./dist"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v18.12.1+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"18.12.1","dependencies":{"tslib":"^2.3.1","node-fetch":"^2.6.0","@types/node":"^16.11.55","@clerk/types":"^3.21.0-staging.0","query-string":"^7.0.1","snakecase-keys":"^5.4.4","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.4.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","typescript":"*"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.11.9-staging.0_1670410405188_0.4991068141173527","host":"s3://npm-registry-packages"}},"2.11.9":{"name":"@clerk/backend-core","version":"2.11.9","license":"MIT","_id":"@clerk/backend-core@2.11.9","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"f56758d9155fa7e779cb93831a7b9b148c0c5441","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.11.9.tgz","fileCount":351,"integrity":"sha512-CL/cRWaLef4tfJgNNyGGmrdXpLavAQG9TRIDWf5/HiAVDOGDBNd54V8qofup8n7pCs4NNLe2kDOXbFfP5AJS8Q==","signatures":[{"sig":"MEYCIQDZNEPVOGYXic7RJAiGkInAt5XaRa9kprr2AId8YeS5HQIhAMGLgbME5BoSHgMrOoKxwrzgKZhRUYoJ0sb6es86kP/m","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":587252,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjkb0UACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqJ9Q//TIBgBXVwY6n3eJ+/ZSvp9InrRm64dgC9pTEnjjTPe54N1bzG\r\nn/8XbtCZRncAKDYrp0JdeBS5uUgCtWuFbFSzvKorTABrfLoXTKFwLLFd3enK\r\nHdLjSU/lUYcGV5x61LwySAPB/BD6+mu2V+DV472tZcxL0qDGUiv6zs5u7uOy\r\nFBkcExVgQo+d1GJq/I4V1h/ODQVSJ+gyPl2dTGeXQeEJlzumpb1qcGraMaMg\r\nvVd0YhHu9WklEa+Ur1LwyGcvbi5CVDtnZMZPUKY8/JgGLVNc8j4XykBTlEB0\r\nPXigXxJlgGjsMFUYI8TbfTd5nw2gK2MSZpfbIscOgAiF6xjCWeb0CKzcSV7t\r\n01ufLQy9bD4K6xysUGZ6ERuV9pU0WTbv+pJCrs8J0xFjITL2OlP+UTKuE0nl\r\nlm85ZjkCs64+KABMf7s+LFBQiyeMamLCjOrQt4O80L4iEiGIVc10Fco0uFjy\r\nATLEP0lvVF72jMvovWg4oMDapbsfkr7xsFQgnWGASKobPPtMYx4ha+7jBUht\r\nVfAUXy+Nd42pMj2OtLdbspKNbFbbbvr/QaKPFTikzPMkFxsdrOuq5RTcs1D2\r\nc3VSh7QDQIxNxWnR9QBbKo+XSc1biNngKlumia1OY0zD2BHuCw1JGr1TXSs0\r\nvKHTx1q5NpmSfs9llnLL1UkFW7eIG2iCjTA=\r\n=ZMvT\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","engines":{"node":">=14"},"gitHead":"a1f942291c8cc0cacac398a6fe3808011a4cf02f","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","lint":"eslint .","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix","clean":"rimraf ./dist"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v18.12.1+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"18.12.1","dependencies":{"tslib":"^2.3.1","node-fetch":"^2.6.0","@types/node":"^16.11.55","@clerk/types":"^3.21.0","query-string":"^7.0.1","snakecase-keys":"^5.4.4","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.4.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","typescript":"*"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.11.9_1670495508191_0.294579879795261","host":"s3://npm-registry-packages"}},"2.11.10":{"name":"@clerk/backend-core","version":"2.11.10","license":"MIT","_id":"@clerk/backend-core@2.11.10","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"55238542615092155e2b0ab90f65a891c8a6a235","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.11.10.tgz","fileCount":351,"integrity":"sha512-bzNVY45fIEACsKCW5BrD49a4/QHHM5J6gOt048w8NnkXJVshibrHPepO84YUiVHMn5he6SCPOGACZ/1YAynwEw==","signatures":[{"sig":"MEUCICttsGYVQhZk4FtqKiLunpQpl4WXKNDAAvUKfFcQQhW8AiEAmznD7Z3ge4VcL/YhZPLGX/XDDSi/jvkxp1hnqMBdb2s=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":587447,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjkiIXACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoAEA//a6rLDCdfZmVUSRbvSRKf2bKuUSvoxAoIpZ7JSzH5NAotuzkv\r\nocsiODcdsMe07og8JJOiFjCC6LWZkz8sFzdYgzOGz9sN7Ovg5ILNr7jqzZqt\r\n/5Lt6lv3sNqh1Jhxoztxo0+THDWXERGIJwQVebOZRto3AJ27EOLUp+gIkmrB\r\njcMWmKu/xr9wvoSGqo0jMdhSMtUXV1aH5z//7W0tZ+QShlevy8GmyG7PhRHG\r\n7tgaJ0OLnCYFTiJy8KzSTyBQOarTNhn3ti/DR37VHErxMlH8SzIZpeyTtRwG\r\nzbn2dr5Llne1udC4rChgLXuusc1VEIXlh0EJuxguaJmCuFeKoQ60wCiQbRH+\r\nnh4K7kL8Mixb0nfOEDJgRS06WlrSxr8kVeoqJFAgDciEKp80hnEBXBcFxOd7\r\nmsvwZI/ebAVrsUrvePM7uunb1CqAYm+LIeHxOGqxU8gPJ2NPjgq3jHZM5q3f\r\n9zEd1j8t2PUDVxbdpf55q1PkhukMfh4gAIBAMmFt3I2lNM0Kvk5oRFEuX44S\r\n0aRgRHg3ooHfbK8zQuQ34PlttJ9i8ojSws4tLLrOWQ35IZocEN99IgnW0v0S\r\nrKQIvIqfpRQsYmmEaLIOOnljf31hJ9FXuf59ozzr/yhU7Fm4leeJiq3fET65\r\nlJHsh2Tc8mGZYgiGNPS6ftQsbkJvGRDkfzU=\r\n=xYuZ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","engines":{"node":">=14"},"gitHead":"3e147040cb246c76678ba2a9246f3fed08517e3b","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","lint":"eslint .","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix","clean":"rimraf ./dist"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v18.12.1+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"18.12.1","dependencies":{"tslib":"^2.3.1","node-fetch":"^2.6.0","@types/node":"^16.11.55","@clerk/types":"^3.21.1","query-string":"^7.0.1","snakecase-keys":"^5.4.4","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.4.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","typescript":"*"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.11.10_1670521367427_0.11026650664594917","host":"s3://npm-registry-packages"}},"2.11.11-staging.0":{"name":"@clerk/backend-core","version":"2.11.11-staging.0","license":"MIT","_id":"@clerk/backend-core@2.11.11-staging.0","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"e8a94221eea353c06eb3c3f3f78692923a66dadd","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.11.11-staging.0.tgz","fileCount":351,"integrity":"sha512-ZXUNQMVyjir7VKCaGcUs9HdR0JZozvwyOyUy3K0W9Wewg0yHCsIGrTXBrAJrj5FIV2lBUKSLO8ZJ01jczHIxNA==","signatures":[{"sig":"MEUCIQCjUWUvLFPLUjYQQFKHEgBmRI5WzQ90dv+t0OsqQswi+QIgNrVtZdQjMf8u8LmQGX251axtf64H7QuXcYuzz90jFf0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":587467,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjkw64ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqkMxAAikUCyEtNtaGfW8z3ddmf0Oudp0D/a0G/tJEuDnLDNMywGF3f\r\nVSYRjPNks+R02ASwebzoY51j99GJWW58sP/i5Ce62Iiq4f+5K1e0MdFD9qLZ\r\nCErE1naqzwYnC/cg7Dxq0Hpj23FEH7jXRsuGqxP7uAJ12o/6F9H1Vm+dGPn/\r\nxrlB+37QpbanwEbIiTGcfpMkuwt3QmM0dntLWB4k93tG8hrULFIPIlP1HK5N\r\ncttf0a+dT49G1duSUfQErZe9P58oY7WYw+j2bOKB+nrjqdk6fjTTDVTfr1Xo\r\nAZFYk0+d+4yKL2k7QRkqRQtmnpnSv2F6vIpHdacY4MZdEn/+4fy+LNfmTvEq\r\nS/Vwp16CGwidp3DMxV+gvDW0GYGnWk8vynSPuEJTPFjUIbf3ml1lT8sxwQO6\r\n/fR7b5HNkm6CE/aqo46b51W5T1twuJ0MqpBNArMWpnVwQYkj1oAcITkJvszW\r\nwJ0Bup2Z71BQ12QCfHaa+bw3XvwqPgKl+4aOhiyhEXeTa+msdfEUFNvQj6PN\r\nWmoUThmylfmDZ7iEEcInB4pHHrK6O6MF+q03qNKT/F1GxFAm1V5dwkSkgBBA\r\n31S2DTmr1qvWLbJESO5eQRaLyms8sALpH+JDAjyT/CvpbYKvfgzG3GXTSHTn\r\nFXVKRu4IgNcoB7qNx4c29H+bGdtPWE38018=\r\n=6sBD\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev?utm_source=github&utm_medium=clerk_backend_core\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <picture>\n      <img src=\"https://images.clerk.dev/static/logo-light-mode-400x400.png\" height=\"64\">\n    </picture>\n  </a>\n  <br />\n</p>\n\n# @clerk/backend-core\n\n<div align=\"center\">\n\n[![Chat on Discord](https://img.shields.io/discord/856971667393609759.svg?logo=discord)](https://discord.com/invite/b5rXHjAg7A)\n[![Clerk documentation](https://img.shields.io/badge/documentation-clerk-green.svg)](https://clerk.dev/docs?utm_source=github&utm_medium=clerk_backend_core)\n[![Follow on Twitter](https://img.shields.io/twitter/follow/ClerkDev?style=social)](https://twitter.com/intent/follow?screen_name=ClerkDev)\n\n[Changelog](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/CHANGELOG.md)\n·\n[Report a Bug](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=bug&template=bug_report.md&title=Bug%3A+)\n·\n[Request a Feature](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=Feature%3A+)\n·\n[Ask a Question](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n\n</div>\n\n---\n\n## Overview\n\nThis package provides Clerk Backend API core resources and low-level authentication utilities for JavaScript environments. It is mostly used as the base for other Clerk SDKs.\n\n## Getting Started\n\n### Installation\n\n```sh\nnpm install @clerk/backend-core\n```\n\n### Build\n\nTo build the package locally with the TypeScript compiler, run:\n\n```sh\nnpm run build\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities, without being platform/environment, specific such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendApi](./src/api/ClerkBackendApi.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendApi` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n## Usage\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendApi](./src/api/ClerkBackendApi.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://reference.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendApi.ts#17) implementation.\n\n## Support\n\nYou can get in touch with us in any of the following ways:\n\n- Join our official community [Discord server](https://discord.com/invite/b5rXHjAg7A)\n- Open a [GitHub support issue](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n- Contact options listed on [our Support page](https://clerk.dev/support?utm_source=github&utm_medium=clerk_backend_core)\n\n## Contributing\n\nWe're open to all community contributions! If you'd like to contribute in any way, please read [our contribution guidelines](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/CONTRIBUTING.md).\n\n## Security\n\n`@clerk/backend-core` follows good practices of security, but 100% security cannot be assured.\n\n`@clerk/backend-core` is provided **\"as is\"** without any **warranty**. Use at your own risk.\n\n_For more information and to report security issues, please refer to our [security documentation](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/SECURITY.md)._\n\n## License\n\nThis project is licensed under the **MIT license**.\n\nSee [LICENSE](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/LICENSE) for more information.\n","engines":{"node":">=14"},"gitHead":"affc9650aedc64304dfd6bfccb90b812b1d0d081","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","lint":"eslint .","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix","clean":"rimraf ./dist"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v18.12.1+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"18.12.1","dependencies":{"tslib":"^2.3.1","node-fetch":"^2.6.0","@types/node":"^16.11.55","@clerk/types":"^3.22.0-staging.0","query-string":"^7.0.1","snakecase-keys":"^5.4.4","@types/node-fetch":"^2","@peculiar/webcrypto":"^1.4.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","typescript":"*"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.11.11-staging.0_1670581944441_0.36321158038653634","host":"s3://npm-registry-packages"}},"2.11.11-staging.1":{"name":"@clerk/backend-core","version":"2.11.11-staging.1","license":"MIT","_id":"@clerk/backend-core@2.11.11-staging.1","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"eb80858412a4bdf1ad31112e95e877fe66a95f19","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.11.11-staging.1.tgz","fileCount":351,"integrity":"sha512-CGBFBkcNvSeUbj9wWxjfIXymb3poWZAMgzslWtIhz68mwCM5Iad/xawm9svE2kqFJL2CGb6uszrNBjdTXR7sVA==","signatures":[{"sig":"MEQCICdzIak/NYxbQS5Rw1d3LdwtnFlvViybWs/sRg24rjxQAiA8a8q/7Jk3DF3FZ6R4oXJRhcEkzfHRJ6q+gjAe344cRA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":587463,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjkxRbACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpFfw/6A+Mm2OGMOpl8E+oHXC5HIljP6FvR4bMJipQZTWYPA8WJ1YA0\r\newAlK+dNdrhauCvsRP54IT264Vzzcq+q+tW6On6mzEYs0DJRC08ox8FdMQTB\r\nY2CB/ao5LUvs1T0NDbWxvRY+k9j5/XvTZXCTEBsY3Jmkthfy3zkLhqlmhSFl\r\n4q381t3eftrUacK8ccw8zK+Ssod46Ce2TwjwdeoHoFEw2aFGhZUyaq5TOnc2\r\nz3DeiUm0VjReOXfHZhyPKinDInTtHj1cLG55S86rzhKkG0E1iyiHYQHR/bcv\r\n4I81MG0V+R2bOIQUQWc3ityjsLrhhzWsJKaFo2RadzWzEfP0ZZ8ex6UOLlbA\r\nDJfhLRw9N6is4Ufo5D8dlHwjioUZ0LIbsefAe38FZ4NtzwUsY8pcipOlhkXR\r\nvWih5gUBtRTeXa967Yz+jriFlsI387MCEfCOUj8oeclaHEDL2LpNfhFQyjCD\r\n2GddndQxgYc4jkFOytiy6leJaAJnH39a53RKRbU3tyCmxY2+kYjN56XSm4Q+\r\nNjtu1TpqCAC4eg3ha4ne8yB04vsvf35MPUpBBwsWjv5PvP3vhyIL4uPQ28rY\r\nhmP6AvIrWIWcHhYdLwpstDFIap7qQYXDBGo/MUEE7DrboVcvJ+GazhTi7Ava\r\nChtMr+EhDcDnxXDcOb0c994W0Z4P61Qy2Yc=\r\n=ZeMc\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev?utm_source=github&utm_medium=clerk_backend_core\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <picture>\n      <img src=\"https://images.clerk.dev/static/logo-light-mode-400x400.png\" height=\"64\">\n    </picture>\n  </a>\n  <br />\n</p>\n\n# @clerk/backend-core\n\n<div align=\"center\">\n\n[![Chat on Discord](https://img.shields.io/discord/856971667393609759.svg?logo=discord)](https://discord.com/invite/b5rXHjAg7A)\n[![Clerk documentation](https://img.shields.io/badge/documentation-clerk-green.svg)](https://clerk.dev/docs?utm_source=github&utm_medium=clerk_backend_core)\n[![Follow on Twitter](https://img.shields.io/twitter/follow/ClerkDev?style=social)](https://twitter.com/intent/follow?screen_name=ClerkDev)\n\n[Changelog](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/CHANGELOG.md)\n·\n[Report a Bug](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=bug&template=bug_report.md&title=Bug%3A+)\n·\n[Request a Feature](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=Feature%3A+)\n·\n[Ask a Question](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n\n</div>\n\n---\n\n## Overview\n\nThis package provides Clerk Backend API core resources and low-level authentication utilities for JavaScript environments. It is mostly used as the base for other Clerk SDKs.\n\n## Getting Started\n\n### Installation\n\n```sh\nnpm install @clerk/backend-core\n```\n\n### Build\n\nTo build the package locally with the TypeScript compiler, run:\n\n```sh\nnpm run build\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities, without being platform/environment, specific such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendApi](./src/api/ClerkBackendApi.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendApi` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n## Usage\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendApi](./src/api/ClerkBackendApi.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://reference.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendApi.ts#17) implementation.\n\n## Support\n\nYou can get in touch with us in any of the following ways:\n\n- Join our official community [Discord server](https://discord.com/invite/b5rXHjAg7A)\n- Open a [GitHub support issue](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n- Contact options listed on [our Support page](https://clerk.dev/support?utm_source=github&utm_medium=clerk_backend_core)\n\n## Contributing\n\nWe're open to all community contributions! If you'd like to contribute in any way, please read [our contribution guidelines](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/CONTRIBUTING.md).\n\n## Security\n\n`@clerk/backend-core` follows good practices of security, but 100% security cannot be assured.\n\n`@clerk/backend-core` is provided **\"as is\"** without any **warranty**. Use at your own risk.\n\n_For more information and to report security issues, please refer to our [security documentation](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/SECURITY.md)._\n\n## License\n\nThis project is licensed under the **MIT license**.\n\nSee [LICENSE](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/LICENSE) for more information.\n","engines":{"node":">=14"},"gitHead":"cadb0c29f4647cc41d196802f06c986d0822eb38","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","lint":"eslint .","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix","clean":"rimraf ./dist"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v18.12.1+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"18.12.1","dependencies":{"tslib":"2.4.1","node-fetch":"2.6.7","@types/node":"16.18.6","@clerk/types":"^3.22.0-staging.1","query-string":"7.1.3","snakecase-keys":"5.4.4","@types/node-fetch":"2.6.2","@peculiar/webcrypto":"1.4.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","typescript":"*"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.11.11-staging.1_1670583387632_0.1485610753250466","host":"s3://npm-registry-packages"}},"2.11.11":{"name":"@clerk/backend-core","version":"2.11.11","license":"MIT","_id":"@clerk/backend-core@2.11.11","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"fd2a4197d020a4be4904a5982b62d5d6d3ce6d90","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.11.11.tgz","fileCount":351,"integrity":"sha512-c81lJfc9N6KxogFJc9Vi6D1DMOszdFDfUU4Vs/w2i48ePSGUIuNQOoqjAo8Q4gth3UixRKkWVe/WKhkQdPwhTA==","signatures":[{"sig":"MEUCIQCrKPAqT8HZREFF0na8nnSKVDPLBmZTTgMk+VgGlcVEHQIgIf8ldFEttUzAttj1tyZNOe51YXu33S9AmsAF7CMF9Qo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":586720,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjlw0gACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqzSA//Ve7o0HcJ8pjJyuUIZpdB6+sPBKetqb4eftlOr8Jxs422srN7\r\nbCMS8sqfXJWRQOMxu3NyfcSF8G1kvCUjHG9Y87qW9iwoLZMZCWg5datl9vxf\r\ny7W2P+guJS2vE8132bpYOdrjQT226+xwSplaWNCej2ZzZXDelhJl6kF7oiXY\r\nJh2DJYSxjp9LZOmDhNKOvI3R+vbHov6nHPahLvqF948Vg3//JR/oUzkx6x9I\r\nLPw4S1qVvEacQyR+Dqe6BFZqaoHfp6sURacmKQtP5WPOIuXRVaaLQRJvcVhI\r\ncuquNPKYlYK85+2/D+TTEGAd6qvoe6hRRhiaHPERNfXuDU2+/fd5+DzP7UNg\r\nQKNt9EYEhI0jbdGmiJLMgaE1siROczer6INnpVx0w4Dp0W9XKpnr8ECRvIeZ\r\nwYvxlriLUZyJJHct9/8CnPQMurEPslECL0UuB++zUGjJrvGjGg6mKmDZDr3A\r\nLyHLQwSJterbufD3f8R+9vaOBIKp80fXrLR1IsVDjkHCSH0MDFm5yvGtCQH3\r\n70TJksJvT13UbMHNn5InRH0QfuSodHKKhUR1dndognsQaY2cKCmRMFbQOTze\r\nqNE44qnN82BFEFlS6OpVjKcQspAuJUxrbkbzAdddlcVl3L79BJNAooZk5Lc9\r\nBsSWi5kSHI5LMyHlC8zSFGQsPySMIKdmu2I=\r\n=4q06\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev?utm_source=github&utm_medium=clerk_backend_core\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <picture>\n      <img src=\"https://images.clerk.dev/static/logo-light-mode-400x400.png\" height=\"64\">\n    </picture>\n  </a>\n  <br />\n</p>\n\n# @clerk/backend-core\n\n<div align=\"center\">\n\n[![Chat on Discord](https://img.shields.io/discord/856971667393609759.svg?logo=discord)](https://discord.com/invite/b5rXHjAg7A)\n[![Clerk documentation](https://img.shields.io/badge/documentation-clerk-green.svg)](https://clerk.dev/docs?utm_source=github&utm_medium=clerk_backend_core)\n[![Follow on Twitter](https://img.shields.io/twitter/follow/ClerkDev?style=social)](https://twitter.com/intent/follow?screen_name=ClerkDev)\n\n[Changelog](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/CHANGELOG.md)\n·\n[Report a Bug](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=bug&template=bug_report.md&title=Bug%3A+)\n·\n[Request a Feature](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=Feature%3A+)\n·\n[Ask a Question](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n\n</div>\n\n---\n\n## Overview\n\nThis package provides Clerk Backend API core resources and low-level authentication utilities for JavaScript environments. It is mostly used as the base for other Clerk SDKs.\n\n## Getting Started\n\n### Installation\n\n```sh\nnpm install @clerk/backend-core\n```\n\n### Build\n\nTo build the package locally with the TypeScript compiler, run:\n\n```sh\nnpm run build\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities, without being platform/environment, specific such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendApi](./src/api/ClerkBackendApi.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendApi` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n## Usage\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendApi](./src/api/ClerkBackendApi.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://reference.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendApi.ts#17) implementation.\n\n## Support\n\nYou can get in touch with us in any of the following ways:\n\n- Join our official community [Discord server](https://discord.com/invite/b5rXHjAg7A)\n- Open a [GitHub support issue](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n- Contact options listed on [our Support page](https://clerk.dev/support?utm_source=github&utm_medium=clerk_backend_core)\n\n## Contributing\n\nWe're open to all community contributions! If you'd like to contribute in any way, please read [our contribution guidelines](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/CONTRIBUTING.md).\n\n## Security\n\n`@clerk/backend-core` follows good practices of security, but 100% security cannot be assured.\n\n`@clerk/backend-core` is provided **\"as is\"** without any **warranty**. Use at your own risk.\n\n_For more information and to report security issues, please refer to our [security documentation](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/SECURITY.md)._\n\n## License\n\nThis project is licensed under the **MIT license**.\n\nSee [LICENSE](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/LICENSE) for more information.\n","engines":{"node":">=14"},"gitHead":"71419681190c0e0340322832bb6c01a1779074e5","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","lint":"eslint .","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix","clean":"rimraf ./dist"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v18.12.1+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"18.12.1","dependencies":{"tslib":"2.4.1","node-fetch":"2.6.7","@types/node":"16.18.6","@clerk/types":"^3.22.0","query-string":"7.1.3","snakecase-keys":"5.4.4","@types/node-fetch":"2.6.2","@peculiar/webcrypto":"1.4.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","typescript":"*"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.11.11_1670843679818_0.9709697888755384","host":"s3://npm-registry-packages"}},"2.11.12":{"name":"@clerk/backend-core","version":"2.11.12","license":"MIT","_id":"@clerk/backend-core@2.11.12","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"0ac50b14e87252100c2d6775c1efc481a9581d0a","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.11.12.tgz","fileCount":351,"integrity":"sha512-Z6UNjs7bWLMGpgK+MqVJfQXGSIfTqYXCuc6mkCEOznN1PCH+HXqXmt6kM47JwJnT84m/Gvy2Z23o7EahIcIvAQ==","signatures":[{"sig":"MEUCIQDztsf+TXGEHQH8altM6xuiL2CdzaS5VSPik1o4lT0BIAIgNkYDPkMhzz+WvftzAG1M6XVwnC0AFHuOGBCn7ig5qbg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":586915,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjlxlvACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr4/RAAhwuWudgnd9pHP2mQPln4lai/qJ0DsaLHDEvid97SRKyBcDdp\r\noF4YEpMvYJDeJ59V7pUP0bndCWo8Crd8nyY2ly5l8VodC3kL1NUHK07p3kbi\r\n5iq1BsZaQftIHIYOUa1CWp8IanXaUbqAohdqQ1WSXA9r2caGQ83D1VzeNJ4r\r\nnReu0pQtpbMV9Lo+SQ76CxtsVyOexWUyeppF0VXyszbGgoxZoSiIlJd/IuxI\r\n5myMvBCO7tjDhQzM2gZPbfArieMGsrC+L/MI2vvrssHCf6MH1fkvFfOq5L29\r\n6rvf9vryrwU3zitDjk9c2NhQ51K1Zw/Sqo4M0YQsts2iVKlIF3HBmTSpiqhl\r\njNy6YCPy/vHk9HysxBLpLfiWx4MFpevYdq4FXrkOppdSdadN9i/RxAnEZZ2k\r\ncBXRPkm5ncUz13RfOVyVaiEOQXsy9//DVldcXug5pxwr0RBOKj9N17t7dLPV\r\n8VUcgKtqeugmpbiCSdudOmy25+IfhMOjAG9gJnbESlyQ5OBIqjp9g+85s5W4\r\nTMtxj9RPXAuUdYE8Br33LuljaG93LP+PAXMd++et00MNig2P4Jr84WiCx2SC\r\nisSm+Xu895/TD+2tbVPKKffZjPyQPKFl5GlzwGNsaww49p63JDEbx6hvWQNC\r\n5kpB67uMEW6ApzHUigqjWX/nVyOTjqJuLx0=\r\n=few1\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","engines":{"node":">=14"},"gitHead":"870e8934932e6b617814a9b8cc36dbe55cd79298","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","lint":"eslint .","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix","clean":"rimraf ./dist"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v18.12.1+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"18.12.1","dependencies":{"tslib":"2.4.1","node-fetch":"2.6.7","@types/node":"16.18.6","@clerk/types":"^3.22.1","query-string":"7.1.3","snakecase-keys":"5.4.4","@types/node-fetch":"2.6.2","@peculiar/webcrypto":"1.4.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","typescript":"*"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.11.12_1670846831593_0.803818634028632","host":"s3://npm-registry-packages"}},"2.11.13-staging.0":{"name":"@clerk/backend-core","version":"2.11.13-staging.0","license":"MIT","_id":"@clerk/backend-core@2.11.13-staging.0","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"16e2f3106642cbac9c64503bb4fdf7fcd2be6b76","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.11.13-staging.0.tgz","fileCount":351,"integrity":"sha512-MwA8Ra/BSoiG7evFDvLRBxYdzKJAquAvHVv9gZKAgj9FiALJIsqH52V5hRjDJid7vmt1c5zDDvh/AmNXh9JnjA==","signatures":[{"sig":"MEUCIQDQcgKppowrUAfhQDc/gPGSo7KhBINYJQTUy8SDQVvpOwIgKSye/oneFuaMg3Oy6Xvu3H6T+SqbcqMhBnHeqoofJa8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":586935,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjmE6oACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp3wg/9HaBvAuDqAhmSHSIwq1YiZuJmIj1bYM/UMgfYBMbmHBrgbpkU\r\n1yHw3qzFxOdBNkh2HGDseTcB4fIrNhv6GroMIQm8H1+I2lr2u05oeMjP2QK2\r\nDoOQUOJdx/9YesHzj9sCJ6O8d3z4jd4zHrYPzrIOulUSajba5aYrWEDy7F13\r\nWm1RYDgsm3XCZa+mbC7UIGNYhUstiTFCogCyezaiyl72OBbCbpZtJ7iENDju\r\nt378D82ysvKXOD25WvNK6fT7NKTKGFkrcXjOte23gLDNk3NS68qXwjaNJqKy\r\nh1o0rKidpba8g5M3y9WhhfDi8fpZ6Qh4rihUFN8UzzKPtISocr5ZxM/b2rMw\r\nQ75x1sGcpt8Bn3SQXQvgZsxzsCV2MdBefz5RbuB12xnI9/J3ZEKdEsyQNYeT\r\n/+gyo50qWa/yClsbBBKqHglOFBF9ZcZ7C5r+IycDlU+8sFMarKXGzALcPJ7W\r\ndZ7b0q/E3McB5KSl/aIWq+7sDi6+RzUoSTr0PY/E/if5lv3ywBDH8Un/afaJ\r\nnbgd1GucTejzabLBK2HHmOJF9f37K2uaN8Yg79Tba+yx3U87QHlW6N3DumeC\r\nGNYeQiEIU8Klgi2f3+iUW01410i5BpqVGcrSUu8Awx6Kge2LaI03HOsH6bKh\r\nJjl9NcG9PesqN39GBeq2vsxMCn2QU9kfL4A=\r\n=jPhw\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev?utm_source=github&utm_medium=clerk_backend_core\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <picture>\n      <img src=\"https://images.clerk.dev/static/logo-light-mode-400x400.png\" height=\"64\">\n    </picture>\n  </a>\n  <br />\n</p>\n\n# @clerk/backend-core\n\n<div align=\"center\">\n\n[![Chat on Discord](https://img.shields.io/discord/856971667393609759.svg?logo=discord)](https://discord.com/invite/b5rXHjAg7A)\n[![Clerk documentation](https://img.shields.io/badge/documentation-clerk-green.svg)](https://clerk.dev/docs?utm_source=github&utm_medium=clerk_backend_core)\n[![Follow on Twitter](https://img.shields.io/twitter/follow/ClerkDev?style=social)](https://twitter.com/intent/follow?screen_name=ClerkDev)\n\n[Changelog](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/CHANGELOG.md)\n·\n[Report a Bug](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=bug&template=bug_report.md&title=Bug%3A+)\n·\n[Request a Feature](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=Feature%3A+)\n·\n[Ask a Question](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n\n</div>\n\n---\n\n## Overview\n\nThis package provides Clerk Backend API core resources and low-level authentication utilities for JavaScript environments. It is mostly used as the base for other Clerk SDKs.\n\n## Getting Started\n\n### Installation\n\n```sh\nnpm install @clerk/backend-core\n```\n\n### Build\n\nTo build the package locally with the TypeScript compiler, run:\n\n```sh\nnpm run build\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities, without being platform/environment, specific such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendApi](./src/api/ClerkBackendApi.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendApi` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n## Usage\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendApi](./src/api/ClerkBackendApi.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://reference.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendApi.ts#17) implementation.\n\n## Support\n\nYou can get in touch with us in any of the following ways:\n\n- Join our official community [Discord server](https://discord.com/invite/b5rXHjAg7A)\n- Open a [GitHub support issue](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n- Contact options listed on [our Support page](https://clerk.dev/support?utm_source=github&utm_medium=clerk_backend_core)\n\n## Contributing\n\nWe're open to all community contributions! If you'd like to contribute in any way, please read [our contribution guidelines](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/CONTRIBUTING.md).\n\n## Security\n\n`@clerk/backend-core` follows good practices of security, but 100% security cannot be assured.\n\n`@clerk/backend-core` is provided **\"as is\"** without any **warranty**. Use at your own risk.\n\n_For more information and to report security issues, please refer to our [security documentation](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/SECURITY.md)._\n\n## License\n\nThis project is licensed under the **MIT license**.\n\nSee [LICENSE](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/LICENSE) for more information.\n","engines":{"node":">=14"},"gitHead":"4e09dad622cdd4605fe610d5104719b1c7051f5f","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","lint":"eslint .","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix","clean":"rimraf ./dist"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v18.12.1+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"18.12.1","dependencies":{"tslib":"2.4.1","node-fetch":"2.6.7","@types/node":"16.18.6","@clerk/types":"^3.22.2-staging.0","query-string":"7.1.3","snakecase-keys":"5.4.4","@types/node-fetch":"2.6.2","@peculiar/webcrypto":"1.4.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","typescript":"*"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.11.13-staging.0_1670925992148_0.867207294282001","host":"s3://npm-registry-packages"}},"2.12.0-staging.0":{"name":"@clerk/backend-core","version":"2.12.0-staging.0","license":"MIT","_id":"@clerk/backend-core@2.12.0-staging.0","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"0a116a11418ff0c1797ab97259aedb01cf9bcc94","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.12.0-staging.0.tgz","fileCount":351,"integrity":"sha512-vvBAnoMZ6LLqpDtlghlY1BNU+8+lsgv0wsG3O44R8pccJ+td0gjSgEZUB7s4dklQ6zOKSclPElakUNQp3ZHqkQ==","signatures":[{"sig":"MEUCIQDdx3MZO1tlbCbZzULqGEHKHWeMp7bMwGFm4TqlMf0ZeQIgCsRifgspwRKdsFuaPpa1RToy5wxgmtS+MFUm78vpmKI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":586967,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjmH3UACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoWhxAAjtKgRH/ROFm/GVmURHEiICv30ah70PZ36E8pUxw7EoYabPhd\r\nP5Pw6EESUJX0RLF+RZgqZ2nomkrjEY+jboJjn+FNgufynGsMv6EQqjh1J76M\r\nHLOIoMpcsDDbBDwhlc6iAASd34gyNGZmigzDTqrrKZGUjPucS+0MtOz7ZQXH\r\nIjUKvjspjJrSR2SOBGEbWMyhD6eiWK5U2MiLRw0lQlbuvveBuItPvOx9D8mj\r\noSK9I1I8VmZCINUrvMbnGacDv1EheQUAXBwMEkBATVpbgrB6yY87WKH6Bgl5\r\nVw8R1GiZkRR+s07Y8DMGILIAeCjeufZ2mbYDgGhQdYdW8xPB9mZ58WzEOzZI\r\nkXQUEwir+guK3kVljXsqXq7FMPKFH6VTRZZkISEAmH0iA376j6dzebIAMY/O\r\nn7fY51iQP3Kfc0zm78LYjAzFwuxrHPP+fdPnInJMdhp7obXorNVSwOi98WPa\r\nR8kQwOUMnjAVtA7nmrisO6jUto0sPLzBG5By2KHM9nRipP/ZgohIk0iOWkpr\r\nSzPYQwJFyAHZMbFAK4VFlaNf1U3fAkhZARwkuCiePzeGOaeVCn114IoLFHqN\r\nGi9EGTj5bW+x4HkzgSBWD39rXJjHhvXy06aLH6BUej6xqATUyxsonkLXkouH\r\n8tuCcj4z4yYiye60JMB8GbRTFKG+RKt32/Y=\r\n=Zmp1\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev?utm_source=github&utm_medium=clerk_backend_core\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <picture>\n      <img src=\"https://images.clerk.dev/static/logo-light-mode-400x400.png\" height=\"64\">\n    </picture>\n  </a>\n  <br />\n</p>\n\n# @clerk/backend-core\n\n<div align=\"center\">\n\n[![Chat on Discord](https://img.shields.io/discord/856971667393609759.svg?logo=discord)](https://discord.com/invite/b5rXHjAg7A)\n[![Clerk documentation](https://img.shields.io/badge/documentation-clerk-green.svg)](https://clerk.dev/docs?utm_source=github&utm_medium=clerk_backend_core)\n[![Follow on Twitter](https://img.shields.io/twitter/follow/ClerkDev?style=social)](https://twitter.com/intent/follow?screen_name=ClerkDev)\n\n[Changelog](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/CHANGELOG.md)\n·\n[Report a Bug](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=bug&template=bug_report.md&title=Bug%3A+)\n·\n[Request a Feature](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=Feature%3A+)\n·\n[Ask a Question](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n\n</div>\n\n---\n\n## Overview\n\nThis package provides Clerk Backend API core resources and low-level authentication utilities for JavaScript environments. It is mostly used as the base for other Clerk SDKs.\n\n## Getting Started\n\n### Installation\n\n```sh\nnpm install @clerk/backend-core\n```\n\n### Build\n\nTo build the package locally with the TypeScript compiler, run:\n\n```sh\nnpm run build\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities, without being platform/environment, specific such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendApi](./src/api/ClerkBackendApi.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendApi` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n## Usage\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendApi](./src/api/ClerkBackendApi.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://reference.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendApi.ts#17) implementation.\n\n## Support\n\nYou can get in touch with us in any of the following ways:\n\n- Join our official community [Discord server](https://discord.com/invite/b5rXHjAg7A)\n- Open a [GitHub support issue](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n- Contact options listed on [our Support page](https://clerk.dev/support?utm_source=github&utm_medium=clerk_backend_core)\n\n## Contributing\n\nWe're open to all community contributions! If you'd like to contribute in any way, please read [our contribution guidelines](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/CONTRIBUTING.md).\n\n## Security\n\n`@clerk/backend-core` follows good practices of security, but 100% security cannot be assured.\n\n`@clerk/backend-core` is provided **\"as is\"** without any **warranty**. Use at your own risk.\n\n_For more information and to report security issues, please refer to our [security documentation](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/SECURITY.md)._\n\n## License\n\nThis project is licensed under the **MIT license**.\n\nSee [LICENSE](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/LICENSE) for more information.\n","engines":{"node":">=14"},"gitHead":"7545c512f849ebb569828b88da3de8b02a8d782d","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","lint":"eslint .","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix","clean":"rimraf ./dist"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.18.1+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.18.1","dependencies":{"tslib":"2.4.1","node-fetch":"2.6.7","@types/node":"16.18.6","@clerk/types":"^3.22.2-staging.0","query-string":"7.1.3","snakecase-keys":"5.4.4","@types/node-fetch":"2.6.2","@peculiar/webcrypto":"1.4.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","typescript":"*"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.12.0-staging.0_1670938068655_0.8654975520932773","host":"s3://npm-registry-packages"}},"2.12.0":{"name":"@clerk/backend-core","version":"2.12.0","license":"MIT","_id":"@clerk/backend-core@2.12.0","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"62ef31af39e6a34cc3c05b3fed476c6a0c0b3475","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.12.0.tgz","fileCount":351,"integrity":"sha512-Xzxfqj1wiVxgUliZHXWKJjupG5NGrbQyRNlWqKRCPmz3N3P/QS3f1p8+0f4H3nVdJkCso8p+t/j4r6vxuKZ3Og==","signatures":[{"sig":"MEYCIQD6QcmG9Kk9Ock8DUZMGzPK3ovYzy8+8YmWogmANlFnqQIhAJMYxW3y1QuMYFffpq5iMzVOgSMD/5XVHIzk1grCeC0K","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":587214,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjmM6TACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqRog/9FSg6Psjy70XYkUf/cHm7uqJmiVCvbU7ag4W7FLJniZM0vlK5\r\nMGBbHOuQV33RE1OPQl48QfAlXnRsdl/JALo9+j2rpYYxo2dyFCPyuymDMHLw\r\nUdrYJEaP10PWby/06Oz3pShMJlyaKueSkLe9QV+gJZ/jg2wo70m1R7OtNBVD\r\nnb8X7EVv1QOVN0tSFFdFZhzNPLxmhDjO9sgDg5NiW8QJ8YhQ61uo4Q/XNamN\r\nWacBvDMAGY82jHh/b8kfR9NW9gMxEK3j3iAp6UbPPvtDYRvICFZ7XYa3U+vi\r\n1MBmwOXg128gpdo5n//pwE2IOoiC30/qhZAucBIr3hs+fvXe1hxPWtDo+kMN\r\nIAC5p0Sn0xTblOYiKG47hiWHz1nK9KKmPb8hx1xcoprDEiePoC4hudRqqb0r\r\niZyFbllRQVEH1yWj+jw9Fj6vJmcDlYaqPIIziLB3/TRB3ZyB/aeR9fHGCTQN\r\naAy9vqUyntIKzL/MWFt6CNfJBQEqYgpB13ml132YQECfUxHKLOFwyW/X9iKf\r\nszSH9x3SQENypnv8MKyE7N/0ytHzU2DOgFkSnEAFEiA6tTaGnsgb/gS2wpWv\r\nT6x/7RShbNTCoKSf9qMhD2UUFq7nWxmeBlWTiBmVLInou5AbiK9GkZHMfDuy\r\n11UJfjOdMN4r75T5FwQxLiHOEed9csohbRc=\r\n=mGMJ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","engines":{"node":">=14"},"gitHead":"0c04b47f073fd04248b91dcffe0d78f2e487d09c","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","lint":"eslint .","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix","clean":"rimraf ./dist"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.18.1+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.18.1","dependencies":{"tslib":"2.4.1","node-fetch":"2.6.7","@types/node":"16.18.6","@clerk/types":"^3.22.2","query-string":"7.1.3","snakecase-keys":"5.4.4","@types/node-fetch":"2.6.2","@peculiar/webcrypto":"1.4.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","typescript":"*"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.12.0_1670958738743_0.3209377894981973","host":"s3://npm-registry-packages"}},"2.12.1-staging.0":{"name":"@clerk/backend-core","version":"2.12.1-staging.0","license":"MIT","_id":"@clerk/backend-core@2.12.1-staging.0","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"e5947fe053ea2373dcefe6ff6eb52798c3492063","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.12.1-staging.0.tgz","fileCount":351,"integrity":"sha512-6MkdyJ0rTDKgyKBw7AW4COw885LXaq/B9XQB9t16HUqkC84n7Pqp/092txw3zsqZTRcep33pDnNYSP6oi9I4/Q==","signatures":[{"sig":"MEUCIQDsvchE3iaxlzhIsHspmaJu5Nu0IOYHElXy2lZiROPIWAIgM7phiscpYNH7tIgX6fJs484dXF7E0oA54SFuyj28NSw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":587234,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjn7DiACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqVZRAAmpGX/SckVlmMee0VDgEX3zwgDT6yYyTzQ1IyPGOqcQiVi2MF\r\n6KKFMIJNXsucYB7dK196WtgMvPnhQ2E5jo19umoCJC2LLFpkGG4uJ7ZEul0G\r\nBfl+AZihvWCaDfG+5c9E/xZ4DcQ/kq1ygvoG3BKUe+ErVK5mqIZV2XnhmzvI\r\nt321TCXtGKBaRACq4Y2vV5A6V0mZ56ZXMhPQW6JNVeT77ARv+CerSXXXfcYu\r\nPLzKSn9s+LQaT5zYRvYgBgdILB/msrSBm8OlJVtcanvUdcVusWiDjsJWQZQL\r\nheKTCYLO4DlnwWaQbD4TBdJxH+HCwGfyvsUT8NAfF8BsXXv69OOjSGu0E5Iy\r\n3UDRsMcyIJibm16NRVBtw566nU4mCgO6TGyw36TsUb21RS6Wz02F57zmlaA9\r\n3F4689BzktXLLhoBIOkRqPWaBIsjP+8DMk56nevKniyZoH0UQMHfOufDhbOZ\r\n/qjHaE0GRV4BfeYxEPfiJAE0v08zeKGPsc20HzsElU12eM2F27yiA6M8G7SH\r\nXsRM0FSIQtMjlPZ4piyGvRAUSBNOGHKxiUAt2nbDCnos/dJys/7qMuK2EzmI\r\nhsQa7/M72JzhwfkErMK8BFD5pN85ihbpW47Idc/RnqCupfLsJYDOfMkpUPvc\r\nqm4NqNqIB7mZYXcESTjHr10FzTTLWNfL9zQ=\r\n=ryTI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev?utm_source=github&utm_medium=clerk_backend_core\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <picture>\n      <img src=\"https://images.clerk.dev/static/logo-light-mode-400x400.png\" height=\"64\">\n    </picture>\n  </a>\n  <br />\n</p>\n\n# @clerk/backend-core\n\n<div align=\"center\">\n\n[![Chat on Discord](https://img.shields.io/discord/856971667393609759.svg?logo=discord)](https://discord.com/invite/b5rXHjAg7A)\n[![Clerk documentation](https://img.shields.io/badge/documentation-clerk-green.svg)](https://clerk.dev/docs?utm_source=github&utm_medium=clerk_backend_core)\n[![Follow on Twitter](https://img.shields.io/twitter/follow/ClerkDev?style=social)](https://twitter.com/intent/follow?screen_name=ClerkDev)\n\n[Changelog](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/CHANGELOG.md)\n·\n[Report a Bug](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=bug&template=bug_report.md&title=Bug%3A+)\n·\n[Request a Feature](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=Feature%3A+)\n·\n[Ask a Question](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n\n</div>\n\n---\n\n## Overview\n\nThis package provides Clerk Backend API core resources and low-level authentication utilities for JavaScript environments. It is mostly used as the base for other Clerk SDKs.\n\n## Getting Started\n\n### Installation\n\n```sh\nnpm install @clerk/backend-core\n```\n\n### Build\n\nTo build the package locally with the TypeScript compiler, run:\n\n```sh\nnpm run build\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities, without being platform/environment, specific such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendApi](./src/api/ClerkBackendApi.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendApi` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n## Usage\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendApi](./src/api/ClerkBackendApi.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://reference.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendApi.ts#17) implementation.\n\n## Support\n\nYou can get in touch with us in any of the following ways:\n\n- Join our official community [Discord server](https://discord.com/invite/b5rXHjAg7A)\n- Open a [GitHub support issue](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n- Contact options listed on [our Support page](https://clerk.dev/support?utm_source=github&utm_medium=clerk_backend_core)\n\n## Contributing\n\nWe're open to all community contributions! If you'd like to contribute in any way, please read [our contribution guidelines](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/CONTRIBUTING.md).\n\n## Security\n\n`@clerk/backend-core` follows good practices of security, but 100% security cannot be assured.\n\n`@clerk/backend-core` is provided **\"as is\"** without any **warranty**. Use at your own risk.\n\n_For more information and to report security issues, please refer to our [security documentation](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/SECURITY.md)._\n\n## License\n\nThis project is licensed under the **MIT license**.\n\nSee [LICENSE](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/LICENSE) for more information.\n","engines":{"node":">=14"},"gitHead":"2aa8fc17f2b1048393b51084057de68b10e898c5","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","lint":"eslint .","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix","clean":"rimraf ./dist"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.18.1+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.18.1","dependencies":{"tslib":"2.4.1","node-fetch":"2.6.7","@types/node":"16.18.6","@clerk/types":"^3.23.0-staging.0","query-string":"7.1.3","snakecase-keys":"5.4.4","@types/node-fetch":"2.6.2","@peculiar/webcrypto":"1.4.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","typescript":"*"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.12.1-staging.0_1671409889915_0.9604468768813648","host":"s3://npm-registry-packages"}},"2.12.1-staging.1":{"name":"@clerk/backend-core","version":"2.12.1-staging.1","license":"MIT","_id":"@clerk/backend-core@2.12.1-staging.1","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"6854f660ea13938a884ea759ed13dd3da439c719","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.12.1-staging.1.tgz","fileCount":351,"integrity":"sha512-WslHGU7M+r+tVPyNcemQ8k5g2e4oXwph0OzpMjgk+GOLQYUe0/JTL9IpBrTbscU3Q93xqZZg9lnLcXDRU81CHA==","signatures":[{"sig":"MEQCIA+RuvDqEBfPBBFeZekUVC0+WfEs5oZ+DGgAHaQKz3vcAiB2ZjCm9T1CvROoj/Jk/a4M7AeWWfwDndGJUzeTprIdkw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":587234,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjoGU4ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmroNA/9Fq9XJFnefA9PjAQmrTqGwCPbrxwBbJZhpLC4GcJZOLDPoiip\r\nLmEGNg+927/Fld7qG7zToinz7vsS4a3UkhASIXmM1vmmkNJzSO3yPKfxFBX9\r\ni/Y/anGA1pe8NNF3ljNEAFXYqcbG5QHL+JDtjHl4997wyFnln08S/ZLwNDQO\r\n8BYt4Zsqu2rEox+YKbi86g+Z3ZE3CzaWEfV07eA/brbkbTxiMONKDJGBIBIz\r\nkYpP5Pb2N9U7Tc1yzPH4VCRcqM7HZHl4GYlWa+55mtnMabMqsT8+3X4QSvZO\r\nwYNYgWDCsJP+eZVKDfgISoIGoTYg5BgjeBW24xSxYxB4ykEg/zzasS+pakgG\r\nN7diK/k1xsecTQyrHxDlXQfLheF6X7vHQqWYADQbP7zGG9nPXPtqsIjVJqu9\r\nD8im1pAHMF9yg08KuopV6mErm0XvVXxonhdEaX1TMnIv+428uf1R+m1njTy6\r\nu7PjA/0RyoSCv1UkTUuvgynntQEuljJboV08Mevalh1dj8+isktwkl37z8nh\r\nhP8sWalEgxJTtdu7xCDfkJkW2I1kSDUmV4tUGr+6ZyA3F4DMTlkHC4csYsqd\r\ntdz1aOISagHvTwj3yCMmfMRVbiIGGSYKKNXMrVMiOGTrM1VApfEh4EDAmfnO\r\naaa8sisQNL0HsWCJNIOf5kUtnLadj4iQbTc=\r\n=gchh\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev?utm_source=github&utm_medium=clerk_backend_core\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <picture>\n      <img src=\"https://images.clerk.dev/static/logo-light-mode-400x400.png\" height=\"64\">\n    </picture>\n  </a>\n  <br />\n</p>\n\n# @clerk/backend-core\n\n<div align=\"center\">\n\n[![Chat on Discord](https://img.shields.io/discord/856971667393609759.svg?logo=discord)](https://discord.com/invite/b5rXHjAg7A)\n[![Clerk documentation](https://img.shields.io/badge/documentation-clerk-green.svg)](https://clerk.dev/docs?utm_source=github&utm_medium=clerk_backend_core)\n[![Follow on Twitter](https://img.shields.io/twitter/follow/ClerkDev?style=social)](https://twitter.com/intent/follow?screen_name=ClerkDev)\n\n[Changelog](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/CHANGELOG.md)\n·\n[Report a Bug](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=bug&template=bug_report.md&title=Bug%3A+)\n·\n[Request a Feature](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=Feature%3A+)\n·\n[Ask a Question](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n\n</div>\n\n---\n\n## Overview\n\nThis package provides Clerk Backend API core resources and low-level authentication utilities for JavaScript environments. It is mostly used as the base for other Clerk SDKs.\n\n## Getting Started\n\n### Installation\n\n```sh\nnpm install @clerk/backend-core\n```\n\n### Build\n\nTo build the package locally with the TypeScript compiler, run:\n\n```sh\nnpm run build\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities, without being platform/environment, specific such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendApi](./src/api/ClerkBackendApi.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendApi` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n## Usage\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendApi](./src/api/ClerkBackendApi.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://reference.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendApi.ts#17) implementation.\n\n## Support\n\nYou can get in touch with us in any of the following ways:\n\n- Join our official community [Discord server](https://discord.com/invite/b5rXHjAg7A)\n- Open a [GitHub support issue](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n- Contact options listed on [our Support page](https://clerk.dev/support?utm_source=github&utm_medium=clerk_backend_core)\n\n## Contributing\n\nWe're open to all community contributions! If you'd like to contribute in any way, please read [our contribution guidelines](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/CONTRIBUTING.md).\n\n## Security\n\n`@clerk/backend-core` follows good practices of security, but 100% security cannot be assured.\n\n`@clerk/backend-core` is provided **\"as is\"** without any **warranty**. Use at your own risk.\n\n_For more information and to report security issues, please refer to our [security documentation](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/SECURITY.md)._\n\n## License\n\nThis project is licensed under the **MIT license**.\n\nSee [LICENSE](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/LICENSE) for more information.\n","engines":{"node":">=14"},"gitHead":"a0794377d67c86999db5d71690cbd269935da63a","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","lint":"eslint .","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix","clean":"rimraf ./dist"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.18.1+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.18.1","dependencies":{"tslib":"2.4.1","node-fetch":"2.6.7","@types/node":"16.18.6","@clerk/types":"^3.23.0-staging.1","query-string":"7.1.3","snakecase-keys":"5.4.4","@types/node-fetch":"2.6.2","@peculiar/webcrypto":"1.4.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","typescript":"*"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.12.1-staging.1_1671456056243_0.995882446946802","host":"s3://npm-registry-packages"}},"2.12.1":{"name":"@clerk/backend-core","version":"2.12.1","license":"MIT","_id":"@clerk/backend-core@2.12.1","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"197594f9da7c789a1a744eb9d59376ac80853a48","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.12.1.tgz","fileCount":351,"integrity":"sha512-cVQcHYEtRW7xL/ajrsHgHoNNINCN7thkD72jNKQ9Upu0fb3usjGKGD6bmqJ0VVYiQorXPWPU5w8Y0Ny32s/BQA==","signatures":[{"sig":"MEUCIQCkUPbWZzFnJ/bTgS1YIfpeukQ06Em+HvzHtE+uJ0/xCQIgJsQ2rWSONhlfDen/NF/3C9vdRJrDBmfsVAXnk2VTw9g=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":587416,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjoK+6ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoEeA/9Ga2YjpxYnv/k9m7s77DnPomhxRGc8z+2/v26vpnST6WWUvdC\r\n3Ecm42z+K0BlLIxJKKGDaQjAFiy4Ka8Z/6yAZ8HumhCXDYilpbVDsVh03dD9\r\nfdo6QHy9cf6Qg4R5bzHncs3B5a6zzScVjyhA8G+DdfTVXfLLy0Rc5EFJNVhY\r\nQ3+6B3UwKdQ5J1e6wTF0jqjj9N25kiMTi4Ml5QcpKJqrskMpe5gAXWKDZfOU\r\nIGQRXiUk8NJSvV77wj4sLeYE8pHWgfWYsZBSbqmoRk32owd7bLAA0LojFsPf\r\nV50al2N9XC9xP7R5Yz9UTI+k6KP/Nk3e9u254u3zEhBmNWkBbdC0sNHMCXLK\r\nyXpDk5Q6tl6j3J+olvesfoeznHRBCdmT5KJhXnsb57feVL9DtuFYtkGGl0oT\r\n+jDcszu80rWrKrvSxk0t65SdZ5BHDO7NXDc7Is6iXee/YeJQ782r2mzuxIxt\r\nCC8IDzYqNLSNbDLNy+wpj8ODLUBpNroMxx8MMDwfS3hiAvse0/ylujwFUWPw\r\ntg/0+W9mruAQjg7Ir9gzsCSRjqsm2jB3WlbiXeOOJrErD/K62+3Z8gLz/ky7\r\nFyl96Hn4/E7LvOqqGkFEdx6o6wLnVnvEAWgDED9NaRmuJRM9FHDxpV4Q8tUx\r\n8tC72OlNm446v/VWMYj8sIMuFYoX6Ce3Fos=\r\n=OXKW\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","engines":{"node":">=14"},"gitHead":"66face1c1fe77c903c14fdfc47beefb872b787bb","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","lint":"eslint .","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix","clean":"rimraf ./dist"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v16.18.1+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"16.18.1","dependencies":{"tslib":"2.4.1","node-fetch":"2.6.7","@types/node":"16.18.6","@clerk/types":"^3.23.0","query-string":"7.1.3","snakecase-keys":"5.4.4","@types/node-fetch":"2.6.2","@peculiar/webcrypto":"1.4.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","typescript":"*"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.12.1_1671475129968_0.2199808519737445","host":"s3://npm-registry-packages"}},"2.13.0-staging.0":{"name":"@clerk/backend-core","version":"2.13.0-staging.0","license":"MIT","_id":"@clerk/backend-core@2.13.0-staging.0","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"00d2037d030bf9f1c2b3df4db1fb00c70499507e","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.13.0-staging.0.tgz","fileCount":351,"integrity":"sha512-P2UYuCn3zlX+xGJow43E0PDxBJQsrJ0HtByWq+ystuN/jrsx4jBhmd1fBuESKo5Sgfa8r0tsqXrRgF02avf/Bg==","signatures":[{"sig":"MEQCIHuRtDzYlRr1P2LWzlVykLloCSZvG3ByxCshUk5GaJipAiBE9IrWe1L+7MM4NXcya0rrsDBAUKzWimavwgVFlHyAZQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":587579,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjvDIdACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqkhw//dkYuRuIaHjlV7Uflx40N5gaFSc0pRg5zpoHjYHVSdI0DmH/Q\r\nf/CctOF3K8TwRX7KKlISmFPERILCNolBzRfrZAi4LoQ1nUdHIzDgkFe/Oddf\r\nuoDOFHlE5N1PQu2+scbVroxa1NkPxzLEzWeLjX5ppye5qT8KoNvE9kAmrmXc\r\nGtNQXrl6UOJB0deQStWTYfqHGdqH1sxBd2us2XVepG19BeZ1wUvRpYiqBW+E\r\nQidwUj7Ow+kEDkKHUmyE8JuEok2linn+tXN1ABcLq1TXGYv8QEESD0Z/Y2tZ\r\nQAx8ea7jVRX+gMwUv1+cYIrTB+oyhPRDohndsc3Ft9tCWIiHzl9AtWivveq9\r\nGsXt1ZUtVrnTIVzzelI+E8aDEX7EyD04ksmJckUQBmBRoxlddt1dSJiv5HLn\r\n4/Y4Yf+QJ0pKNvpRx8RRvXxTyRD/d84lM0pfIKiX6rsPrwKEa4IcG+I4tpqB\r\nAR3NG7H/FowhtnUVEOn0PiZzVuQ2O/rvpseNX85pDnj2+zY4hwwKK6k2wfwZ\r\n8xUwCNwv6Ou12NMu/rMq7FvdKI+w7qLWCLiG5WVhyKyUg0eiPlJiRb5fdNnS\r\ncTysXHUUdb6jZ4kjH3rfs8YZW21C/wabq1I13egc9Va6MkgOB4b1xcedpnN6\r\nrEPNp16YveuvlV81I816JsMk8ficTXYgGlA=\r\n=CWZ1\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev?utm_source=github&utm_medium=clerk_backend_core\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <picture>\n      <img src=\"https://images.clerk.dev/static/logo-light-mode-400x400.png\" height=\"64\">\n    </picture>\n  </a>\n  <br />\n</p>\n\n# @clerk/backend-core\n\n<div align=\"center\">\n\n[![Chat on Discord](https://img.shields.io/discord/856971667393609759.svg?logo=discord)](https://discord.com/invite/b5rXHjAg7A)\n[![Clerk documentation](https://img.shields.io/badge/documentation-clerk-green.svg)](https://clerk.dev/docs?utm_source=github&utm_medium=clerk_backend_core)\n[![Follow on Twitter](https://img.shields.io/twitter/follow/ClerkDev?style=social)](https://twitter.com/intent/follow?screen_name=ClerkDev)\n\n[Changelog](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/CHANGELOG.md)\n·\n[Report a Bug](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=bug&template=bug_report.md&title=Bug%3A+)\n·\n[Request a Feature](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=Feature%3A+)\n·\n[Ask a Question](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n\n</div>\n\n---\n\n## Overview\n\nThis package provides Clerk Backend API core resources and low-level authentication utilities for JavaScript environments. It is mostly used as the base for other Clerk SDKs.\n\n## Getting Started\n\n### Installation\n\n```sh\nnpm install @clerk/backend-core\n```\n\n### Build\n\nTo build the package locally with the TypeScript compiler, run:\n\n```sh\nnpm run build\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities, without being platform/environment, specific such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendApi](./src/api/ClerkBackendApi.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendApi` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n## Usage\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendApi](./src/api/ClerkBackendApi.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://reference.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendApi.ts#17) implementation.\n\n## Support\n\nYou can get in touch with us in any of the following ways:\n\n- Join our official community [Discord server](https://discord.com/invite/b5rXHjAg7A)\n- Open a [GitHub support issue](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n- Contact options listed on [our Support page](https://clerk.dev/support?utm_source=github&utm_medium=clerk_backend_core)\n\n## Contributing\n\nWe're open to all community contributions! If you'd like to contribute in any way, please read [our contribution guidelines](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/CONTRIBUTING.md).\n\n## Security\n\n`@clerk/backend-core` follows good practices of security, but 100% security cannot be assured.\n\n`@clerk/backend-core` is provided **\"as is\"** without any **warranty**. Use at your own risk.\n\n_For more information and to report security issues, please refer to our [security documentation](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/SECURITY.md)._\n\n## License\n\nThis project is licensed under the **MIT license**.\n\nSee [LICENSE](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/LICENSE) for more information.\n","engines":{"node":">=14"},"gitHead":"1dc2a8d5fad50aa62b10f98f49a5def43ba56a75","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","lint":"eslint .","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix","clean":"rimraf ./dist"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v18.12.1+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"18.12.1","dependencies":{"tslib":"2.4.1","node-fetch":"2.6.7","@types/node":"16.18.6","@clerk/types":"^3.24.0-staging.0","query-string":"7.1.3","snakecase-keys":"5.4.4","@types/node-fetch":"2.6.2","@peculiar/webcrypto":"1.4.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","typescript":"*"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.13.0-staging.0_1673277981100_0.5110539762409998","host":"s3://npm-registry-packages"}},"2.13.0-staging.1":{"name":"@clerk/backend-core","version":"2.13.0-staging.1","license":"MIT","_id":"@clerk/backend-core@2.13.0-staging.1","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"9b64905bb8081f1dc28a6af49c12e204ef7c543c","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.13.0-staging.1.tgz","fileCount":351,"integrity":"sha512-EfEd7hTmaVDOH4+wMRpriJ50wy3Mp5rlr4ILDGEYd4Mo0YjfWZE7RlVcozgYe9ycDk4EtutpbqImy8xgAL6uhQ==","signatures":[{"sig":"MEUCIQDAXGRgRlegM7jrJ38DPYugN/OJOPzAYQ/PjN2/U6Q+EQIgTuDEbz7nM1sXLy7Jz9AHm2VFrqv+XJ+0yFGcEF7+0es=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":587707,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjvrAFACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp3sg//d0IdrdMV0rW5dOSu7pe5lAd9pyPNnVZrJkJX3wnfeN8qLzLN\r\ndN3pLQvWNDzPcnHQrNuuFuEj2LGpWO36dtZO8TeD3tB7gybz4BsEbEwc64NU\r\nbTbFPpHyd6HI37Ymrmz9riZAIcDj5eVhw9YDqRYVQqDwXGnD7m4ara4LD7db\r\njE2vcQrf81N1UqJ0B7taJ3I1WjiRkN4a4niIIEUxYQ4O2EyOWChmV1Rvyl0r\r\ncPFlBa6hCQ0cOB3huJnvSy+pUK7f+2gKw/E2pQeyfNIhZfcbx6K/zZrMUlHX\r\nQmLyO8W3CN//aXUGpU6hciLl1k+uYMucizntrlJ+htZbnbQNaL2AcbX8CRe8\r\nRX01ohmT4eeRcj+IKTIvccpxaLz7FCl/QqruEwb2rkKaZWJoL8GKRaExZHP5\r\nth2he7d9kDjb8F7rrsc63CwqW4YRtm6zVEmIVuoM3w5Dw4FLgHDrt1HPTBIA\r\nfBkx9e5BfSmeoIaw0kE5lwYo8xkG0b3zgOE7ckGX0Ig0I8QvTHVsyKOQcpe2\r\ndenc6Uk3W5GZYk4cctikbDbSR//ne+F3s8vccfMdN9q0amm9NovdoG8aA8E2\r\n4lv89mATo4xBqTZUo98PLorkBxnsN9D5vRRz/ZYuGcSB8tBtSJcXVRgWfS+Q\r\nbsLsuSb3rktUv1p2qydr3xOoWM/lJa00CP0=\r\n=pcI6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev?utm_source=github&utm_medium=clerk_backend_core\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <picture>\n      <img src=\"https://images.clerk.dev/static/logo-light-mode-400x400.png\" height=\"64\">\n    </picture>\n  </a>\n  <br />\n</p>\n\n# @clerk/backend-core\n\n<div align=\"center\">\n\n[![Chat on Discord](https://img.shields.io/discord/856971667393609759.svg?logo=discord)](https://discord.com/invite/b5rXHjAg7A)\n[![Clerk documentation](https://img.shields.io/badge/documentation-clerk-green.svg)](https://clerk.dev/docs?utm_source=github&utm_medium=clerk_backend_core)\n[![Follow on Twitter](https://img.shields.io/twitter/follow/ClerkDev?style=social)](https://twitter.com/intent/follow?screen_name=ClerkDev)\n\n[Changelog](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/CHANGELOG.md)\n·\n[Report a Bug](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=bug&template=bug_report.md&title=Bug%3A+)\n·\n[Request a Feature](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=Feature%3A+)\n·\n[Ask a Question](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n\n</div>\n\n---\n\n## Overview\n\nThis package provides Clerk Backend API core resources and low-level authentication utilities for JavaScript environments. It is mostly used as the base for other Clerk SDKs.\n\n## Getting Started\n\n### Installation\n\n```sh\nnpm install @clerk/backend-core\n```\n\n### Build\n\nTo build the package locally with the TypeScript compiler, run:\n\n```sh\nnpm run build\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities, without being platform/environment, specific such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendApi](./src/api/ClerkBackendApi.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendApi` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n## Usage\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendApi](./src/api/ClerkBackendApi.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://reference.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendApi.ts#17) implementation.\n\n## Support\n\nYou can get in touch with us in any of the following ways:\n\n- Join our official community [Discord server](https://discord.com/invite/b5rXHjAg7A)\n- Open a [GitHub support issue](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n- Contact options listed on [our Support page](https://clerk.dev/support?utm_source=github&utm_medium=clerk_backend_core)\n\n## Contributing\n\nWe're open to all community contributions! If you'd like to contribute in any way, please read [our contribution guidelines](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/CONTRIBUTING.md).\n\n## Security\n\n`@clerk/backend-core` follows good practices of security, but 100% security cannot be assured.\n\n`@clerk/backend-core` is provided **\"as is\"** without any **warranty**. Use at your own risk.\n\n_For more information and to report security issues, please refer to our [security documentation](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/SECURITY.md)._\n\n## License\n\nThis project is licensed under the **MIT license**.\n\nSee [LICENSE](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/LICENSE) for more information.\n","engines":{"node":">=14"},"gitHead":"003b9e03ee8076fade9d10b8860b9905f326146d","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","lint":"eslint .","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix","clean":"rimraf ./dist"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v18.12.1+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"18.12.1","dependencies":{"tslib":"2.4.1","node-fetch":"2.6.7","@types/node":"16.18.6","@clerk/types":"^3.24.0-staging.1","query-string":"7.1.3","snakecase-keys":"5.4.4","@types/node-fetch":"2.6.2","@peculiar/webcrypto":"1.4.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","typescript":"*"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.13.0-staging.1_1673441285262_0.8664241845738778","host":"s3://npm-registry-packages"}},"2.12.2":{"name":"@clerk/backend-core","version":"2.12.2","license":"MIT","_id":"@clerk/backend-core@2.12.2","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"7b4950d4d626f01afb0033799cb694662cd3d29e","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.12.2.tgz","fileCount":351,"integrity":"sha512-RG1Z0qGe83mQ+XlxGU6X2lnuFNfMqZ8v3f51W6gXKzCgAUagzVjVg6bquQGBCk9ZkrqnwkfQXNFZApbrZKU50Q==","signatures":[{"sig":"MEUCIGL63r/FpN9zyDNhUeSuBSBKZag6RwHhgmf1GnZdoJApAiEA+jgQo/4SqaUpqNNIkQl7AcxV5ay4mvR79Bwu3ZrTub8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":587912,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjvzFkACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoaMBAAoOSiZV3FZAtVs0SY9Hd9uC8BhaLMvhi9i9hyZOPliIDKNuQO\r\n5s1TsegpiAhe7ERqpJB0le9sesRT/r0hICKa22bAre+YSz45x/msHM1iBER6\r\nJsShDBZIeSPp4KP+3xaDC6mCAC6MUCqFx1LdiTaYe4o4RG+04mB30doihuia\r\nqeRJxoK/6z78YxOOf7MkdByV/BOMXuIy8dan8gWc0xUV1othaHIubNGFXvHA\r\nPqQLESxOo4BZmtZnAa6nTFZgfCcyvYMQCpaePHoiYguf1X7wl6YUojOp/M29\r\nxYXLwpLZ+WoMc+eJOpkEXd2k24Yj/Q+sufHUpt7pz9CvlICEAilrW0o49efy\r\n4ZGSqjingdfHqJgkh5bbE+puzVvwtlRVIcOZWOGnUMQ+4Ltb+mFWjTc4xJUZ\r\nqHIUPmIYDzQagqblCGofX2Zw0l7mHXMOAES45bSZ5yCRSe0pZXdGQ58V+Bpt\r\nMzOhlZ0DAaHe7c7bTTtd4HQBJmL4dQBasu5ttoH3Y5tl+L3VeFTNKNchxMe4\r\n161i3Fdi6aKWc6kG6uYl2wbV00E0v6rasYAlp7f8h8x87olccufBGfdcx5MH\r\nEKNqETL24ZiJ9iwJTZ8pZeoSt5F19F+LaGq7Gz1SkAkmNYDByH4bHqIPXxRY\r\ncpOysTeLZzJhoWG65IoVSci9VtpVEKPz8qE=\r\n=Ha3G\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","engines":{"node":">=14"},"gitHead":"16bf4afce3e31f0209f68decbaf0f903ae74bc79","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","lint":"eslint .","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix","clean":"rimraf ./dist"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v18.12.1+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"18.12.1","dependencies":{"tslib":"2.4.1","node-fetch":"2.6.7","@types/node":"16.18.6","@clerk/types":"^3.23.0","query-string":"7.1.3","snakecase-keys":"5.4.4","@types/node-fetch":"2.6.2","@peculiar/webcrypto":"1.4.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","typescript":"*"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.12.2_1673474403545_0.6690946740348107","host":"s3://npm-registry-packages"}},"2.13.0":{"name":"@clerk/backend-core","version":"2.13.0","license":"MIT","_id":"@clerk/backend-core@2.13.0","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"3571ee8445cf93dc39627fb0290eb7c0e8ee102b","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.13.0.tgz","fileCount":351,"integrity":"sha512-MfONu4DvIwfRhL08sPAOKINinDd4L6P5cIDEPeyu/JgqwXMNh1phQ2HoMQDz8v2HpV8sDQz7IZFXO0otzFxHxQ==","signatures":[{"sig":"MEQCICVgcSCwFQ6fr2+nTrMG0xgi6Dl4AT5Us3Bv691qmNS8AiBu8mkAMaJ5HzgFQi300pKE61jvOUu4sUNXOy1Jd4AY/Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":587888,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjxnjPACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq2Lw/+NOih2B0ANpbYxf2l3xHnWB8uHPqgBSxyFD+o6SZPCukhZo12\r\n79N9ceRZ/jSQLhyJW2BphoXZMDX/IzunoPzslZFxfU6291JJ5fUJoyg85zgc\r\n2ul02ab2zdf/emI6oBrd2ND+MnvBhj6O2Lq+/9IlXkcGRbPXZ9eH001h3dGB\r\nzYEVxVDeu06HDy/bGfNM7A7sGcXpW5zXePbNTeaP+6/ELgJPAFkE+wodQ+fg\r\naFpUf0LHt8vWC/Q+6mKH+PzQ/4buW1C/yUBDeeZYP7RScQbrj2FGTOGBHVXE\r\nlYKIlJPWnCUQXgoPjxM1o2SGw6vZqWTVxU02Ilfl/vILUH/8POCg/bR5ZO+o\r\naIcNJ5vPkNBeaDMnvJsqyQOAw7o+4kuVzfqqAzkKSQrAEp+x44auJBNTshf8\r\nqB+CpVdTADFQ37mSbUHLOfFQHlyuDtV39YY4oAii/QV+EVdmIB2uvKmtZqZK\r\n3TexfNplfzCz1KZgWO+NlHcLPBBDU/d2dPUFC/4RYOVhaj+PyBTbFtextNMO\r\noBgum2U25neKZWf0LPkS60j8xjLVv8+bpi0qdL6Y2UrjRbKpn/a7AazFbWcC\r\n6pTX9KcurBuibBAgc9Uv2BZdH0+HiBy9u7BMMw9qo+JitOqZ4QYVbBdUPIMS\r\n9P68gO2lMmu3v4rHfqtL66WoY3TkE7RnyBc=\r\n=5x+4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","engines":{"node":">=14"},"gitHead":"e9895061623510b9553067d5dce542196ad80197","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","lint":"eslint .","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix","clean":"rimraf ./dist"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v18.12.1+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"18.12.1","dependencies":{"tslib":"2.4.1","node-fetch":"2.6.7","@types/node":"16.18.6","@clerk/types":"^3.24.0","query-string":"7.1.3","snakecase-keys":"5.4.4","@types/node-fetch":"2.6.2","@peculiar/webcrypto":"1.4.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","typescript":"*"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.13.0_1673951439602_0.8784963677176187","host":"s3://npm-registry-packages"}},"2.13.1":{"name":"@clerk/backend-core","version":"2.13.1","license":"MIT","_id":"@clerk/backend-core@2.13.1","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"a8fc0469f3b83b2f667c4a7b58855fa42f0c5327","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.13.1.tgz","fileCount":351,"integrity":"sha512-Wgbga6EKAXiJ61gWrHp5Bvi/ay0Bo4QffpuS5OpdvJV4YAQgCG/TyQLYuuDscWRqvaU1gKbcJysJ2LspCXALzw==","signatures":[{"sig":"MEUCIDqDh9ONV2oqLYP8QDZGfL5dEahcUxbw6w890+DZI2JLAiEAkI6kDxIg9r1Gr0+q0FpbeYi1bqIU/i77xZqa4k6Ec2M=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":588533,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjyQfmACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqPdA/6AyxUr7+f3HgRkSyejqHYBy8z2Fzdbl9PoDJ6+M4Vzv5qo3Ah\r\nTpGv/uDw6mmpazooN5qOmwyNFANlsmMzejgCNp4LfwlR6u0J7K/Jwzn+xFF1\r\nED04shUGs9G+5d6wPSbQkNX7B7zFBuwphuAikFUn17I5Qv3xQszJ4gU7Bm+2\r\nxgS1s0KwQR0gkBFVuoMDGQ0I83IGrjjiq6+vP18KYd6t7HXcHwubqbgZXktb\r\nUEQoWZqZ1Z6pZbGqwUsf6uQBJcjLIDfi4zl0+uEWlFGSBpXjBQ7RNFSU5dIW\r\nGdueZl/hgmP5mCF7p7yNsMXQoFlPJ2XJ5jJeoSFNeWWA86kdC0DnSPmzed+H\r\n0rk4qN1mzDAZ3I9f2ivbWtVGAN2/pdk8ETUVUAaiGWgQo+G0fpoAkUeYEPWI\r\nGJxhNiTzXf4k94elpqwDJDQAR27m7RURL2xV41WqnQmobE5BzDcaK8jkNP89\r\n+/vw6bOQVTRoVAyC7Ar6JEQ0Y0SP3wksU5joHZOXwB3WJe2rtcqA5OzVA1F1\r\nxKe477b2Byjl3JgB6aq5VYjNeU4YANTalq9SUQ8vwMxpVimTQflFKLE76zA3\r\na1fBLNvqaF1JhNyg/8/bPK8JNfsCyBZeoHQt69aAYYtE44AjTrP4Vq5DhFXi\r\najo9hNzWwoG/Ole5Pem3VEn1gOk0sYleaRM=\r\n=02wY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","engines":{"node":">=14"},"gitHead":"8479ee85f2389518d134b027c7b490b4c45baa26","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","lint":"eslint .","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix","clean":"rimraf ./dist"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v18.12.1+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"18.12.1","dependencies":{"tslib":"2.4.1","node-fetch":"2.6.7","@types/node":"16.18.6","@clerk/types":"^3.24.0","query-string":"7.1.3","snakecase-keys":"5.4.4","@types/node-fetch":"2.6.2","@peculiar/webcrypto":"1.4.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","typescript":"*"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.13.1_1674119141820_0.09319407962440995","host":"s3://npm-registry-packages"}},"2.13.2":{"name":"@clerk/backend-core","version":"2.13.2","license":"MIT","_id":"@clerk/backend-core@2.13.2","maintainers":[{"name":"giannis-clerk","email":"giannis@clerk.dev"},{"name":"igneel64","email":"p.perlepes@gmail.com"},{"name":"chanioxaris","email":"haris@clerk.dev"},{"name":"agis-clerk","email":"agis@clerk.dev"},{"name":"colinclerk","email":"colin@clerk.dev"},{"name":"bradenclerk","email":"braden@clerk.dev"},{"name":"sokratis","email":"sokratis.vidros@gmail.com"},{"name":"yourtallness","email":"mark@clerk.dev"},{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"}],"homepage":"https://clerk.dev/","bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"dist":{"shasum":"2551e63d5eab9083f89d35bd696d038bce925e1c","tarball":"https://registry.npmjs.org/@clerk/backend-core/-/backend-core-2.13.2.tgz","fileCount":351,"integrity":"sha512-tO+YAUKNGR6X4nj0kqUfOnU6TeHvazjnPgAvX9XY0ebePuftqzxugs5nTtaaNAGPQr5iF5eDmsz97pwZ3sI4Dw==","signatures":[{"sig":"MEQCICUzqqohsHCAYZ5C2/oqE6n9U3psHavOr3OwyxeMuYolAiBn0X3ehO5xoxe7Beg4EDxaqiCTMzxLdec/aF8TCR2GIg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":588725,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjykqzACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmowPg/+N6m+9vMxz5A0QOy6XvxFHAkkg+ykgU5788F8N4XjYZTwMvBX\r\nz/SkNhLtvQGhJUM9AojEcGNsF1np0fCUvObgLLN1IyfE5v+7Ehhfs/UtoVSr\r\nI0aIATzzjU6zeuvwawQqVYtahOvX/zlnuE0Z847584hJvz4Lnx2O97n740GY\r\nL6sFPPyiz7vHASD2BuvwfMk5Azj4kcdL4YBtbjXo4SD4alwbl3Hvg7AWSu6U\r\nMdaV64rWLnhDNAyqou584+lEEjLF+nIlss9xlNe0V6/aMvuOnU6em2FOwWHL\r\ncEnRU41rRWMiPH3cmlkU0cs5NvvXftrvhUBGE0pqxCMFNpUjSqfbHx7UE9Vg\r\nlIbXVkZOJ3h5Skc1wWhDF/7teO3/YWDKO2D8mvXzWQZg9cR/j3YipONtmCN5\r\nOpgCD45eok+3d5ta9p+uEZNW18M3CisNGOW5JxxnZSvZT78JWK79WDGVB1Sb\r\nlFAawCBc9MN+xcHT+urH/3rJ2LlMKdGrvrsZKN0aYrLZMuONXQwUJV562Mgz\r\nr7k49mmxCSGCfVqLJt00mmF+D/QFRtcuFM50luKFXKu9PibC9Cq5za9EBQ7j\r\njuQ5Z8N246qDoOMXeddvLIZPGJsoQ5LKZhlF4cP3ZZym5ToMN7jcqQDSam8w\r\nk9E5biRqxHDRdi/tJhvUF4R2s9iZL0KcDm4=\r\n=Bi/p\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/cjs/index.js","type":"module","module":"dist/mjs/index.js","engines":{"node":">=14"},"gitHead":"d73a7b55cee65be985650af602d7b1791c988e0f","scripts":{"dev":"tsc -p tsconfig.esm.json --watch","lint":"eslint .","test":"jest","build":"tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && ./moduleTypeFix","clean":"rimraf ./dist"},"_npmUser":{"name":"nikosdouvlis","email":"nikosdouvlis@gmail.com"},"deprecated":"This package has been deprecated - use @clerk/backend instead","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"_npmVersion":"lerna/4.0.0/node@v18.12.1+arm64 (darwin)","description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","directories":{},"_nodeVersion":"18.12.1","dependencies":{"tslib":"2.4.1","node-fetch":"2.6.7","@types/node":"16.18.6","@clerk/types":"^3.24.1","query-string":"7.1.3","snakecase-keys":"5.4.4","@types/node-fetch":"2.6.2","@peculiar/webcrypto":"1.4.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.4.7","nock":"^13.2.1","ts-jest":"^27.1.3","typescript":"*"},"_npmOperationalInternal":{"tmp":"tmp/backend-core_2.13.2_1674201779722_0.9692797269503504","host":"s3://npm-registry-packages"}}},"time":{"created":"2022-01-20T09:53:38.484Z","modified":"2026-07-13T16:52:28.699Z","0.1.0-alpha.0":"2022-01-20T09:53:38.817Z","0.1.0-alpha.1":"2022-01-20T14:26:13.656Z","0.1.0-alpha.3":"2022-01-20T14:52:57.557Z","0.1.0":"2022-01-20T15:02:44.414Z","0.1.1":"2022-01-20T15:54:27.740Z","0.2.0":"2022-01-25T10:06:35.153Z","0.2.1":"2022-01-26T11:36:17.545Z","0.3.0-alpha.0":"2022-01-28T09:02:50.143Z","0.2.2":"2022-01-28T09:30:43.520Z","0.3.0":"2022-02-02T09:40:56.191Z","0.4.0":"2022-02-03T11:55:52.310Z","0.4.1-staging.0":"2022-02-11T12:10:08.473Z","0.4.1":"2022-02-14T10:39:47.265Z","0.4.2":"2022-02-16T10:49:05.977Z","0.4.3":"2022-02-16T11:09:48.278Z","0.4.4-staging.0":"2022-02-17T09:52:40.843Z","0.4.4":"2022-02-24T14:36:25.296Z","0.5.0":"2022-03-04T15:59:16.554Z","0.4.5-staging.0":"2022-03-04T16:19:57.977Z","0.5.1":"2022-03-04T17:37:48.597Z","0.5.2-staging.0":"2022-03-08T13:12:17.864Z","0.5.2":"2022-03-09T10:21:21.423Z","0.6.0-staging.0":"2022-03-11T01:33:11.162Z","0.6.0":"2022-03-11T10:45:38.619Z","0.6.1":"2022-03-14T10:07:49.800Z","0.6.4-alpha.0":"2022-03-19T01:58:56.168Z","0.6.4-alpha.1":"2022-03-20T00:02:43.831Z","0.7.0-alpha.0":"2022-03-22T09:25:41.732Z","0.7.0":"2022-03-22T11:06:41.654Z","0.7.0-alpha.1":"2022-03-22T14:08:20.181Z","0.8.0-alpha.0":"2022-03-22T15:32:33.167Z","0.8.0-alpha.1":"2022-03-23T15:32:22.647Z","1.0.1-alpha.0":"2022-03-23T23:35:26.244Z","1.0.2-staging.0":"2022-03-24T09:14:20.522Z","1.1.0-staging.0":"2022-03-24T22:20:32.974Z","1.1.0-alpha.0":"2022-03-24T22:23:54.936Z","1.1.0":"2022-03-25T00:04:08.037Z","1.1.1-staging.0":"2022-03-28T14:11:31.457Z","1.1.1":"2022-03-28T15:11:36.784Z","1.1.2-staging.0":"2022-03-29T13:32:21.433Z","1.1.2":"2022-03-29T15:45:55.204Z","1.2.0-staging.0":"2022-04-04T09:00:22.807Z","1.2.0":"2022-04-04T14:20:26.678Z","1.2.1-staging.0":"2022-04-05T14:59:47.850Z","1.2.1-staging.1":"2022-04-05T17:31:15.142Z","1.2.1-staging.2":"2022-04-05T20:53:19.130Z","1.2.1":"2022-04-07T08:48:00.067Z","1.3.0-staging.0":"2022-04-13T09:33:03.280Z","1.3.0":"2022-04-13T09:51:01.485Z","1.3.1-staging.0":"2022-04-15T08:42:27.649Z","1.3.1":"2022-04-15T09:38:46.114Z","1.4.0":"2022-04-15T15:49:13.259Z","1.4.1-alpha.0":"2022-04-15T23:02:01.677Z","1.5.0":"2022-04-18T10:02:18.991Z","1.5.1-staging.0":"2022-04-19T08:18:44.146Z","1.5.1-staging.1":"2022-04-19T08:39:28.402Z","1.5.1":"2022-04-19T10:42:26.289Z","1.5.2":"2022-04-22T08:43:42.339Z","1.5.3":"2022-04-27T09:01:14.663Z","1.5.4":"2022-04-27T17:25:21.110Z","1.5.5-staging.0":"2022-04-28T08:13:42.462Z","1.5.5-staging.1":"2022-04-28T11:42:57.594Z","1.5.5":"2022-04-28T13:32:12.508Z","1.5.6-staging.0":"2022-05-04T12:53:42.432Z","1.5.6":"2022-05-05T22:10:47.808Z","1.6.0":"2022-05-06T10:58:50.620Z","1.7.0-staging.0":"2022-05-10T08:22:58.420Z","1.7.0":"2022-05-11T13:28:01.004Z","1.7.2":"2022-05-12T09:47:24.508Z","1.8.0-staging.0":"2022-05-12T14:03:39.027Z","1.8.0":"2022-05-13T08:53:54.080Z","1.9.0-staging.0":"2022-05-16T16:13:55.722Z","1.9.0-staging.1":"2022-05-17T11:38:37.414Z","1.9.0-staging.2":"2022-05-18T09:06:33.427Z","1.9.0-staging.3":"2022-05-19T08:40:46.614Z","1.9.0-staging.4":"2022-05-20T08:43:49.440Z","1.9.0":"2022-05-20T11:22:52.351Z","1.9.1-staging.0":"2022-05-31T09:10:47.100Z","1.9.1-staging.1":"2022-06-01T15:17:31.596Z","1.9.1-staging.2":"2022-06-02T08:59:26.968Z","1.9.1-staging.3":"2022-06-03T08:57:46.382Z","1.9.1":"2022-06-06T09:04:17.458Z","1.9.2-staging.0":"2022-06-16T07:20:24.434Z","1.9.2":"2022-06-16T08:55:15.490Z","1.10.0":"2022-06-24T08:48:48.936Z","1.11.0":"2022-07-01T09:13:16.653Z","1.11.1":"2022-07-04T08:50:07.913Z","1.11.2":"2022-07-06T08:50:59.187Z","1.11.3":"2022-07-07T09:08:41.934Z","1.12.0":"2022-07-08T08:52:28.311Z","1.12.1-next.0":"2022-07-13T04:08:03.518Z","1.13.0":"2022-07-13T09:24:13.260Z","1.14.0-next.1":"2022-07-13T14:23:09.260Z","1.14.0-next.3":"2022-07-14T01:12:35.388Z","1.14.0-next.4":"2022-07-14T23:38:40.054Z","1.14.0-next.5":"2022-07-14T23:43:21.978Z","2.0.0-next.0":"2022-07-18T01:13:02.664Z","2.0.0-next.1":"2022-07-19T04:29:59.252Z","1.14.0-staging.0":"2022-07-20T13:04:21.994Z","1.14.0":"2022-07-26T09:07:28.695Z","2.0.0-next.2":"2022-07-27T09:54:07.032Z","2.0.0-next.3":"2022-07-28T23:59:14.846Z","2.0.0-next.5":"2022-07-31T13:27:56.386Z","2.0.0-next.6":"2022-08-02T00:07:04.460Z","1.14.1":"2022-08-04T12:05:02.093Z","2.0.0-next.7":"2022-08-04T15:15:14.969Z","2.0.0-next.8":"2022-08-04T17:37:56.053Z","1.14.2":"2022-08-05T09:07:55.840Z","2.0.0-next.9":"2022-08-05T15:26:41.891Z","2.0.0-staging.1":"2022-08-05T21:20:39.650Z","2.0.0":"2022-08-05T21:27:18.286Z","2.0.1":"2022-08-07T17:42:29.096Z","2.0.2-staging.0":"2022-08-09T10:02:28.429Z","2.0.2":"2022-08-09T11:57:05.494Z","2.0.3":"2022-08-16T15:13:33.429Z","2.0.4-staging.0":"2022-08-18T11:17:46.050Z","2.0.4":"2022-08-18T12:20:48.024Z","2.0.5":"2022-08-18T13:58:31.446Z","2.1.0":"2022-08-18T15:04:48.608Z","2.1.1-staging.0":"2022-08-24T09:23:12.603Z","2.1.1":"2022-08-24T10:06:20.134Z","2.1.2-staging.0":"2022-08-24T13:51:42.147Z","2.1.2-staging.1":"2022-08-25T15:06:21.416Z","2.2.0-staging.0":"2022-08-26T08:06:53.371Z","2.2.0-staging.1":"2022-08-29T08:38:57.097Z","2.2.0":"2022-08-29T08:55:51.302Z","2.3.0-staging.0":"2022-08-29T12:05:45.268Z","2.3.0":"2022-08-29T12:20:02.773Z","2.4.0-staging.0":"2022-09-06T11:41:21.604Z","2.4.0":"2022-09-07T08:01:50.476Z","2.4.1-staging.0":"2022-09-07T14:10:12.392Z","2.4.1":"2022-09-07T16:50:42.470Z","2.4.2-staging.1":"2022-09-12T10:08:07.203Z","2.4.2-staging.2":"2022-09-12T15:17:19.199Z","2.4.2-staging.3":"2022-09-14T15:44:51.021Z","2.4.2-staging.4":"2022-09-15T11:39:35.493Z","2.4.2":"2022-09-16T13:59:53.330Z","2.4.3":"2022-09-19T23:05:49.065Z","2.4.4-staging.0":"2022-09-21T08:44:20.822Z","2.4.4":"2022-09-22T12:05:12.141Z","2.5.0-staging.0":"2022-09-24T18:29:57.338Z","2.5.0-staging.1":"2022-09-24T18:52:48.257Z","2.5.1":"2022-09-25T06:45:14.968Z","2.5.2-staging.0":"2022-09-26T11:21:27.381Z","2.5.2-staging.1":"2022-09-26T12:02:39.512Z","2.6.0-next.0":"2022-09-26T23:29:10.648Z","2.5.2-staging.2":"2022-09-27T11:02:57.865Z","2.6.0-staging.0":"2022-09-27T15:03:39.987Z","2.6.0-staging.1":"2022-09-29T11:46:03.098Z","2.7.0-staging.1":"2022-09-29T23:55:43.400Z","2.7.0-staging.2":"2022-09-30T09:23:05.925Z","2.7.0-staging.3":"2022-09-30T13:58:04.429Z","2.7.0-staging.5":"2022-10-03T11:55:20.360Z","2.7.0":"2022-10-03T14:03:56.849Z","2.8.0-staging.0":"2022-10-05T08:40:21.553Z","2.8.0":"2022-10-05T09:14:57.015Z","2.8.1-staging.0":"2022-10-06T12:03:35.172Z","2.8.1":"2022-10-07T16:39:56.772Z","2.8.2-staging.0":"2022-10-13T18:53:26.346Z","2.9.0-staging.0":"2022-10-13T19:12:39.229Z","2.9.0-staging.1":"2022-10-14T09:15:55.845Z","2.9.0":"2022-10-14T10:42:06.834Z","2.9.1":"2022-10-14T14:07:47.693Z","2.9.2-staging.0":"2022-10-21T08:49:59.830Z","2.9.2":"2022-10-24T15:23:15.124Z","2.9.3-staging.0":"2022-10-27T22:31:06.443Z","2.9.3-next.0":"2022-10-28T20:53:08.982Z","2.9.3-next.1":"2022-10-28T21:21:02.657Z","2.9.3-staging.1":"2022-11-01T00:17:09.140Z","2.9.3-staging.2":"2022-11-01T00:32:43.675Z","2.10.0-staging.1":"2022-11-02T11:29:13.258Z","2.10.0-staging.4":"2022-11-02T12:15:09.671Z","2.10.0-staging.5":"2022-11-02T18:12:32.934Z","2.10.0-staging.6":"2022-11-02T22:22:24.937Z","2.9.3-next.2":"2022-11-03T12:57:38.474Z","2.10.0-staging.7":"2022-11-03T16:03:51.492Z","2.10.0":"2022-11-03T18:34:23.673Z","2.10.1-staging.0":"2022-11-04T01:44:08.715Z","2.10.1-staging.1":"2022-11-04T13:34:56.710Z","2.10.1-staging.2":"2022-11-04T17:09:54.180Z","2.10.1-staging.3":"2022-11-04T22:48:48.082Z","2.10.1":"2022-11-05T00:26:47.179Z","2.11.0-staging.0":"2022-11-10T12:11:46.095Z","2.11.0-staging.1":"2022-11-10T13:18:34.914Z","2.11.0":"2022-11-10T14:09:24.017Z","2.11.1-staging.0":"2022-11-10T14:32:42.042Z","2.11.1-staging.1":"2022-11-10T14:51:04.236Z","2.11.1-staging.2":"2022-11-14T21:30:40.773Z","2.11.1-staging.3":"2022-11-15T10:11:51.631Z","2.11.1":"2022-11-15T16:52:33.062Z","2.11.2-staging.0":"2022-11-18T15:43:35.234Z","2.11.2-staging.1":"2022-11-18T18:46:54.500Z","2.11.2":"2022-11-18T19:41:46.017Z","2.11.3-staging.0":"2022-11-18T21:40:26.455Z","2.11.3-staging.1":"2022-11-21T16:32:03.306Z","2.11.3-staging.2":"2022-11-21T20:09:10.398Z","2.11.3":"2022-11-22T12:26:20.723Z","2.11.5-staging.0":"2022-11-24T15:13:56.728Z","2.11.5":"2022-11-25T09:53:45.900Z","2.11.6-staging.0":"2022-11-25T13:35:52.865Z","2.11.6":"2022-11-25T20:54:26.087Z","2.11.7-staging.0":"2022-11-29T11:12:14.283Z","2.11.7-staging.1":"2022-11-29T12:57:36.991Z","2.11.7-staging.2":"2022-11-29T13:08:19.013Z","2.11.7-staging.3":"2022-11-29T17:55:54.906Z","2.11.7-staging.4":"2022-11-29T21:48:25.270Z","2.11.7":"2022-11-30T08:52:46.456Z","2.11.8-staging.0":"2022-12-02T10:12:23.761Z","2.11.8":"2022-12-02T12:52:34.376Z","2.11.9-staging.0":"2022-12-07T10:53:25.429Z","2.11.9":"2022-12-08T10:31:48.456Z","2.11.10":"2022-12-08T17:42:47.627Z","2.11.11-staging.0":"2022-12-09T10:32:24.796Z","2.11.11-staging.1":"2022-12-09T10:56:27.820Z","2.11.11":"2022-12-12T11:14:40.104Z","2.11.12":"2022-12-12T12:07:11.852Z","2.11.13-staging.0":"2022-12-13T10:06:32.383Z","2.12.0-staging.0":"2022-12-13T13:27:48.890Z","2.12.0":"2022-12-13T19:12:19.054Z","2.12.1-staging.0":"2022-12-19T00:31:30.103Z","2.12.1-staging.1":"2022-12-19T13:20:56.481Z","2.12.1":"2022-12-19T18:38:50.207Z","2.13.0-staging.0":"2023-01-09T15:26:21.281Z","2.13.0-staging.1":"2023-01-11T12:48:05.617Z","2.12.2":"2023-01-11T22:00:04.234Z","2.13.0":"2023-01-17T10:30:39.890Z","2.13.1":"2023-01-19T09:05:42.031Z","2.13.2":"2023-01-20T08:02:59.882Z"},"bugs":{"url":"https://github.com/clerkinc/javascript/issues"},"license":"MIT","homepage":"https://clerk.dev/","repository":{"url":"git+https://github.com/clerkinc/javascript.git","type":"git"},"description":"Clerk Backend API core resources and authentication utilities for JavaScript environments.","maintainers":[{"email":"colin@clerk.dev","name":"colinclerk"},{"email":"braden@clerk.dev","name":"bradenclerk"},{"email":"nikos@clerk.dev","name":"nikosdouvlis"},{"email":"soft.joy1514@fastmail.com","name":"jescalan"},{"email":"bryce@clerk.dev","name":"brkalow-clerk"},{"email":"dominic@clerk.dev","name":"dominic-clerk"}],"readme":"<p align=\"center\">\n  <a href=\"https://clerk.dev?utm_source=github&utm_medium=clerk_backend_core\" target=\"_blank\" rel=\"noopener noreferrer\">\n    <picture>\n      <img src=\"https://images.clerk.dev/static/logo-light-mode-400x400.png\" height=\"64\">\n    </picture>\n  </a>\n  <br />\n</p>\n\n# @clerk/backend-core\n\n<div align=\"center\">\n\n[![Chat on Discord](https://img.shields.io/discord/856971667393609759.svg?logo=discord)](https://discord.com/invite/b5rXHjAg7A)\n[![Clerk documentation](https://img.shields.io/badge/documentation-clerk-green.svg)](https://clerk.dev/docs?utm_source=github&utm_medium=clerk_backend_core)\n[![Follow on Twitter](https://img.shields.io/twitter/follow/ClerkDev?style=social)](https://twitter.com/intent/follow?screen_name=ClerkDev)\n\n[Changelog](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/CHANGELOG.md)\n·\n[Report a Bug](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=bug&template=bug_report.md&title=Bug%3A+)\n·\n[Request a Feature](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=enhancement&template=feature_request.md&title=Feature%3A+)\n·\n[Ask a Question](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n\n</div>\n\n---\n\n# Deprecation warning\n\nThis package has been deprecated in favor of the isomorphic [`@clerk/backend`](https://github.com/clerkinc/javascript) which is now used across all server-enabled Clerk packages. This package will not receive any future updates. It should not be used directly - please use as a reference only.\n\n## Overview\n\nThis package provides Clerk Backend API core resources and low-level authentication utilities for JavaScript environments. It is mostly used as the base for other Clerk SDKs.\n\n## Getting Started\n\n### Installation\n\n```sh\nnpm install @clerk/backend-core\n```\n\n### Build\n\nTo build the package locally with the TypeScript compiler, run:\n\n```sh\nnpm run build\n```\n\n## Architecture\n\n`@clerk/backend-core` contains all the logic for basic Clerk functionalities, without being platform/environment, specific such as:\n\n- Determining the authentication state of a session.\n- Validating a Clerk token state.\n- Clerk API resource management.\n\n### How it works\n\nThis package is used as the base building block for Clerk JavaScript SDKs and environments. This is achieved by providing all the required business logic if only a few environment-specific utilities are implemented by the client.\n\n<p align=\"center\">\n  <a href=\"https://clerk.dev/\" target=\"_blank\" align=\"center\">\n    <img src=\"https://images.clerk.dev/static/backend_api_architecture.png\" height=\"350\">\n  </a>\n  <br />\n</p>\n\nIn essence, the client should supply these key functions in the Clerk [Base](./src/Base.ts#47) and [ClerkBackendApi](./src/api/ClerkBackendApi.ts) classes:\n\n1. Public key import `importKeyFunction`.\n2. JWT signature verification `verifySignatureFunction`.\n3. Base64 decoding `decodeBase64Function`.\n4. HTTP fetching utility for the API resource management `ClerkFetcher`.\n\nAfter supplying those in the `Base` and `ClerkBackendApi` classes, you can use all the Clerk utilities required for the SDK business logic.\n\n## Usage\n\n### Creating a Base for a new SDK\n\n```ts\nconst importKey = async (jwk: JsonWebKey, algorithm: Algorithm) => {\n  //  ...\n};\n\nconst verifySignature = async (algorithm: Algorithm, key: CryptoKey, signature: Uint8Array, data: Uint8Array) => {\n  // ...\n};\n\nconst decodeBase64 = (base64: string) => {\n  // ...\n};\n\n/** Base initialization */\nconst examplePlatformBase = new Base(importKey, verifySignature, decodeBase64);\n```\n\nAfter creating the `Base` instance you can use core functions such as:\n\n```ts\nexamplePlatformBase.verifySessionToken(...);\n\nexamplePlatformBase.getAuthState(...);\n```\n\nThe `Base` utilities include the building blocks for developing any extra logic and middleware required for the target platform.\n\n### Validate the Authorized Party of a session token\n\nClerk's JWT session token, contains the azp claim, which equals the Origin of the request during token generation. You can provide a list of whitelisted origins to verify against, during every token verification, to protect your application of the subdomain cookie leaking attack. You can find an example below:\n\n```ts\nconst authorizedParties = ['http://localhost:3000', 'https://example.com'];\n\nexamplePlatformBase.verifySessionToken(token > { authorizedParties });\n```\n\n### Clerk API Resources\n\nAPI resource management is also provided by this package through the [ClerkBackendApi](./src/api/ClerkBackendApi.ts) class. For more information on the API resources you can checkout the [resource documentation page](https://reference.clerk.dev/reference/backend-api-reference).\n\nTo use the Clerk Backend API wrapper in any JavaScript platform, you would need to provide some specific SDK information and an HTTP fetching utility. See more at the [ClerkBackendAPIProps](./src/api/ClerkBackendApi.ts#17) implementation.\n\n## Support\n\nYou can get in touch with us in any of the following ways:\n\n- Join our official community [Discord server](https://discord.com/invite/b5rXHjAg7A)\n- Open a [GitHub support issue](https://github.com/clerkinc/javascript/issues/new?assignees=&labels=question&template=ask_a_question.md&title=Support%3A+)\n- Contact options listed on [our Support page](https://clerk.dev/support?utm_source=github&utm_medium=clerk_backend_core)\n\n## Contributing\n\nWe're open to all community contributions! If you'd like to contribute in any way, please read [our contribution guidelines](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/CONTRIBUTING.md).\n\n## Security\n\n`@clerk/backend-core` follows good practices of security, but 100% security cannot be assured.\n\n`@clerk/backend-core` is provided **\"as is\"** without any **warranty**. Use at your own risk.\n\n_For more information and to report security issues, please refer to our [security documentation](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/docs/SECURITY.md)._\n\n## License\n\nThis project is licensed under the **MIT license**.\n\nSee [LICENSE](https://github.com/clerkinc/javascript/blob/main/packages/backend-core/LICENSE) for more information.\n","readmeFilename":"README.md"}