@mcpfn/auth 0.0.5 → 0.0.7
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/README.md +36 -0
- package/dist/index.cjs +62 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +25 -1
- package/dist/index.d.ts +25 -1
- package/dist/index.js +62 -2
- package/dist/index.js.map +1 -1
- package/package.json +24 -10
package/dist/index.d.cts
CHANGED
|
@@ -182,6 +182,23 @@ declare function validateMcpAuthorizationRequest(options: {
|
|
|
182
182
|
allowedResources?: ReadonlyArray<string | URL>;
|
|
183
183
|
supportedScopes?: ReadonlyArray<string>;
|
|
184
184
|
}): McpFnValidatedAuthorizationRequest;
|
|
185
|
+
interface McpFnAuthorizationErrorRenderInput {
|
|
186
|
+
error: McpFnHostedAuthorizationError;
|
|
187
|
+
client: McpFnNormalizedClientRegistration;
|
|
188
|
+
request: Request;
|
|
189
|
+
}
|
|
190
|
+
interface McpFnAuthorizationErrorOptions {
|
|
191
|
+
/**
|
|
192
|
+
* Client registration sources whose matched redirect URI may receive OAuth
|
|
193
|
+
* error redirects from the authorization endpoint. Defaults to
|
|
194
|
+
* `["pre-registered", "enterprise"]`: dynamically registered and Client ID
|
|
195
|
+
* Metadata Document redirect URIs are chosen by unauthenticated parties, so
|
|
196
|
+
* redirecting errors to them would make the issuer an open redirector.
|
|
197
|
+
*/
|
|
198
|
+
redirectSources?: McpFnClientRegistrationSource[];
|
|
199
|
+
/** Replaces the default HTML error page for non-redirected errors. */
|
|
200
|
+
render?(input: McpFnAuthorizationErrorRenderInput): Response | Promise<Response>;
|
|
201
|
+
}
|
|
185
202
|
interface McpFnAuthorizationCompatibilityOptions {
|
|
186
203
|
issuer: string | URL;
|
|
187
204
|
/** Allow HTTP only for literal loopback issuers in controlled local testing. */
|
|
@@ -201,6 +218,8 @@ interface McpFnAuthorizationCompatibilityOptions {
|
|
|
201
218
|
supportedScopes?: string[];
|
|
202
219
|
allowedResources?: Array<string | URL>;
|
|
203
220
|
redirectPolicy?: McpFnRedirectPolicy;
|
|
221
|
+
/** Controls how authorization-endpoint validation errors reach the browser. */
|
|
222
|
+
authorizationErrors?: McpFnAuthorizationErrorOptions;
|
|
204
223
|
clientMetadataDocuments?: {
|
|
205
224
|
enabled: boolean;
|
|
206
225
|
/** Required allowlist/policy hook before fetching an external client document. */
|
|
@@ -237,6 +256,11 @@ interface McpFnAuthorizationServerMetadataOptions {
|
|
|
237
256
|
*/
|
|
238
257
|
declare function createMcpAuthorizationCompatibilityHandler(options: McpFnAuthorizationCompatibilityOptions): (request: Request) => Promise<Response>;
|
|
239
258
|
declare function createMcpAuthorizationServerMetadata(options: McpFnAuthorizationServerMetadataOptions): Record<string, unknown>;
|
|
259
|
+
/**
|
|
260
|
+
* Default authorization-endpoint error page: HTTP 400, HTML-escaped OAuth
|
|
261
|
+
* error code and description, no redirect URI link and no reflected state.
|
|
262
|
+
*/
|
|
263
|
+
declare function renderMcpAuthorizationErrorPage(error: McpFnHostedAuthorizationError): Response;
|
|
240
264
|
|
|
241
265
|
type McpFnOAuthCredentialScope = "all" | "client" | "tokens" | "verifier" | "discovery" | "state";
|
|
242
266
|
interface McpFnOAuthSessionStore {
|
|
@@ -422,4 +446,4 @@ interface McpFnAuthProviderAdapter<TSession extends McpFnAuthSessionLike> {
|
|
|
422
446
|
declare function createMcpFnAuthProviderAdapter<TSession extends McpFnAuthSessionLike>(options: McpFnAuthProviderAdapterOptions<TSession>): McpFnAuthProviderAdapter<TSession>;
|
|
423
447
|
declare function createAuthProviderMcpHandler<TSession extends McpFnAuthSessionLike>(mcpHandler: McpFnWebStandardHandler, options: McpFnAuthProviderAdapterOptions<TSession>): (request: Request) => Promise<Response>;
|
|
424
448
|
|
|
425
|
-
export { type DiagnoseMcpAuthorizationOptions, MCP_ENTERPRISE_MANAGED_AUTHORIZATION_EXTENSION_ID, MCP_ID_JAG_GRANT_PROFILE, type McpFnAuthProviderAdapter, type McpFnAuthProviderAdapterOptions, type McpFnAuthProviderLike, type McpFnAuthSessionLike, type McpFnAuthorizationCompatibilityOptions, type McpFnAuthorizationDiagnosticReport, type McpFnAuthorizationDiagnosticStep, type McpFnAuthorizationServerMetadata, type McpFnAuthorizationServerMetadataOptions, type McpFnBearerAuthProviderLike, type McpFnClientRegistrationSource, type McpFnEncryptedSessionRecord, type McpFnEncryptedSessionRecordStore, type McpFnHostedAuthorizationCapabilities, McpFnHostedAuthorizationError, type McpFnHostedClientAuthentication, type McpFnHostedClientRegistry, type McpFnHostedTokenAuthority, type McpFnHostedTokenEndpointAuthMethod, type McpFnHostedTokenSet, type McpFnNormalizedClientRegistration, type McpFnOAuthClientDiagnostic, type McpFnOAuthClientPhase, McpFnOAuthClientProvider, type McpFnOAuthClientProviderOptions, type McpFnOAuthCredentialScope, type McpFnOAuthResourceServerOptions, type McpFnOAuthSessionStore, type McpFnPrincipal, type McpFnPrivateUseSchemePolicy, type McpFnProtectedResourceMetadata, type McpFnProtectedResourceOptions, type McpFnRedirectMatch, McpFnRedirectMismatchError, type McpFnRedirectPolicy, type McpFnRequestAuthProviderLike, type McpFnValidatedAuthorizationRequest, type McpFnWebStandardHandler, MemoryMcpFnOAuthSessionStore, bearerChallengeResponse, createAuthProviderMcpHandler, createEncryptedMcpFnOAuthSessionStore, createMcpAuthorizationCompatibilityHandler, createMcpAuthorizationServerMetadata, createMcpFnAuthProviderAdapter, createMcpFnOAuthClientProvider, createOAuthResourceServerHandler, createProtectedResourceMetadata, diagnoseMcpAuthorization, enterpriseManagedAuthorizationClientMetadata, isMcpFnCompatiblePrivateUseRedirect, matchMcpRedirectUri, normalizeMcpClientRegistration, normalizeMcpRedirectUri, protectedResourceMetadataUrl, readBearerToken, validateMcpAuthorizationRequest, withEnterpriseManagedAuthorization };
|
|
449
|
+
export { type DiagnoseMcpAuthorizationOptions, MCP_ENTERPRISE_MANAGED_AUTHORIZATION_EXTENSION_ID, MCP_ID_JAG_GRANT_PROFILE, type McpFnAuthProviderAdapter, type McpFnAuthProviderAdapterOptions, type McpFnAuthProviderLike, type McpFnAuthSessionLike, type McpFnAuthorizationCompatibilityOptions, type McpFnAuthorizationDiagnosticReport, type McpFnAuthorizationDiagnosticStep, type McpFnAuthorizationErrorOptions, type McpFnAuthorizationErrorRenderInput, type McpFnAuthorizationServerMetadata, type McpFnAuthorizationServerMetadataOptions, type McpFnBearerAuthProviderLike, type McpFnClientRegistrationSource, type McpFnEncryptedSessionRecord, type McpFnEncryptedSessionRecordStore, type McpFnHostedAuthorizationCapabilities, McpFnHostedAuthorizationError, type McpFnHostedClientAuthentication, type McpFnHostedClientRegistry, type McpFnHostedTokenAuthority, type McpFnHostedTokenEndpointAuthMethod, type McpFnHostedTokenSet, type McpFnNormalizedClientRegistration, type McpFnOAuthClientDiagnostic, type McpFnOAuthClientPhase, McpFnOAuthClientProvider, type McpFnOAuthClientProviderOptions, type McpFnOAuthCredentialScope, type McpFnOAuthResourceServerOptions, type McpFnOAuthSessionStore, type McpFnPrincipal, type McpFnPrivateUseSchemePolicy, type McpFnProtectedResourceMetadata, type McpFnProtectedResourceOptions, type McpFnRedirectMatch, McpFnRedirectMismatchError, type McpFnRedirectPolicy, type McpFnRequestAuthProviderLike, type McpFnValidatedAuthorizationRequest, type McpFnWebStandardHandler, MemoryMcpFnOAuthSessionStore, bearerChallengeResponse, createAuthProviderMcpHandler, createEncryptedMcpFnOAuthSessionStore, createMcpAuthorizationCompatibilityHandler, createMcpAuthorizationServerMetadata, createMcpFnAuthProviderAdapter, createMcpFnOAuthClientProvider, createOAuthResourceServerHandler, createProtectedResourceMetadata, diagnoseMcpAuthorization, enterpriseManagedAuthorizationClientMetadata, isMcpFnCompatiblePrivateUseRedirect, matchMcpRedirectUri, normalizeMcpClientRegistration, normalizeMcpRedirectUri, protectedResourceMetadataUrl, readBearerToken, renderMcpAuthorizationErrorPage, validateMcpAuthorizationRequest, withEnterpriseManagedAuthorization };
|
package/dist/index.d.ts
CHANGED
|
@@ -182,6 +182,23 @@ declare function validateMcpAuthorizationRequest(options: {
|
|
|
182
182
|
allowedResources?: ReadonlyArray<string | URL>;
|
|
183
183
|
supportedScopes?: ReadonlyArray<string>;
|
|
184
184
|
}): McpFnValidatedAuthorizationRequest;
|
|
185
|
+
interface McpFnAuthorizationErrorRenderInput {
|
|
186
|
+
error: McpFnHostedAuthorizationError;
|
|
187
|
+
client: McpFnNormalizedClientRegistration;
|
|
188
|
+
request: Request;
|
|
189
|
+
}
|
|
190
|
+
interface McpFnAuthorizationErrorOptions {
|
|
191
|
+
/**
|
|
192
|
+
* Client registration sources whose matched redirect URI may receive OAuth
|
|
193
|
+
* error redirects from the authorization endpoint. Defaults to
|
|
194
|
+
* `["pre-registered", "enterprise"]`: dynamically registered and Client ID
|
|
195
|
+
* Metadata Document redirect URIs are chosen by unauthenticated parties, so
|
|
196
|
+
* redirecting errors to them would make the issuer an open redirector.
|
|
197
|
+
*/
|
|
198
|
+
redirectSources?: McpFnClientRegistrationSource[];
|
|
199
|
+
/** Replaces the default HTML error page for non-redirected errors. */
|
|
200
|
+
render?(input: McpFnAuthorizationErrorRenderInput): Response | Promise<Response>;
|
|
201
|
+
}
|
|
185
202
|
interface McpFnAuthorizationCompatibilityOptions {
|
|
186
203
|
issuer: string | URL;
|
|
187
204
|
/** Allow HTTP only for literal loopback issuers in controlled local testing. */
|
|
@@ -201,6 +218,8 @@ interface McpFnAuthorizationCompatibilityOptions {
|
|
|
201
218
|
supportedScopes?: string[];
|
|
202
219
|
allowedResources?: Array<string | URL>;
|
|
203
220
|
redirectPolicy?: McpFnRedirectPolicy;
|
|
221
|
+
/** Controls how authorization-endpoint validation errors reach the browser. */
|
|
222
|
+
authorizationErrors?: McpFnAuthorizationErrorOptions;
|
|
204
223
|
clientMetadataDocuments?: {
|
|
205
224
|
enabled: boolean;
|
|
206
225
|
/** Required allowlist/policy hook before fetching an external client document. */
|
|
@@ -237,6 +256,11 @@ interface McpFnAuthorizationServerMetadataOptions {
|
|
|
237
256
|
*/
|
|
238
257
|
declare function createMcpAuthorizationCompatibilityHandler(options: McpFnAuthorizationCompatibilityOptions): (request: Request) => Promise<Response>;
|
|
239
258
|
declare function createMcpAuthorizationServerMetadata(options: McpFnAuthorizationServerMetadataOptions): Record<string, unknown>;
|
|
259
|
+
/**
|
|
260
|
+
* Default authorization-endpoint error page: HTTP 400, HTML-escaped OAuth
|
|
261
|
+
* error code and description, no redirect URI link and no reflected state.
|
|
262
|
+
*/
|
|
263
|
+
declare function renderMcpAuthorizationErrorPage(error: McpFnHostedAuthorizationError): Response;
|
|
240
264
|
|
|
241
265
|
type McpFnOAuthCredentialScope = "all" | "client" | "tokens" | "verifier" | "discovery" | "state";
|
|
242
266
|
interface McpFnOAuthSessionStore {
|
|
@@ -422,4 +446,4 @@ interface McpFnAuthProviderAdapter<TSession extends McpFnAuthSessionLike> {
|
|
|
422
446
|
declare function createMcpFnAuthProviderAdapter<TSession extends McpFnAuthSessionLike>(options: McpFnAuthProviderAdapterOptions<TSession>): McpFnAuthProviderAdapter<TSession>;
|
|
423
447
|
declare function createAuthProviderMcpHandler<TSession extends McpFnAuthSessionLike>(mcpHandler: McpFnWebStandardHandler, options: McpFnAuthProviderAdapterOptions<TSession>): (request: Request) => Promise<Response>;
|
|
424
448
|
|
|
425
|
-
export { type DiagnoseMcpAuthorizationOptions, MCP_ENTERPRISE_MANAGED_AUTHORIZATION_EXTENSION_ID, MCP_ID_JAG_GRANT_PROFILE, type McpFnAuthProviderAdapter, type McpFnAuthProviderAdapterOptions, type McpFnAuthProviderLike, type McpFnAuthSessionLike, type McpFnAuthorizationCompatibilityOptions, type McpFnAuthorizationDiagnosticReport, type McpFnAuthorizationDiagnosticStep, type McpFnAuthorizationServerMetadata, type McpFnAuthorizationServerMetadataOptions, type McpFnBearerAuthProviderLike, type McpFnClientRegistrationSource, type McpFnEncryptedSessionRecord, type McpFnEncryptedSessionRecordStore, type McpFnHostedAuthorizationCapabilities, McpFnHostedAuthorizationError, type McpFnHostedClientAuthentication, type McpFnHostedClientRegistry, type McpFnHostedTokenAuthority, type McpFnHostedTokenEndpointAuthMethod, type McpFnHostedTokenSet, type McpFnNormalizedClientRegistration, type McpFnOAuthClientDiagnostic, type McpFnOAuthClientPhase, McpFnOAuthClientProvider, type McpFnOAuthClientProviderOptions, type McpFnOAuthCredentialScope, type McpFnOAuthResourceServerOptions, type McpFnOAuthSessionStore, type McpFnPrincipal, type McpFnPrivateUseSchemePolicy, type McpFnProtectedResourceMetadata, type McpFnProtectedResourceOptions, type McpFnRedirectMatch, McpFnRedirectMismatchError, type McpFnRedirectPolicy, type McpFnRequestAuthProviderLike, type McpFnValidatedAuthorizationRequest, type McpFnWebStandardHandler, MemoryMcpFnOAuthSessionStore, bearerChallengeResponse, createAuthProviderMcpHandler, createEncryptedMcpFnOAuthSessionStore, createMcpAuthorizationCompatibilityHandler, createMcpAuthorizationServerMetadata, createMcpFnAuthProviderAdapter, createMcpFnOAuthClientProvider, createOAuthResourceServerHandler, createProtectedResourceMetadata, diagnoseMcpAuthorization, enterpriseManagedAuthorizationClientMetadata, isMcpFnCompatiblePrivateUseRedirect, matchMcpRedirectUri, normalizeMcpClientRegistration, normalizeMcpRedirectUri, protectedResourceMetadataUrl, readBearerToken, validateMcpAuthorizationRequest, withEnterpriseManagedAuthorization };
|
|
449
|
+
export { type DiagnoseMcpAuthorizationOptions, MCP_ENTERPRISE_MANAGED_AUTHORIZATION_EXTENSION_ID, MCP_ID_JAG_GRANT_PROFILE, type McpFnAuthProviderAdapter, type McpFnAuthProviderAdapterOptions, type McpFnAuthProviderLike, type McpFnAuthSessionLike, type McpFnAuthorizationCompatibilityOptions, type McpFnAuthorizationDiagnosticReport, type McpFnAuthorizationDiagnosticStep, type McpFnAuthorizationErrorOptions, type McpFnAuthorizationErrorRenderInput, type McpFnAuthorizationServerMetadata, type McpFnAuthorizationServerMetadataOptions, type McpFnBearerAuthProviderLike, type McpFnClientRegistrationSource, type McpFnEncryptedSessionRecord, type McpFnEncryptedSessionRecordStore, type McpFnHostedAuthorizationCapabilities, McpFnHostedAuthorizationError, type McpFnHostedClientAuthentication, type McpFnHostedClientRegistry, type McpFnHostedTokenAuthority, type McpFnHostedTokenEndpointAuthMethod, type McpFnHostedTokenSet, type McpFnNormalizedClientRegistration, type McpFnOAuthClientDiagnostic, type McpFnOAuthClientPhase, McpFnOAuthClientProvider, type McpFnOAuthClientProviderOptions, type McpFnOAuthCredentialScope, type McpFnOAuthResourceServerOptions, type McpFnOAuthSessionStore, type McpFnPrincipal, type McpFnPrivateUseSchemePolicy, type McpFnProtectedResourceMetadata, type McpFnProtectedResourceOptions, type McpFnRedirectMatch, McpFnRedirectMismatchError, type McpFnRedirectPolicy, type McpFnRequestAuthProviderLike, type McpFnValidatedAuthorizationRequest, type McpFnWebStandardHandler, MemoryMcpFnOAuthSessionStore, bearerChallengeResponse, createAuthProviderMcpHandler, createEncryptedMcpFnOAuthSessionStore, createMcpAuthorizationCompatibilityHandler, createMcpAuthorizationServerMetadata, createMcpFnAuthProviderAdapter, createMcpFnOAuthClientProvider, createOAuthResourceServerHandler, createProtectedResourceMetadata, diagnoseMcpAuthorization, enterpriseManagedAuthorizationClientMetadata, isMcpFnCompatiblePrivateUseRedirect, matchMcpRedirectUri, normalizeMcpClientRegistration, normalizeMcpRedirectUri, protectedResourceMetadataUrl, readBearerToken, renderMcpAuthorizationErrorPage, validateMcpAuthorizationRequest, withEnterpriseManagedAuthorization };
|
package/dist/index.js
CHANGED
|
@@ -6199,8 +6199,19 @@ function normalizeAuthorizationResource(value, allowedResources) {
|
|
|
6199
6199
|
}
|
|
6200
6200
|
return resource;
|
|
6201
6201
|
}
|
|
6202
|
+
var DEFAULT_AUTHORIZATION_ERROR_REDIRECT_SOURCES = [
|
|
6203
|
+
"pre-registered",
|
|
6204
|
+
"enterprise"
|
|
6205
|
+
];
|
|
6206
|
+
var CLIENT_REGISTRATION_SOURCES = /* @__PURE__ */ new Set([
|
|
6207
|
+
"pre-registered",
|
|
6208
|
+
"dynamic",
|
|
6209
|
+
"client-metadata-document",
|
|
6210
|
+
"enterprise"
|
|
6211
|
+
]);
|
|
6202
6212
|
function createMcpAuthorizationCompatibilityHandler(options) {
|
|
6203
6213
|
validateClientMetadataDocumentOptions(options.clientMetadataDocuments);
|
|
6214
|
+
validateAuthorizationErrorOptions(options.authorizationErrors);
|
|
6204
6215
|
const issuer = normalizeIssuer(options.issuer, options.allowInsecureLoopbackIssuer ?? false);
|
|
6205
6216
|
const rfc8414IssuerPath = issuer.pathname === "/" ? "" : issuer.pathname;
|
|
6206
6217
|
const issuerPath = issuer.pathname === "/" ? "" : trimTrailingSlashes(issuer.pathname);
|
|
@@ -6442,7 +6453,7 @@ async function handleAuthorizationRequest(options, url2, request) {
|
|
|
6442
6453
|
clientId,
|
|
6443
6454
|
registrationSource: client.source
|
|
6444
6455
|
});
|
|
6445
|
-
return
|
|
6456
|
+
return authorizationErrorResponse(options, client, trustedRedirect, url2, request, error2);
|
|
6446
6457
|
}
|
|
6447
6458
|
await emit(options, "authorization-request", "succeeded", void 0, {
|
|
6448
6459
|
clientId,
|
|
@@ -6451,6 +6462,55 @@ async function handleAuthorizationRequest(options, url2, request) {
|
|
|
6451
6462
|
});
|
|
6452
6463
|
return options.authorize(validated, request);
|
|
6453
6464
|
}
|
|
6465
|
+
function validateAuthorizationErrorOptions(options) {
|
|
6466
|
+
if (options === void 0) return;
|
|
6467
|
+
const sources = options.redirectSources;
|
|
6468
|
+
if (sources !== void 0 && (!Array.isArray(sources) || sources.some((source) => !CLIENT_REGISTRATION_SOURCES.has(source)))) {
|
|
6469
|
+
throw new TypeError(
|
|
6470
|
+
"authorizationErrors.redirectSources must contain only client registration sources"
|
|
6471
|
+
);
|
|
6472
|
+
}
|
|
6473
|
+
if (options.render !== void 0 && typeof options.render !== "function") {
|
|
6474
|
+
throw new TypeError("authorizationErrors.render must be a function");
|
|
6475
|
+
}
|
|
6476
|
+
}
|
|
6477
|
+
async function authorizationErrorResponse(options, client, redirectUri, authorizationUrl, request, error2) {
|
|
6478
|
+
const errors = options.authorizationErrors;
|
|
6479
|
+
const redirectSources = errors?.redirectSources ?? DEFAULT_AUTHORIZATION_ERROR_REDIRECT_SOURCES;
|
|
6480
|
+
if (redirectSources.includes(client.source)) {
|
|
6481
|
+
return trustedAuthorizationErrorRedirect(redirectUri, authorizationUrl, error2);
|
|
6482
|
+
}
|
|
6483
|
+
if (errors?.render) return errors.render({ error: error2, client, request });
|
|
6484
|
+
return renderMcpAuthorizationErrorPage(error2);
|
|
6485
|
+
}
|
|
6486
|
+
function renderMcpAuthorizationErrorPage(error2) {
|
|
6487
|
+
const body = [
|
|
6488
|
+
"<!doctype html>",
|
|
6489
|
+
'<html lang="en">',
|
|
6490
|
+
'<head><meta charset="utf-8"><meta name="robots" content="noindex">',
|
|
6491
|
+
"<title>Authorization request failed</title></head>",
|
|
6492
|
+
"<body>",
|
|
6493
|
+
"<h1>Authorization request failed</h1>",
|
|
6494
|
+
`<p>Error: <code>${escapeHtml(error2.code)}</code></p>`,
|
|
6495
|
+
`<p>${escapeHtml(error2.message)}</p>`,
|
|
6496
|
+
"</body>",
|
|
6497
|
+
"</html>"
|
|
6498
|
+
].join("\n");
|
|
6499
|
+
return new Response(body, {
|
|
6500
|
+
status: 400,
|
|
6501
|
+
headers: {
|
|
6502
|
+
"cache-control": "no-store",
|
|
6503
|
+
pragma: "no-cache",
|
|
6504
|
+
"content-type": "text/html; charset=utf-8",
|
|
6505
|
+
"content-security-policy": "default-src 'none'; frame-ancestors 'none'",
|
|
6506
|
+
"referrer-policy": "no-referrer",
|
|
6507
|
+
"x-content-type-options": "nosniff"
|
|
6508
|
+
}
|
|
6509
|
+
});
|
|
6510
|
+
}
|
|
6511
|
+
function escapeHtml(value) {
|
|
6512
|
+
return value.replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">").replaceAll('"', """).replaceAll("'", "'");
|
|
6513
|
+
}
|
|
6454
6514
|
function trustedAuthorizationErrorRedirect(redirectUri, authorizationUrl, error2) {
|
|
6455
6515
|
const redirect = new URL(redirectUri);
|
|
6456
6516
|
redirect.searchParams.set("error", error2.code);
|
|
@@ -7703,6 +7763,6 @@ function defaultPrincipal(session) {
|
|
|
7703
7763
|
};
|
|
7704
7764
|
}
|
|
7705
7765
|
|
|
7706
|
-
export { MCP_ENTERPRISE_MANAGED_AUTHORIZATION_EXTENSION_ID, MCP_ID_JAG_GRANT_PROFILE, McpFnHostedAuthorizationError, McpFnOAuthClientProvider, McpFnRedirectMismatchError, MemoryMcpFnOAuthSessionStore, bearerChallengeResponse, createAuthProviderMcpHandler, createEncryptedMcpFnOAuthSessionStore, createMcpAuthorizationCompatibilityHandler, createMcpAuthorizationServerMetadata, createMcpFnAuthProviderAdapter, createMcpFnOAuthClientProvider, createOAuthResourceServerHandler, createProtectedResourceMetadata, diagnoseMcpAuthorization, enterpriseManagedAuthorizationClientMetadata, isMcpFnCompatiblePrivateUseRedirect, matchMcpRedirectUri, normalizeMcpClientRegistration, normalizeMcpRedirectUri, protectedResourceMetadataUrl, readBearerToken, validateMcpAuthorizationRequest, withEnterpriseManagedAuthorization };
|
|
7766
|
+
export { MCP_ENTERPRISE_MANAGED_AUTHORIZATION_EXTENSION_ID, MCP_ID_JAG_GRANT_PROFILE, McpFnHostedAuthorizationError, McpFnOAuthClientProvider, McpFnRedirectMismatchError, MemoryMcpFnOAuthSessionStore, bearerChallengeResponse, createAuthProviderMcpHandler, createEncryptedMcpFnOAuthSessionStore, createMcpAuthorizationCompatibilityHandler, createMcpAuthorizationServerMetadata, createMcpFnAuthProviderAdapter, createMcpFnOAuthClientProvider, createOAuthResourceServerHandler, createProtectedResourceMetadata, diagnoseMcpAuthorization, enterpriseManagedAuthorizationClientMetadata, isMcpFnCompatiblePrivateUseRedirect, matchMcpRedirectUri, normalizeMcpClientRegistration, normalizeMcpRedirectUri, protectedResourceMetadataUrl, readBearerToken, renderMcpAuthorizationErrorPage, validateMcpAuthorizationRequest, withEnterpriseManagedAuthorization };
|
|
7707
7767
|
//# sourceMappingURL=index.js.map
|
|
7708
7768
|
//# sourceMappingURL=index.js.map
|