Remove the unused timeout parameter from OAuthClientProvider (#3165)

This commit is contained in:
Max 2026-07-26 00:22:15 +01:00 • committed by GitHub
commit 47bfa85e83
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 24 additions and 11 deletions

View file

@ -63,7 +63,7 @@ class ClientCredentialsOAuthProvider(OAuthClientProvider):
token_endpoint_auth_method=token_endpoint_auth_method,
scope=scope,
)
super().__init__(server_url, client_metadata, storage, None, None, 300.0)
super().__init__(server_url, client_metadata, storage, None, None)
# Store client_info to be set during _initialize - no dynamic registration needed
self._fixed_client_info = OAuthClientInformationFull(
redirect_uris=None,
@ -277,7 +277,7 @@ class PrivateKeyJWTOAuthProvider(OAuthClientProvider):
token_endpoint_auth_method="private_key_jwt",
scope=scope,
)
super().__init__(server_url, client_metadata, storage, None, None, 300.0)
super().__init__(server_url, client_metadata, storage, None, None)
self._assertion_provider = assertion_provider
# Store client_info to be set during _initialize - no dynamic registration needed
self._fixed_client_info = OAuthClientInformationFull(

View file

@ -103,7 +103,6 @@ class OAuthContext:
storage: TokenStorage
redirect_handler: Callable[[str], Awaitable[None]] | None
callback_handler: Callable[[], Awaitable[AuthorizationCodeResult]] | None
timeout: float = 300.0
client_metadata_url: str | None = None
# Discovered metadata
@ -233,7 +232,6 @@ class OAuthClientProvider(httpx2.Auth):
storage: TokenStorage,
redirect_handler: Callable[[str], Awaitable[None]] | None = None,
callback_handler: Callable[[], Awaitable[AuthorizationCodeResult]] | None = None,
timeout: float = 300.0,
client_metadata_url: str | None = None,
validate_resource_url: Callable[[str, str | None], Awaitable[None]] | None = None,
):
@ -245,7 +243,6 @@ class OAuthClientProvider(httpx2.Auth):
storage: Token storage implementation.
redirect_handler: Handler for authorization redirects.
callback_handler: Handler for authorization callbacks.
timeout: Timeout for the OAuth flow.
client_metadata_url: URL-based client ID. When provided and the server
advertises client_id_metadata_document_supported=True, this URL will be
used as the client_id instead of performing dynamic client registration.
@ -271,7 +268,6 @@ class OAuthClientProvider(httpx2.Auth):
storage=storage,
redirect_handler=redirect_handler,
callback_handler=callback_handler,
timeout=timeout,
client_metadata_url=client_metadata_url,
)
self._validate_resource_url_callback = validate_resource_url