π The fast, Pythonic way to build MCP servers and clients.
Forward enable_cimd to Auth0, AWS Cognito and OCI providers (#4719)
Martin Styk10b158baf33f
diff --git a/fastmcp_slim/fastmcp/server/auth/providers/auth0.py b/fastmcp_slim/fastmcp/server/auth/providers/auth0.pyindex 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 totreat 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 stringauth0_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.pyindex 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 totreat 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 stringrequired_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.pyindex 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 totreat 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 stringoci_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(