From 10b158baf33f5e7f8b4f616f115d54739fe0fa88 Mon Sep 17 00:00:00 2001 From: Martin Styk Date: Sun, 2 Aug 2026 15:42:06 +0200 Subject: [PATCH] Forward enable_cimd to Auth0, AWS Cognito and OCI providers (#4719) Signed-off-by: Martin Styk --- fastmcp_slim/fastmcp/server/auth/providers/auth0.py | 4 ++++ fastmcp_slim/fastmcp/server/auth/providers/aws.py | 4 ++++ fastmcp_slim/fastmcp/server/auth/providers/oci.py | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/fastmcp_slim/fastmcp/server/auth/providers/auth0.py b/fastmcp_slim/fastmcp/server/auth/providers/auth0.py index e6a939b51..0a3120a2b 100644 --- a/fastmcp_slim/fastmcp/server/auth/providers/auth0.py +++ b/fastmcp_slim/fastmcp/server/auth/providers/auth0.py @@ -104,6 +104,7 @@ class Auth0Provider(OIDCProxy): fallback_refresh_token_expiry_seconds: int | None = None, fastmcp_access_token_expiry_seconds: int | None = None, token_expiry_threshold_seconds: int = 0, + enable_cimd: bool = True, ) -> None: """Initialize Auth0 OAuth provider. @@ -148,6 +149,8 @@ class Auth0Provider(OIDCProxy): refresh gracefully (e.g. `mcp-remote`). See `OAuthProxy` for details. token_expiry_threshold_seconds: Number of seconds before actual expiry to treat a token as expired, refreshing early to avoid races. Defaults to 0. + enable_cimd: Enable CIMD (Client ID Metadata Document) support for URL-based + client IDs (default True). Set to False to disable. """ # Parse scopes if provided as string auth0_required_scopes = ( @@ -174,6 +177,7 @@ class Auth0Provider(OIDCProxy): fallback_refresh_token_expiry_seconds=fallback_refresh_token_expiry_seconds, fastmcp_access_token_expiry_seconds=fastmcp_access_token_expiry_seconds, token_expiry_threshold_seconds=token_expiry_threshold_seconds, + enable_cimd=enable_cimd, ) logger.debug( diff --git a/fastmcp_slim/fastmcp/server/auth/providers/aws.py b/fastmcp_slim/fastmcp/server/auth/providers/aws.py index 7a3167ca6..01b1bcbd5 100644 --- a/fastmcp_slim/fastmcp/server/auth/providers/aws.py +++ b/fastmcp_slim/fastmcp/server/auth/providers/aws.py @@ -144,6 +144,7 @@ class AWSCognitoProvider(OIDCProxy): fallback_refresh_token_expiry_seconds: int | None = None, fastmcp_access_token_expiry_seconds: int | None = None, token_expiry_threshold_seconds: int = 0, + enable_cimd: bool = True, ): """Initialize AWS Cognito OAuth provider. @@ -188,6 +189,8 @@ class AWSCognitoProvider(OIDCProxy): refresh gracefully (e.g. `mcp-remote`). See `OAuthProxy` for details. token_expiry_threshold_seconds: Number of seconds before actual expiry to treat a token as expired, refreshing early to avoid races. Defaults to 0. + enable_cimd: Enable CIMD (Client ID Metadata Document) support for URL-based + client IDs (default True). Set to False to disable. """ # Parse scopes if provided as string required_scopes_final = ( @@ -223,6 +226,7 @@ class AWSCognitoProvider(OIDCProxy): fallback_refresh_token_expiry_seconds=fallback_refresh_token_expiry_seconds, fastmcp_access_token_expiry_seconds=fastmcp_access_token_expiry_seconds, token_expiry_threshold_seconds=token_expiry_threshold_seconds, + enable_cimd=enable_cimd, ) logger.debug( diff --git a/fastmcp_slim/fastmcp/server/auth/providers/oci.py b/fastmcp_slim/fastmcp/server/auth/providers/oci.py index ffd98ed09..613efd69b 100644 --- a/fastmcp_slim/fastmcp/server/auth/providers/oci.py +++ b/fastmcp_slim/fastmcp/server/auth/providers/oci.py @@ -141,6 +141,7 @@ class OCIProvider(OIDCProxy): fallback_refresh_token_expiry_seconds: int | None = None, fastmcp_access_token_expiry_seconds: int | None = None, token_expiry_threshold_seconds: int = 0, + enable_cimd: bool = True, ) -> None: """Initialize OCI OIDC provider. @@ -174,6 +175,8 @@ class OCIProvider(OIDCProxy): refresh gracefully (e.g. `mcp-remote`). See `OAuthProxy` for details. token_expiry_threshold_seconds: Number of seconds before actual expiry to treat a token as expired, refreshing early to avoid races. Defaults to 0. + enable_cimd: Enable CIMD (Client ID Metadata Document) support for URL-based + client IDs (default True). Set to False to disable. """ # Parse scopes if provided as string oci_required_scopes = ( @@ -200,6 +203,7 @@ class OCIProvider(OIDCProxy): fallback_refresh_token_expiry_seconds=fallback_refresh_token_expiry_seconds, fastmcp_access_token_expiry_seconds=fastmcp_access_token_expiry_seconds, token_expiry_threshold_seconds=token_expiry_threshold_seconds, + enable_cimd=enable_cimd, ) logger.debug(