File tree Expand file tree Collapse file tree 7 files changed +6
-236
lines changed
examples/servers/proxy_oauth Expand file tree Collapse file tree 7 files changed +6
-236
lines changed Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1212from typing import TYPE_CHECKING
1313
1414from mcp .server .auth .proxy import (
15- configure_colored_logging ,
1615 create_proxy_routes ,
1716 fetch_upstream_metadata ,
1817)
18+ from mcp .server .fastmcp .utilities .logging import configure_logging
1919
2020# For *build_proxy_server* we need a lazy import to avoid a circular reference
2121# during the initial package import sequence (FastMCP -> auth -> proxy ->
@@ -37,7 +37,7 @@ def __getattr__(name: str): # noqa: D401
3737# ---------------------------------------------------------------------------
3838
3939__all__ : list [str ] = [
40- "configure_colored_logging " ,
40+ "configure_logging " ,
4141 "create_proxy_routes" ,
4242 "fetch_upstream_metadata" ,
4343 "build_proxy_server" ,
Original file line number Diff line number Diff line change 33This sub-package turns the demo-level transparent OAuth proxy into a reusable
44component:
55
6- * configure_colored_logging – colourised root-logger setup identical to the
7- original example.
86* create_proxy_routes(provider) – returns the Starlette routes that expose the
97 proxy endpoints (/authorize, /revoke …).
108* build_proxy_server() – convenience helper that wires everything into a
1917from __future__ import annotations
2018
2119# Public re-exports
22- from .logging import configure_colored_logging
2320from .routes import create_proxy_routes , fetch_upstream_metadata
2421
2522__all__ : list [str ] = [
26- "configure_colored_logging" ,
2723 "create_proxy_routes" ,
2824 "fetch_upstream_metadata" ,
2925]
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1313from starlette .responses import JSONResponse , RedirectResponse , Response
1414from starlette .routing import Route
1515
16- from . logging import configure_colored_logging
16+ from mcp . server . fastmcp . utilities . logging import configure_logging
1717
1818__all__ = ["fetch_upstream_metadata" , "create_proxy_routes" ]
1919
@@ -72,7 +72,7 @@ def create_proxy_routes(provider: Any) -> list[Route]: # type: ignore[valid-typ
7272 `TransparentOAuthProxyProvider` (duck-typed here to avoid circular imports).
7373 """
7474
75- configure_colored_logging () # ensure log format if not already set
75+ configure_logging () # ensure log format if not already set
7676
7777 s = provider ._s # access its validated settings (_Settings)
7878
Original file line number Diff line number Diff line change 99
1010from mcp .server .auth .settings import AuthSettings , ClientRegistrationOptions
1111from mcp .server .fastmcp import FastMCP
12+ from mcp .server .fastmcp .utilities .logging import configure_logging
1213
1314from ..providers .transparent_proxy import TransparentOAuthProxyProvider
14- from .logging import configure_colored_logging
1515
1616if TYPE_CHECKING : # pragma: no cover – typing-only imports
1717 from mcp .server .auth .providers .transparent_proxy import _Settings as ProxySettings
@@ -45,7 +45,7 @@ def build_proxy_server( # noqa: D401,E501
4545 if settings is None :
4646 settings = ProxySettings .load ()
4747
48- configure_colored_logging (level = log_level ) # type: ignore[arg-type]
48+ configure_logging (level = log_level ) # type: ignore[arg-type]
4949
5050 provider = TransparentOAuthProxyProvider (settings = settings ) # type: ignore[arg-type]
5151
You can’t perform that action at this time.
0 commit comments