diff --git a/stubs/oauthlib/METADATA.toml b/stubs/oauthlib/METADATA.toml index 84307529a94b..38c94680a9a8 100644 --- a/stubs/oauthlib/METADATA.toml +++ b/stubs/oauthlib/METADATA.toml @@ -1 +1 @@ -version = "3.1.*" +version = "3.2.*" diff --git a/stubs/oauthlib/oauthlib/oauth2/rfc6749/clients/base.pyi b/stubs/oauthlib/oauthlib/oauth2/rfc6749/clients/base.pyi index 1000f338ff7e..7ccbc66bfa17 100644 --- a/stubs/oauthlib/oauthlib/oauth2/rfc6749/clients/base.pyi +++ b/stubs/oauthlib/oauthlib/oauth2/rfc6749/clients/base.pyi @@ -21,6 +21,9 @@ class Client: redirect_url: Any code: Any expires_in: Any + code_verifier: str + code_challenge: str + code_challenge_method: str def __init__( self, client_id, @@ -35,6 +38,9 @@ class Client: state: Any | None = ..., redirect_url: Any | None = ..., state_generator=..., + code_verifier: str | None = ..., + code_challenge: str | None = ..., + code_challenge_method: str | None = ..., **kwargs, ) -> None: ... @property @@ -71,5 +77,7 @@ class Client: ): ... def parse_request_body_response(self, body, scope: Any | None = ..., **kwargs): ... def prepare_refresh_body(self, body: str = ..., refresh_token: Any | None = ..., scope: Any | None = ..., **kwargs): ... + def create_code_verifier(self, length: int) -> str: ... + def create_code_challenge(self, code_verifier: str, code_challenge_method: str | None = ...) -> str: ... def populate_code_attributes(self, response) -> None: ... def populate_token_attributes(self, response) -> None: ... diff --git a/stubs/oauthlib/oauthlib/oauth2/rfc6749/clients/web_application.pyi b/stubs/oauthlib/oauthlib/oauth2/rfc6749/clients/web_application.pyi index 054ab27c311b..68bf975ac3cc 100644 --- a/stubs/oauthlib/oauthlib/oauth2/rfc6749/clients/web_application.pyi +++ b/stubs/oauthlib/oauthlib/oauth2/rfc6749/clients/web_application.pyi @@ -7,9 +7,22 @@ class WebApplicationClient(Client): code: Any def __init__(self, client_id, code: Any | None = ..., **kwargs) -> None: ... def prepare_request_uri( # type: ignore[override] - self, uri, redirect_uri: Any | None = ..., scope: Any | None = ..., state: Any | None = ..., **kwargs + self, + uri, + redirect_uri: Any | None = ..., + scope: Any | None = ..., + state: Any | None = ..., + code_challenge: str | None = ..., + code_challenge_method: str | None = ..., + **kwargs, ): ... def prepare_request_body( # type: ignore[override] - self, code: Any | None = ..., redirect_uri: Any | None = ..., body: str = ..., include_client_id: bool = ..., **kwargs + self, + code: Any | None = ..., + redirect_uri: Any | None = ..., + body: str = ..., + include_client_id: bool = ..., + code_verifier: str | None = ..., + **kwargs, ): ... def parse_request_uri_response(self, uri, state: Any | None = ...): ... # type: ignore[override] diff --git a/stubs/oauthlib/oauthlib/oauth2/rfc6749/parameters.pyi b/stubs/oauthlib/oauthlib/oauth2/rfc6749/parameters.pyi index 2bc064f027a0..ddbec107edb3 100644 --- a/stubs/oauthlib/oauthlib/oauth2/rfc6749/parameters.pyi +++ b/stubs/oauthlib/oauthlib/oauth2/rfc6749/parameters.pyi @@ -1,9 +1,19 @@ from typing import Any def prepare_grant_uri( - uri, client_id, response_type, redirect_uri: Any | None = ..., scope: Any | None = ..., state: Any | None = ..., **kwargs + uri, + client_id, + response_type, + redirect_uri: Any | None = ..., + scope: Any | None = ..., + state: Any | None = ..., + code_challenge: str | None = ..., + code_challenge_method: str | None = ..., + **kwargs, +): ... +def prepare_token_request( + grant_type, body: str = ..., include_client_id: bool = ..., code_verifier: str | None = ..., **kwargs ): ... -def prepare_token_request(grant_type, body: str = ..., include_client_id: bool = ..., **kwargs): ... def prepare_token_revocation_request( url, token, token_type_hint: str = ..., callback: Any | None = ..., body: str = ..., **kwargs ): ...