@squidcloud/backend 1.0.468 → 1.0.469
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.
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OAuth configuration for an MCP server
|
|
3
|
+
*/
|
|
4
|
+
export interface McpOAuthOptions {
|
|
5
|
+
/** The ID of an auth integration registered for this app */
|
|
6
|
+
integrationId: string;
|
|
7
|
+
}
|
|
1
8
|
/**
|
|
2
9
|
* Options for the `@mcpServer` decorator.
|
|
3
10
|
*/
|
|
@@ -15,6 +22,21 @@ export interface McpServerOptions {
|
|
|
15
22
|
* This will be exposed in the MCP manifest.
|
|
16
23
|
*/
|
|
17
24
|
version: string;
|
|
25
|
+
/**
|
|
26
|
+
* Optional OAuth configuration. When set, MCP requests must include a valid bearer
|
|
27
|
+
* token from the referenced auth integration. If an `@mcpAuthorizer` is also
|
|
28
|
+
* defined, it runs after OAuth validation with the validated claims available.
|
|
29
|
+
*/
|
|
30
|
+
oauth?: McpOAuthOptions;
|
|
31
|
+
}
|
|
32
|
+
/** Validated auth context available to `@mcpAuthorizer` after OAuth validation. */
|
|
33
|
+
export interface McpAuthContext {
|
|
34
|
+
/** Auth mechanism that produced this context. */
|
|
35
|
+
type: 'oauth';
|
|
36
|
+
/** ID of the auth integration used to validate the request. */
|
|
37
|
+
integrationId: string;
|
|
38
|
+
/** Validated JWT claims (sub, aud, iss, exp, and any custom claims). */
|
|
39
|
+
claims: Record<string, unknown>;
|
|
18
40
|
}
|
|
19
41
|
/**
|
|
20
42
|
* Represents a request to authorize an MCP request.
|
|
@@ -28,4 +50,6 @@ export interface McpAuthorizationRequest {
|
|
|
28
50
|
queryParams: Record<string, string>;
|
|
29
51
|
/** A record of HTTP headers included in the webhook request. */
|
|
30
52
|
headers: Record<string, string>;
|
|
53
|
+
/** Validated auth context, present when this MCP request passed OAuth validation. */
|
|
54
|
+
auth?: McpAuthContext;
|
|
31
55
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@squidcloud/backend",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.469",
|
|
4
4
|
"description": "Squid Cloud's backend SDK",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"typedoc-plugin-markdown": "^4.8.1"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
|
-
"@squidcloud/client": "^1.0.
|
|
38
|
+
"@squidcloud/client": "^1.0.469"
|
|
39
39
|
},
|
|
40
40
|
"engines": {
|
|
41
41
|
"node": ">=20.0.0"
|