{"_id":"@superfunctions/oauth-http","_rev":"4-b31a4d153cfa3c288b3cafed96d2e8ef","name":"@superfunctions/oauth-http","dist-tags":{"latest":"0.2.1"},"versions":{"0.0.1":{"name":"@superfunctions/oauth-http","version":"0.0.1","keywords":["oauth","http","superfunctions"],"author":{"name":"21n"},"license":"MIT","_id":"@superfunctions/oauth-http@0.0.1","maintainers":[{"name":"21native","email":"npm@21n.org"}],"homepage":"https://github.com/21nCo/super-functions#readme","bugs":{"url":"https://github.com/21nCo/super-functions/issues"},"dist":{"shasum":"d571c5b08bb4f894a0edde8dd7150a65aa90af40","tarball":"https://registry.npmjs.org/@superfunctions/oauth-http/-/oauth-http-0.0.1.tgz","fileCount":18,"integrity":"sha512-WHiDO7y20T+fducaCC40LbfUqoObQBeUnfdwGInSTf7w9TF0z0lc2FzqKeX7xEFM4z0E2OE4o+7h1jjZ7M8DYw==","signatures":[{"sig":"MEQCICiyRHkrxMVQumTTIdnBT+mpZbXvbhslHlz191rZteL3AiAF4SiMi8QVk5NdUNLanRH0ibE6LA5NSlsCF6S++iLi1w==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":49369},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"gitHead":"c566cac4b41a7b4a55ff128aad6471f275f03e22","scripts":{"lint":"echo 'lint not configured'","test":"vitest --config ./vitest.config.ts --run","build":"tsc","clean":"rm -rf dist","typecheck":"tsc --noEmit","test:watch":"vitest --config ./vitest.config.ts --watch"},"_npmUser":{"name":"21native","email":"npm@21n.org"},"repository":{"url":"git+https://github.com/21nCo/super-functions.git","type":"git","directory":"packages/oauth-http"},"_npmVersion":"10.8.2","description":"OAuth HTTP transport contracts for Superfunctions","directories":{},"_nodeVersion":"20.20.2","dependencies":{"@superfunctions/oauth-core":"0.0.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^3.2.4","typescript":"^5.6.0","@types/node":"^22.0.0"},"_npmOperationalInternal":{"tmp":"tmp/oauth-http_0.0.1_1778751219202_0.5362117106302087","host":"s3://npm-registry-packages-npm-production"}},"0.1.0":{"name":"@superfunctions/oauth-http","version":"0.1.0","keywords":["oauth","http","superfunctions"],"author":{"name":"21n"},"license":"MIT","_id":"@superfunctions/oauth-http@0.1.0","maintainers":[{"name":"21native","email":"npm@21n.org"}],"homepage":"https://github.com/21nCo/super-functions#readme","bugs":{"url":"https://github.com/21nCo/super-functions/issues"},"dist":{"shasum":"831dccd7bcfe1c2c15e96bb4f32a319d5c81a5f6","tarball":"https://registry.npmjs.org/@superfunctions/oauth-http/-/oauth-http-0.1.0.tgz","fileCount":18,"integrity":"sha512-MkSZqWlVQ/fboHvBBGLxW2ROY4OOksLiujriqZcDYvkzRtCXEg5t2EO4yGYrJo3hIbIkTg1xCY0VQnDsaY1fBw==","signatures":[{"sig":"MEQCIDQcKhlkegzx+M00kbz/K12xFVyCki5RZW2Tal9OhDHMAiBl5n5coenRZK+XqxR1yw63mRtV2Y69pTGNcWuOuz69mQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":64144},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"gitHead":"e11bd81db6390dbc38303a5f3da6baadbaef0c8b","scripts":{"lint":"echo 'lint not configured'","test":"vitest --config ./vitest.config.ts --run","build":"tsc","clean":"rm -rf dist","typecheck":"tsc --noEmit","test:watch":"vitest --config ./vitest.config.ts --watch"},"_npmUser":{"name":"21native","email":"npm@21n.org"},"repository":{"url":"git+https://github.com/21nCo/super-functions.git","type":"git","directory":"packages/oauth-http"},"_npmVersion":"10.8.2","description":"OAuth HTTP transport contracts for Superfunctions","directories":{},"_nodeVersion":"20.20.2","dependencies":{"@superfunctions/oauth-core":"0.1.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^3.2.4","typescript":"^5.6.0","@types/node":"^22.0.0"},"_npmOperationalInternal":{"tmp":"tmp/oauth-http_0.1.0_1787981842164_0.7051969163000762","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@superfunctions/oauth-http","version":"0.2.0","keywords":["oauth","http","superfunctions"],"author":{"name":"21n"},"license":"MIT","_id":"@superfunctions/oauth-http@0.2.0","maintainers":[{"name":"21native","email":"npm@21n.org"}],"homepage":"https://github.com/21nCo/super-functions#readme","bugs":{"url":"https://github.com/21nCo/super-functions/issues"},"dist":{"shasum":"c0dec117bb8bffd1be0a62ab33e584a24b394ed0","tarball":"https://registry.npmjs.org/@superfunctions/oauth-http/-/oauth-http-0.2.0.tgz","fileCount":18,"integrity":"sha512-Q4E/80hc4BCcW7Oj2bt7QFnhaouicqJxkUWX/H2hyy3VkDzVAYnpOsWKLKsiCP0foQyT6AwZEx+2jfHP+1wy0Q==","signatures":[{"sig":"MEYCIQDZcU5CGiy+HgnJtzstJsw6Vb1DEw8HN7dmAmVwV4ad3AIhAJ9xVnL/0SNIk3WXBrX1VDrwVbdL2Ae2gsTe/jwyX1ju","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEQCIDQaTGGhS/9CJkurZsPlzQg57eocGkMRPHYHY1ca/cfGAiBPepbQTwjAtpRU1eJrsgBpFaeq73SEN+AmDDjdN2OUqw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":67260},"main":"./dist/index.js","type":"module","_from":"file:/tmp/npm-release-1yDif2/superfunctions-oauth-http-0.2.0.tgz","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"gitHead":"11f7e104d2d59f62ac94ab2dd06fc01144d0390b","scripts":{"lint":"tsc --noEmit","test":"vitest --config ./vitest.config.ts --run","build":"tsc","clean":"rm -rf dist","typecheck":"tsc --noEmit","test:watch":"vitest --config ./vitest.config.ts --watch"},"_npmUser":{"name":"21native","email":"npm@21n.org"},"_resolved":"/tmp/npm-release-1yDif2/superfunctions-oauth-http-0.2.0.tgz","_integrity":"sha512-Q4E/80hc4BCcW7Oj2bt7QFnhaouicqJxkUWX/H2hyy3VkDzVAYnpOsWKLKsiCP0foQyT6AwZEx+2jfHP+1wy0Q==","repository":{"url":"git+https://github.com/21nCo/super-functions.git","type":"git","directory":"packages/oauth-http"},"_npmVersion":"10.9.9","description":"OAuth HTTP transport contracts for Superfunctions","directories":{},"_nodeVersion":"22.23.3","dependencies":{"@superfunctions/oauth-core":"0.2.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^3.2.4","typescript":"^5.6.0","@types/node":"^22.0.0"},"_npmOperationalInternal":{"tmp":"tmp/oauth-http_0.2.0_1791104807018_0.25177630539598317","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"_id":"@superfunctions/oauth-http@0.2.1","bugs":{"url":"https://github.com/21nCo/superfunctions/issues"},"dist":{"shasum":"beccb4dbb6c0194d8d7285f1df32be9af9c28a7b","tarball":"https://registry.npmjs.org/@superfunctions/oauth-http/-/oauth-http-0.2.1.tgz","fileCount":18,"integrity":"sha512-YkG4L7H4sYBvmvHLmDzfXGvQCKGyoQqTkICIRZ2fbkQwMVZwVXonNry+skUor1qUrQqSIY6K6uDGRKsQDn1rcg==","signatures":[{"sig":"MEYCIQDP2SHmKvYTOy+XbYczekCCroUyIpoaw2CRfItVcMoPFgIhAKqeGhfgT/CLh6JANJkG3MRVbWKOPJlNImPH0BsGjMSA","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIAq9OXD73cak4XBOQPS0iZs9U4BdjWsRq4r1d+7KKxKKAiAZTiYR0TubbO6QCIBoZ7tEevap17QYxjoO2UzcHGu7lw=="}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@superfunctions%2foauth-http@0.2.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":67259},"main":"./dist/index.js","name":"@superfunctions/oauth-http","type":"module","_from":"file:/home/runner/work/_temp/npm-package/superfunctions-oauth-http-0.2.1.tgz","types":"./dist/index.d.ts","author":{"name":"21n"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"gitHead":"699d9d09932199d660333c57fe7bc646492ea3bf","license":"MIT","scripts":{"lint":"tsc --noEmit","test":"vitest --config ./vitest.config.ts --run","build":"tsc","clean":"rm -rf dist","typecheck":"tsc --noEmit","test:watch":"vitest --config ./vitest.config.ts --watch"},"version":"0.2.1","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"b6450fa1-f7fc-44f9-920e-53aa76aee15c"}},"homepage":"https://github.com/21nCo/superfunctions#readme","keywords":["oauth","http","superfunctions"],"_resolved":"/home/runner/work/_temp/npm-package/superfunctions-oauth-http-0.2.1.tgz","_integrity":"sha512-YkG4L7H4sYBvmvHLmDzfXGvQCKGyoQqTkICIRZ2fbkQwMVZwVXonNry+skUor1qUrQqSIY6K6uDGRKsQDn1rcg==","repository":{"url":"git+https://github.com/21nCo/superfunctions.git","type":"git","directory":"packages/oauth-http"},"_npmVersion":"11.21.0","description":"OAuth HTTP transport contracts for Superfunctions","directories":{},"maintainers":[{"name":"21native","email":"npm@21n.org"}],"_nodeVersion":"22.23.4","dependencies":{"@superfunctions/oauth-core":"0.2.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^3.2.4","typescript":"^5.6.0","@types/node":"^22.0.0"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/oauth-http_0.2.1_1794345041180_0.8097021617111333"}}},"time":{"created":"2026-05-14T09:33:39.093Z","modified":"2026-11-10T21:10:41.659Z","0.0.1":"2026-05-14T09:33:39.348Z","0.1.0":"2026-08-29T05:37:22.297Z","0.2.0":"2026-10-04T09:06:47.101Z","0.2.1":"2026-11-10T21:10:41.285Z"},"bugs":{"url":"https://github.com/21nCo/superfunctions/issues"},"author":{"name":"21n"},"license":"MIT","homepage":"https://github.com/21nCo/superfunctions#readme","keywords":["oauth","http","superfunctions"],"repository":{"url":"git+https://github.com/21nCo/superfunctions.git","type":"git","directory":"packages/oauth-http"},"description":"OAuth HTTP transport contracts for Superfunctions","maintainers":[{"name":"21native","email":"npm@21n.org"}],"readme":"# @superfunctions/oauth-http\n\nReusable OAuth token transport for code exchange, refresh, revocation, retries, and normalized upstream errors.\n\n## Install\n\n```bash\nnpm install @superfunctions/oauth-http @superfunctions/oauth-core @superfunctions/oauth-providers\n```\n\n## Quick Start\n\n```ts\nimport { DefaultOAuthTokenHttpClient } from \"@superfunctions/oauth-http\";\nimport { getOAuthProviderDescriptor } from \"@superfunctions/oauth-providers\";\n\nconst client = new DefaultOAuthTokenHttpClient();\nconst github = getOAuthProviderDescriptor(\"github\");\n\nconst tokenSet = await client.exchangeToken({\n  provider: github,\n  grantType: \"authorization_code\",\n  clientId: process.env.GITHUB_CLIENT_ID!,\n  clientSecret: process.env.GITHUB_CLIENT_SECRET!,\n  code: \"oauth-code\",\n  redirectUri: \"https://app.example/oauth/github/callback\",\n});\n```\n\n## Package Boundary\n\n`@superfunctions/oauth-http` owns OAuth HTTP transport only:\n\n- token endpoint exchange\n- refresh exchange\n- revocation requests\n- retry policy and normalized transport errors\n\nIt does not own state validation, token persistence, or route generation. Pair it with:\n\n- `@superfunctions/oauth-core` for callback invariants\n- `@superfunctions/oauth-flow` for full lifecycle orchestration\n- `@superfunctions/oauth-router` for route exposure\n\n## Production Notes\n\n- Provide secrets through `clientSecretResolver` when your platform resolves secrets dynamically.\n- Tune retries for provider-specific 429/5xx behavior instead of wrapping token calls with ad hoc fetch logic.\n- Treat provider revocation as best effort unless your product contract requires remote confirmation before local cleanup.\n\n## Release validation\n\nRun `npm run typecheck`, `npm run build`, `npm run lint`, and `npm test` in a\nstandalone package checkout with registry-backed dependencies. The transport\nrequires the OAuth core descriptor additions released in `0.2.0`; a workspace\nsource alias cannot substitute for that published prerequisite. The nested-token\ntests exercise user-versus-bot selection, missing-user failures, JSON request\nencoding with Basic authentication, provider headers, and JSON revocation errors.\n\n## Related Packages\n\n- OAuth core primitives: [../oauth-core/README.md](../oauth-core/README.md)\n- Provider descriptors: [../oauth-providers/README.md](../oauth-providers/README.md)\n- Route factories: [../oauth-router/README.md](../oauth-router/README.md)\n","readmeFilename":"README.md"}