Forward enable_cimd to Auth0, AWS Cognito and OCI providers (#4719)

Signed-off-by: Martin Styk <mart.styk@gmail.com>
This commit is contained in:
Martin Styk 2026-08-02 15:42:06 +02:00 committed by GitHub
commit 10b158baf3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 12 additions and 0 deletions

View file

@ -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(

View file

@ -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(

View file

@ -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(