@dokebi/oauth 0.1.5 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AI.md +1 -1
- package/dist/plugin.js +3 -2
- package/package.json +5 -5
package/AI.md
CHANGED
|
@@ -101,7 +101,7 @@ The `defineOptions` declaration in `src/options.ts` is the parser; the build wri
|
|
|
101
101
|
| Path | Meaning |
|
|
102
102
|
|---|---|
|
|
103
103
|
| `GET /.well-known/oauth-authorization-server` | RFC 8414 metadata, **derived from the options only**: `issuer`, the endpoints (`registration_endpoint` only when open), `response_types_supported: ["code"]`, `grant_types_supported: ["authorization_code", "refresh_token"]`, `code_challenge_methods_supported: ["S256"]`, `token_endpoint_auth_methods_supported: ["none", "client_secret_basic", "client_secret_post"]`, `scopes_supported` (all resources), `client_id_metadata_document_supported: true` (when CIMD is on), `authorization_response_iss_parameter_supported: true` |
|
|
104
|
-
| `GET /.well-known/oauth-protected-resource<path>` | RFC 9728 metadata of the resource whose URI has `<path>` (`https://h/mcp` → `/.well-known/oauth-protected-resource/mcp`): `resource` **exactly as configured** (never re-serialized: `new URL().href` adds a trailing `/` and breaks Claude's comparison), `authorization_servers: [issuer]`, `scopes_supported`, `bearer_methods_supported: ["header"]`, `resource_name`. Any other path under it: 404 `{ error: "not_found", error_description, resource_metadata: [every resource's metadata URL] }` (no log) |
|
|
104
|
+
| `GET /.well-known/oauth-protected-resource<path>` | RFC 9728 metadata of the resource whose URI has `<path>` (`https://h/mcp` → `/.well-known/oauth-protected-resource/mcp`): `resource` **exactly as configured** (never re-serialized: `new URL().href` adds a trailing `/` and breaks Claude's comparison), `authorization_servers: [issuer]`, `scopes_supported`, `bearer_methods_supported: ["header"]`, `resource_name`. Any other path under it: 404 `{ error: "not_found", error_description, resource_metadata: [every resource's metadata URL] }` with `Cache-Control: no-store` (0.1.6, [D-0302](https://git.nyx-zone.com/dokebi/framework/-/blob/main/docs/decisions/D-0302-missing-files-never-cached.md): a resource added later is found at once) (no log) |
|
|
105
105
|
| `GET /oauth/authorize` | the authorization request (§4) |
|
|
106
106
|
| `POST /oauth/authorize` | the consent decision of the app's page (§5); checked by @dokebi/csrf |
|
|
107
107
|
| `POST /oauth/token` | `authorization_code` and `refresh_token` (§6). `Cache-Control: no-store`. Errors are RFC 6749 bodies `{ error, error_description }` |
|
package/dist/plugin.js
CHANGED
|
@@ -620,8 +620,9 @@ class OAuthRuntime {
|
|
|
620
620
|
const path = request.url.split('?', 1)[0];
|
|
621
621
|
const resource = served.find((one) => one.metadataPath === path);
|
|
622
622
|
reply.header('access-control-allow-origin', '*');
|
|
623
|
+
// D-0302: never kept by a CDN or browser (a resource added later is found at once).
|
|
623
624
|
if (!resource)
|
|
624
|
-
return reply.code(404).send(oauth.metadataNotFound());
|
|
625
|
+
return reply.code(404).header('cache-control', 'no-store').send(oauth.metadataNotFound());
|
|
625
626
|
return reply.send(oauth.resourceMetadata(resource));
|
|
626
627
|
};
|
|
627
628
|
const common = { seal: false };
|
|
@@ -768,7 +769,7 @@ function checkHost(server, logger, where, url, apps, option) {
|
|
|
768
769
|
export function defineOAuthPlugin(settings = {}) {
|
|
769
770
|
return definePlugin({
|
|
770
771
|
name: 'dokebi-oauth',
|
|
771
|
-
version: '0.1.
|
|
772
|
+
version: '0.1.6',
|
|
772
773
|
core: '^0.4.2',
|
|
773
774
|
options: declaration,
|
|
774
775
|
contributes: [describePoint],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dokebi/oauth",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.6",
|
|
4
4
|
"description": "OAuth 2.1 authorization server for @dokebi/web on @dokebi/auth tokens: authorization code with PKCE, refresh rotation, revocation, client ID metadata documents, protected resource metadata and route protection.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"dokebi",
|
|
@@ -69,14 +69,14 @@
|
|
|
69
69
|
}
|
|
70
70
|
},
|
|
71
71
|
"devDependencies": {
|
|
72
|
-
"@dokebi/auth": "0.4.
|
|
72
|
+
"@dokebi/auth": "0.4.15",
|
|
73
73
|
"@dokebi/csrf": "0.4.4",
|
|
74
|
-
"@dokebi/db": "0.4.
|
|
74
|
+
"@dokebi/db": "0.4.7",
|
|
75
75
|
"@dokebi/rate-limit": "0.1.2",
|
|
76
76
|
"@dokebi/redis": "0.4.2",
|
|
77
|
-
"@dokebi/session": "0.4.
|
|
77
|
+
"@dokebi/session": "0.4.11",
|
|
78
78
|
"@dokebi/sse": "0.4.7",
|
|
79
|
-
"@dokebi/web": "0.4.
|
|
79
|
+
"@dokebi/web": "0.4.28"
|
|
80
80
|
},
|
|
81
81
|
"dokebi": {
|
|
82
82
|
"schemaVersion": 2,
|