mirror of
https://github.com/PrefectHQ/fastmcp.git
synced 2026-08-22 21:44:18 +02:00
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:
parent
9034a2eb4b
commit
10b158baf3
3 changed files with 12 additions and 0 deletions
|
|
@ -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(
|
||||
|
|
|
|||
|
|
@ -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(
|
||||
|
|
|
|||
|
|
@ -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(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue