diff --git a/stubs/Authlib/METADATA.toml b/stubs/Authlib/METADATA.toml index e5f5788ee39c..d8cc388509d2 100644 --- a/stubs/Authlib/METADATA.toml +++ b/stubs/Authlib/METADATA.toml @@ -1,4 +1,4 @@ -version = "~= 1.6.4" +version = "1.6.5" upstream_repository = "https://github.com/lepture/authlib" requires = ["cryptography"] partial_stub = true diff --git a/stubs/Authlib/authlib/jose/rfc7515/jws.pyi b/stubs/Authlib/authlib/jose/rfc7515/jws.pyi index fbb1083981aa..04cc886a1cca 100644 --- a/stubs/Authlib/authlib/jose/rfc7515/jws.pyi +++ b/stubs/Authlib/authlib/jose/rfc7515/jws.pyi @@ -1,8 +1,9 @@ from _typeshed import Incomplete class JsonWebSignature: - REGISTERED_HEADER_PARAMETER_NAMES: Incomplete - ALGORITHMS_REGISTRY: Incomplete + REGISTERED_HEADER_PARAMETER_NAMES: frozenset[str] + MAX_CONTENT_LENGTH: int + ALGORITHMS_REGISTRY: dict[str, Incomplete] def __init__(self, algorithms=None, private_headers=None) -> None: ... @classmethod def register_algorithm(cls, algorithm) -> None: ... diff --git a/stubs/Authlib/authlib/jose/rfc7516/models.pyi b/stubs/Authlib/authlib/jose/rfc7516/models.pyi index 1bd060a1df59..533be13093bd 100644 --- a/stubs/Authlib/authlib/jose/rfc7516/models.pyi +++ b/stubs/Authlib/authlib/jose/rfc7516/models.pyi @@ -40,8 +40,8 @@ class JWEZipAlgorithm: description: Incomplete algorithm_type: str algorithm_location: str - def compress(self, s) -> None: ... - def decompress(self, s) -> None: ... + def compress(self, s: bytes) -> bytes | None: ... + def decompress(self, s: bytes) -> bytes | None: ... class JWESharedHeader(dict[str, object]): protected: Incomplete diff --git a/stubs/Authlib/authlib/jose/rfc7518/jwe_zips.pyi b/stubs/Authlib/authlib/jose/rfc7518/jwe_zips.pyi index bf456649a113..4bb30cd63311 100644 --- a/stubs/Authlib/authlib/jose/rfc7518/jwe_zips.pyi +++ b/stubs/Authlib/authlib/jose/rfc7518/jwe_zips.pyi @@ -1,9 +1,14 @@ +from typing import Final + from authlib.jose.rfc7516 import JWEZipAlgorithm +GZIP_HEAD: Final[bytes] +MAX_SIZE: Final = 256000 + class DeflateZipAlgorithm(JWEZipAlgorithm): name: str description: str - def compress(self, s): ... - def decompress(self, s): ... + def compress(self, s: bytes) -> bytes: ... + def decompress(self, s: bytes) -> bytes: ... def register_jwe_rfc7518() -> None: ... diff --git a/stubs/Authlib/authlib/oauth2/rfc7591/endpoint.pyi b/stubs/Authlib/authlib/oauth2/rfc7591/endpoint.pyi index 1ff8927c09e9..dad1e003925c 100644 --- a/stubs/Authlib/authlib/oauth2/rfc7591/endpoint.pyi +++ b/stubs/Authlib/authlib/oauth2/rfc7591/endpoint.pyi @@ -1,6 +1,8 @@ from _typeshed import Incomplete from typing import Final +from authlib.jose import JWTClaims + class ClientRegistrationEndpoint: ENDPOINT_NAME: Final = "client_registration" software_statement_alg_values_supported: Incomplete @@ -10,12 +12,12 @@ class ClientRegistrationEndpoint: def __call__(self, request) -> dict[Incomplete, Incomplete]: ... def create_registration_response(self, request): ... def extract_client_metadata(self, request): ... - def extract_software_statement(self, software_statement, request): ... - def generate_client_info(self): ... + def extract_software_statement(self, software_statement, request) -> JWTClaims: ... + def generate_client_info(self, request) -> dict[str, Incomplete]: ... def generate_client_registration_info(self, client, request) -> None: ... def create_endpoint_request(self, request): ... - def generate_client_id(self): ... - def generate_client_secret(self): ... + def generate_client_id(self, request) -> str: ... + def generate_client_secret(self, request) -> str: ... def get_server_metadata(self) -> None: ... def authenticate_token(self, request) -> None: ... def resolve_public_key(self, request) -> None: ...