avancement planning
This commit is contained in:
+18
-13
@@ -1,10 +1,10 @@
|
||||
import { RequestHandler } from "express";
|
||||
import { ClientRegistrationHandlerOptions } from "./handlers/register.js";
|
||||
import { TokenHandlerOptions } from "./handlers/token.js";
|
||||
import { AuthorizationHandlerOptions } from "./handlers/authorize.js";
|
||||
import { RevocationHandlerOptions } from "./handlers/revoke.js";
|
||||
import { OAuthServerProvider } from "./provider.js";
|
||||
import { OAuthMetadata } from "../../shared/auth.js";
|
||||
import express, { RequestHandler } from 'express';
|
||||
import { ClientRegistrationHandlerOptions } from './handlers/register.js';
|
||||
import { TokenHandlerOptions } from './handlers/token.js';
|
||||
import { AuthorizationHandlerOptions } from './handlers/authorize.js';
|
||||
import { RevocationHandlerOptions } from './handlers/revoke.js';
|
||||
import { OAuthServerProvider } from './provider.js';
|
||||
import { OAuthMetadata } from '../../shared/auth.js';
|
||||
export type AuthRouterOptions = {
|
||||
/**
|
||||
* A provider implementing the actual authorization logic for this router.
|
||||
@@ -32,10 +32,15 @@ export type AuthRouterOptions = {
|
||||
* The resource name to be displayed in protected resource metadata
|
||||
*/
|
||||
resourceName?: string;
|
||||
authorizationOptions?: Omit<AuthorizationHandlerOptions, "provider">;
|
||||
clientRegistrationOptions?: Omit<ClientRegistrationHandlerOptions, "clientsStore">;
|
||||
revocationOptions?: Omit<RevocationHandlerOptions, "provider">;
|
||||
tokenOptions?: Omit<TokenHandlerOptions, "provider">;
|
||||
/**
|
||||
* The URL of the protected resource (RS) whose metadata we advertise.
|
||||
* If not provided, falls back to `baseUrl` and then to `issuerUrl` (AS=RS).
|
||||
*/
|
||||
resourceServerUrl?: URL;
|
||||
authorizationOptions?: Omit<AuthorizationHandlerOptions, 'provider'>;
|
||||
clientRegistrationOptions?: Omit<ClientRegistrationHandlerOptions, 'clientsStore'>;
|
||||
revocationOptions?: Omit<RevocationHandlerOptions, 'provider'>;
|
||||
tokenOptions?: Omit<TokenHandlerOptions, 'provider'>;
|
||||
};
|
||||
export declare const createOAuthMetadata: (options: {
|
||||
provider: OAuthServerProvider;
|
||||
@@ -80,7 +85,7 @@ export type AuthMetadataOptions = {
|
||||
*/
|
||||
resourceName?: string;
|
||||
};
|
||||
export declare function mcpAuthMetadataRouter(options: AuthMetadataOptions): import("express-serve-static-core").Router;
|
||||
export declare function mcpAuthMetadataRouter(options: AuthMetadataOptions): express.Router;
|
||||
/**
|
||||
* Helper function to construct the OAuth 2.0 Protected Resource Metadata URL
|
||||
* from a given server URL. This replaces the path with the standard metadata endpoint.
|
||||
@@ -90,7 +95,7 @@ export declare function mcpAuthMetadataRouter(options: AuthMetadataOptions): imp
|
||||
*
|
||||
* @example
|
||||
* getOAuthProtectedResourceMetadataUrl(new URL('https://api.example.com/mcp'))
|
||||
* // Returns: 'https://api.example.com/.well-known/oauth-protected-resource'
|
||||
* // Returns: 'https://api.example.com/.well-known/oauth-protected-resource/mcp'
|
||||
*/
|
||||
export declare function getOAuthProtectedResourceMetadataUrl(serverUrl: URL): string;
|
||||
//# sourceMappingURL=router.d.ts.map
|
||||
Reference in New Issue
Block a user