|
1 | | -from _typeshed import Incomplete |
2 | | -from typing import Any |
| 1 | +from _typeshed import Incomplete, Unused |
| 2 | +from collections.abc import Iterable |
| 3 | +from logging import Logger |
3 | 4 |
|
4 | | -log: Any |
| 5 | +from oauthlib.common import Request, _HTTPMethod |
5 | 6 |
|
6 | | -def signature_base_string(http_method: str, base_str_uri: str, normalized_encoded_request_parameters: str) -> str: ... |
| 7 | +log: Logger |
| 8 | + |
| 9 | +def signature_base_string(http_method: _HTTPMethod, base_str_uri: str, normalized_encoded_request_parameters: str) -> str: ... |
7 | 10 | def base_string_uri(uri: str, host: str | None = None) -> str: ... |
8 | 11 | def collect_parameters( |
9 | 12 | uri_query: str = "", |
10 | | - body: Incomplete | None = None, |
11 | | - headers: Incomplete | None = None, |
| 13 | + body: str | bytes | dict[str, str] | Iterable[tuple[str, str]] | None = None, |
| 14 | + headers: dict[str, str] | None = None, |
12 | 15 | exclude_oauth_signature: bool = True, |
13 | 16 | with_realm: bool = False, |
14 | | -): ... |
15 | | -def normalize_parameters(params) -> str: ... |
16 | | -def sign_hmac_sha1_with_client(sig_base_str, client): ... |
17 | | -def verify_hmac_sha1(request, client_secret: Incomplete | None = None, resource_owner_secret: Incomplete | None = None): ... |
18 | | -def sign_hmac_sha1(base_string, client_secret, resource_owner_secret): ... |
| 17 | +) -> list[tuple[str, str]]: ... |
| 18 | +def normalize_parameters(params: dict[str, str]) -> str: ... |
| 19 | +def sign_hmac_sha1_with_client(sig_base_str: str, client): ... |
| 20 | +def verify_hmac_sha1( |
| 21 | + request: Request, client_secret: Incomplete | None = None, resource_owner_secret: Incomplete | None = None |
| 22 | +) -> bool: ... |
| 23 | +def sign_hmac_sha1(base_string: str | bytes, client_secret, resource_owner_secret): ... |
19 | 24 | def sign_hmac_sha256_with_client(sig_base_str, client): ... |
20 | | -def verify_hmac_sha256(request, client_secret: Incomplete | None = None, resource_owner_secret: Incomplete | None = None): ... |
21 | | -def sign_hmac_sha256(base_string, client_secret, resource_owner_secret): ... |
| 25 | +def verify_hmac_sha256( |
| 26 | + request, client_secret: Incomplete | None = None, resource_owner_secret: Incomplete | None = None |
| 27 | +) -> bool: ... |
| 28 | +def sign_hmac_sha256(base_string: str | bytes, client_secret, resource_owner_secret): ... |
22 | 29 | def sign_hmac_sha512_with_client(sig_base_str: str, client): ... |
23 | | -def verify_hmac_sha512(request, client_secret: str | None = None, resource_owner_secret: str | None = None): ... |
24 | | -def sign_rsa_sha1_with_client(sig_base_str, client): ... |
25 | | -def verify_rsa_sha1(request, rsa_public_key: str): ... |
| 30 | +def verify_hmac_sha512(request, client_secret: str | None = None, resource_owner_secret: str | None = None) -> bool: ... |
| 31 | +def sign_rsa_sha1_with_client(sig_base_str: str | bytes, client): ... |
| 32 | +def verify_rsa_sha1(request, rsa_public_key: str) -> bool: ... |
26 | 33 | def sign_rsa_sha1(base_string, rsa_private_key): ... |
27 | 34 | def sign_rsa_sha256_with_client(sig_base_str: str, client): ... |
28 | | -def verify_rsa_sha256(request, rsa_public_key: str): ... |
| 35 | +def verify_rsa_sha256(request, rsa_public_key: str) -> bool: ... |
29 | 36 | def sign_rsa_sha512_with_client(sig_base_str: str, client): ... |
30 | | -def verify_rsa_sha512(request, rsa_public_key: str): ... |
31 | | -def sign_plaintext_with_client(_signature_base_string, client): ... |
32 | | -def sign_plaintext(client_secret, resource_owner_secret): ... |
33 | | -def verify_plaintext(request, client_secret: Incomplete | None = None, resource_owner_secret: Incomplete | None = None): ... |
| 37 | +def verify_rsa_sha512(request, rsa_public_key: str) -> bool: ... |
| 38 | +def sign_plaintext_with_client(_signature_base_string: Unused, client) -> str: ... |
| 39 | +def sign_plaintext(client_secret: str | None, resource_owner_secret: str | None) -> str: ... |
| 40 | +def verify_plaintext(request, client_secret: str | None = None, resource_owner_secret: str | None = None) -> bool: ... |
0 commit comments