Update docstrings

This commit is contained in:
William Easton 2025-10-08 18:45:09 -04:00
commit 9a076cd5f6
No known key found for this signature in database
8 changed files with 9 additions and 17 deletions

View file

@ -156,7 +156,7 @@ class OAuth(OAuthClientProvider):
scopes: OAuth scopes to request. Can be a
space-separated string or a list of strings.
client_name: Name for this client during registration
token_storage: AsyncKeyValue for token storage, the default disk store is used if not provided
token_storage: An AsyncKeyValue-compatible token store, tokens are stored in memory if not provided
additional_client_metadata: Extra fields for OAuthClientMetadata
callback_port: Fixed port for OAuth callback (default: random available port)
"""

View file

@ -337,7 +337,7 @@ class OAuthProxy(OAuthProvider):
Example: {"audience": "https://api.example.com"}
extra_token_params: Additional parameters to forward to the upstream token endpoint.
Useful for provider-specific parameters during token exchange.
client_storage: Storage implementation for OAuth client registrations.
client_storage: An AsyncKeyValue-compatible store for client registrations, registrations are stored in memory if not provided
"""
# Always enable DCR since we implement it locally for MCP clients
client_registration_options = ClientRegistrationOptions(

View file

@ -236,8 +236,7 @@ class OIDCProxy(OAuthProxy):
If None (default), only localhost redirect URIs are allowed.
If empty list, all redirect URIs are allowed (not recommended for production).
These are for MCP clients performing loopback redirects, NOT for the upstream OAuth app.
client_storage: Storage implementation for OAuth client registrations.
Defaults to file-based storage if not specified.
client_storage: An AsyncKeyValue-compatible store for client registrations, registrations are stored in memory if not provided
token_endpoint_auth_method: Token endpoint authentication method for upstream server.
Common values: "client_secret_basic", "client_secret_post", "none".
If None, authlib will use its default (typically "client_secret_basic").

View file

@ -106,8 +106,7 @@ class Auth0Provider(OIDCProxy):
redirect_path: Redirect path configured in Auth0 application
allowed_client_redirect_uris: List of allowed redirect URI patterns for MCP clients.
If None (default), all URIs are allowed. If empty list, no URIs are allowed.
client_storage: Storage implementation for OAuth client registrations.
Defaults to file-based storage if not specified.
client_storage: An AsyncKeyValue-compatible store for client registrations, registrations are stored in memory if not provided
"""
settings = Auth0ProviderSettings.model_validate(
{

View file

@ -6,10 +6,9 @@ using the OAuth Proxy pattern for non-DCR OAuth flows.
from __future__ import annotations
import httpx
from key_value.aio.protocols import AsyncKeyValue
from typing import TYPE_CHECKING
from key_value.aio.protocols import AsyncKeyValue
from pydantic import SecretStr, field_validator
from pydantic_settings import BaseSettings, SettingsConfigDict
@ -107,7 +106,6 @@ class AzureProvider(OAuthProxy):
additional_authorize_scopes: list[str] | None | NotSetT = NotSet,
allowed_client_redirect_uris: list[str] | NotSetT = NotSet,
client_storage: AsyncKeyValue | None = None,
):
) -> None:
"""Initialize Azure OAuth provider.
@ -127,8 +125,7 @@ class AzureProvider(OAuthProxy):
permissions. These are not used for token validation.
allowed_client_redirect_uris: List of allowed redirect URI patterns for MCP clients.
If None (default), all URIs are allowed. If empty list, no URIs are allowed.
client_storage: Storage implementation for OAuth client registrations.
Defaults to file-based storage if not specified.
client_storage: An AsyncKeyValue-compatible store for client registrations, registrations are stored in memory if not provided
"""
settings = AzureProviderSettings.model_validate(
{

View file

@ -215,8 +215,7 @@ class GitHubProvider(OAuthProxy):
timeout_seconds: HTTP request timeout for GitHub API calls
allowed_client_redirect_uris: List of allowed redirect URI patterns for MCP clients.
If None (default), all URIs are allowed. If empty list, no URIs are allowed.
client_storage: Storage implementation for OAuth client registrations.
Defaults to file-based storage if not specified.
client_storage: An AsyncKeyValue-compatible store for client registrations, registrations are stored in memory if not provided
"""
settings = GitHubProviderSettings.model_validate(

View file

@ -234,8 +234,7 @@ class GoogleProvider(OAuthProxy):
timeout_seconds: HTTP request timeout for Google API calls
allowed_client_redirect_uris: List of allowed redirect URI patterns for MCP clients.
If None (default), all URIs are allowed. If empty list, no URIs are allowed.
client_storage: Storage implementation for OAuth client registrations.
Defaults to file-based storage if not specified.
client_storage: An AsyncKeyValue-compatible store for client registrations, registrations are stored in memory if not provided
"""
settings = GoogleProviderSettings.model_validate(

View file

@ -182,8 +182,7 @@ class WorkOSProvider(OAuthProxy):
timeout_seconds: HTTP request timeout for WorkOS API calls
allowed_client_redirect_uris: List of allowed redirect URI patterns for MCP clients.
If None (default), all URIs are allowed. If empty list, no URIs are allowed.
client_storage: Storage implementation for OAuth client registrations.
Defaults to file-based storage if not specified.
client_storage: An AsyncKeyValue-compatible store for client registrations, registrations are stored in memory if not provided
"""
settings = WorkOSProviderSettings.model_validate(