align-mcp-remote 0.1.40 → 0.1.41
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.
|
@@ -15632,7 +15632,7 @@ var Client = class extends Protocol {
|
|
|
15632
15632
|
};
|
|
15633
15633
|
|
|
15634
15634
|
// package.json
|
|
15635
|
-
var version2 = "0.1.
|
|
15635
|
+
var version2 = "0.1.40";
|
|
15636
15636
|
|
|
15637
15637
|
// node_modules/pkce-challenge/dist/index.node.js
|
|
15638
15638
|
var crypto;
|
|
@@ -18113,9 +18113,24 @@ async function performDownstreamAuth(authProvider, downstreamResource, callbackP
|
|
|
18113
18113
|
const host = authProvider.options.host || "localhost";
|
|
18114
18114
|
const redirectUrl = `http://${host}:${downstreamCallbackPort}/oauth/callback`;
|
|
18115
18115
|
const scope = downstreamResource.scopes_required?.join(" ") ?? "";
|
|
18116
|
+
const downstreamClientMetadata = {
|
|
18117
|
+
redirect_uris: [redirectUrl],
|
|
18118
|
+
token_endpoint_auth_method: "none",
|
|
18119
|
+
grant_types: ["authorization_code", "refresh_token"],
|
|
18120
|
+
response_types: ["code"],
|
|
18121
|
+
client_name: authProvider.options.clientName || "MCP CLI Client",
|
|
18122
|
+
scope
|
|
18123
|
+
};
|
|
18124
|
+
const downstreamClientInfo = await registerClient(downstreamAs, {
|
|
18125
|
+
metadata: downstreamServerMetadata,
|
|
18126
|
+
clientMetadata: downstreamClientMetadata
|
|
18127
|
+
});
|
|
18128
|
+
debugLog("Registered downstream client", { client_id: downstreamClientInfo.client_id });
|
|
18129
|
+
const downstreamHash = crypto2.createHash("md5").update(downstreamAs).digest("hex");
|
|
18130
|
+
await writeJsonFile(downstreamHash, "downstream_client_info.json", downstreamClientInfo);
|
|
18116
18131
|
const { authorizationUrl, codeVerifier } = await startAuthorization(downstreamAs, {
|
|
18117
18132
|
metadata: downstreamServerMetadata,
|
|
18118
|
-
clientInformation:
|
|
18133
|
+
clientInformation: downstreamClientInfo,
|
|
18119
18134
|
redirectUrl,
|
|
18120
18135
|
scope,
|
|
18121
18136
|
resource: new URL(downstreamResource.resource)
|
|
@@ -18135,7 +18150,7 @@ ${authorizationUrl.toString()}
|
|
|
18135
18150
|
const code = await waitForDownstreamCode();
|
|
18136
18151
|
const tokens = await exchangeAuthorization(downstreamAs, {
|
|
18137
18152
|
metadata: downstreamServerMetadata,
|
|
18138
|
-
clientInformation:
|
|
18153
|
+
clientInformation: downstreamClientInfo,
|
|
18139
18154
|
authorizationCode: code,
|
|
18140
18155
|
codeVerifier,
|
|
18141
18156
|
redirectUri: redirectUrl
|
package/dist/client.js
CHANGED
package/dist/proxy.js
CHANGED