diff --git a/stubs/Authlib/@tests/stubtest_allowlist.txt b/stubs/Authlib/@tests/stubtest_allowlist.txt index 8f5458773f6c..cb8cffd5a656 100644 --- a/stubs/Authlib/@tests/stubtest_allowlist.txt +++ b/stubs/Authlib/@tests/stubtest_allowlist.txt @@ -1,5 +1,9 @@ # TODO: check these entries authlib.jose.drafts._jwe_enc_cryptodome +authlib.integrations.httpx_client.assertion_client +authlib.integrations.httpx_client.oauth1_client +authlib.integrations.httpx_client.oauth2_client +authlib.integrations.httpx_client.utils # Are set to `None` by default, initialized later: authlib.jose.drafts._jwe_algorithms.ECDH1PUAlgorithm.description diff --git a/stubs/Authlib/METADATA.toml b/stubs/Authlib/METADATA.toml index d8cc388509d2..e9eb1fb6ee03 100644 --- a/stubs/Authlib/METADATA.toml +++ b/stubs/Authlib/METADATA.toml @@ -1,4 +1,4 @@ version = "1.6.5" upstream_repository = "https://github.com/lepture/authlib" -requires = ["cryptography"] +requires = ["cryptography", "httpx"] partial_stub = true diff --git a/stubs/Authlib/authlib/integrations/base_client/async_app.pyi b/stubs/Authlib/authlib/integrations/base_client/async_app.pyi index c684655f946c..efb43dd5bbb7 100644 --- a/stubs/Authlib/authlib/integrations/base_client/async_app.pyi +++ b/stubs/Authlib/authlib/integrations/base_client/async_app.pyi @@ -1,5 +1,7 @@ from logging import Logger +from typing import Any +import httpx from authlib.integrations.base_client.sync_app import OAuth1Base, OAuth2Base log: Logger @@ -7,12 +9,12 @@ log: Logger __all__ = ["AsyncOAuth1Mixin", "AsyncOAuth2Mixin"] class AsyncOAuth1Mixin(OAuth1Base): - async def request(self, method, url, token=None, **kwargs): ... - async def create_authorization_url(self, redirect_uri=None, **kwargs): ... - async def fetch_access_token(self, request_token=None, **kwargs): ... + async def request(self, method: str, url: str, token: dict[str, Any] | None = None, **kwargs: Any) -> httpx.Response: ... + async def create_authorization_url(self, redirect_uri: str | None = None, **kwargs: Any) -> dict[str, Any]: ... + async def fetch_access_token(self, request_token: dict[str, Any] | None = None, **kwargs: Any) -> dict[str, Any]: ... class AsyncOAuth2Mixin(OAuth2Base): - async def load_server_metadata(self): ... - async def request(self, method, url, token=None, **kwargs): ... - async def create_authorization_url(self, redirect_uri=None, **kwargs): ... - async def fetch_access_token(self, redirect_uri=None, **kwargs): ... + async def load_server_metadata(self) -> dict[str, Any]: ... + async def request(self, method: str, url: str, token: dict[str, Any] | None = None, **kwargs: Any) -> httpx.Response: ... + async def create_authorization_url(self, redirect_uri: str | None = None, **kwargs: Any) -> dict[str, Any]: ... + async def fetch_access_token(self, redirect_uri: str | None = None, **kwargs: Any) -> dict[str, Any]: ...