Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion stubs/auth0-python/METADATA.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
version = "4.8.*"
version = "4.9.*"
upstream_repository = "https://github.com/auth0/auth0-python"
requires = ["cryptography", "types-requests"]
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from _typeshed import Incomplete

from .. import TokenValidationError as TokenValidationError
from ..rest_async import AsyncRestClient as AsyncRestClient
from .token_verifier import (
Expand All @@ -18,9 +16,9 @@ class AsyncJwksFetcher(JwksFetcher):
async def get_key(self, key_id: str): ...

class AsyncTokenVerifier(TokenVerifier):
iss: Incomplete
aud: Incomplete
leeway: Incomplete
iss: str
aud: str
leeway: int
def __init__(
self, signature_verifier: AsyncAsymmetricSignatureVerifier, issuer: str, audience: str, leeway: int = 0
) -> None: ...
Expand Down
17 changes: 9 additions & 8 deletions stubs/auth0-python/auth0/authentication/base.pyi
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
from _typeshed import Incomplete
from typing import Final

from auth0.rest import RestClient as RestClient, RestClientOptions as RestClientOptions
from auth0.types import RequestData as RequestData

from .client_authentication import add_client_authentication as add_client_authentication

UNKNOWN_ERROR: str
UNKNOWN_ERROR: Final[str]

class AuthenticationBase:
domain: Incomplete
client_id: Incomplete
client_secret: Incomplete
client_assertion_signing_key: Incomplete
client_assertion_signing_alg: Incomplete
protocol: Incomplete
client: Incomplete
domain: str
client_id: str
client_secret: str | None
client_assertion_signing_key: str | None
client_assertion_signing_alg: str | None
protocol: str
client: RestClient
def __init__(
self,
domain: str,
Expand Down
8 changes: 8 additions & 0 deletions stubs/auth0-python/auth0/authentication/get_token.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,11 @@ class GetToken(AuthenticationBase):
def refresh_token(self, refresh_token: str, scope: str = "", grant_type: str = "refresh_token"): ...
def passwordless_login(self, username: str, otp: str, realm: str, scope: str, audience: str): ...
def backchannel_login(self, auth_req_id: str, grant_type: str = "urn:openid:params:grant-type:ciba"): ...
def access_token_for_connection(
self,
subject_token_type: str,
subject_token: str,
requested_token_type: str,
connection: str | None = None,
grant_type: str = ...,
): ...
6 changes: 3 additions & 3 deletions stubs/auth0-python/auth0/authentication/token_verifier.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ class AsymmetricSignatureVerifier(SignatureVerifier):
def __init__(self, jwks_url: str, algorithm: str = "RS256", cache_ttl: int = ...) -> None: ...

class TokenVerifier:
iss: Incomplete
aud: Incomplete
leeway: Incomplete
iss: str
aud: str
leeway: int
def __init__(self, signature_verifier: SignatureVerifier, issuer: str, audience: str, leeway: int = 0) -> None: ...
def verify(
self, token: str, nonce: str | None = None, max_age: int | None = None, organization: str | None = None
Expand Down
6 changes: 3 additions & 3 deletions stubs/auth0-python/auth0/authentication/users.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ from auth0.rest import RestClient as RestClient, RestClientOptions as RestClient
from auth0.types import TimeoutType as TimeoutType

class Users:
domain: Incomplete
protocol: Incomplete
client: Incomplete
domain: str
protocol: str
client: RestClient
def __init__(self, domain: str, telemetry: bool = True, timeout: TimeoutType = 5.0, protocol: str = "https") -> None: ...
def userinfo(self, access_token: str) -> dict[str, Incomplete]: ...
10 changes: 5 additions & 5 deletions stubs/auth0-python/auth0/exceptions.pyi
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
from _typeshed import Incomplete

class Auth0Error(Exception):
status_code: Incomplete
error_code: Incomplete
message: Incomplete
content: Incomplete
status_code: int
error_code: str
message: str
content: Incomplete | None
def __init__(self, status_code: int, error_code: str, message: str, content: Incomplete | None = None) -> None: ...

class RateLimitError(Auth0Error):
reset_at: Incomplete
reset_at: int
def __init__(self, error_code: str, message: str, reset_at: int) -> None: ...

class TokenValidationError(Exception): ...
2 changes: 2 additions & 0 deletions stubs/auth0-python/auth0/management/users.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -115,3 +115,5 @@ class Users:
async def delete_authentication_methods_async(self, user_id: str): ...
def delete_authentication_method_by_id(self, user_id: str, authentication_method_id: str): ...
async def delete_authentication_method_by_id_async(self, user_id: str, authentication_method_id: str): ...
def list_tokensets(self, id: str, page: int = 0, per_page: int = 25, include_totals: bool = True): ...
def delete_tokenset_by_id(self, user_id: str, tokenset_id: str): ...
19 changes: 10 additions & 9 deletions stubs/auth0-python/auth0/rest.pyi
Original file line number Diff line number Diff line change
@@ -1,25 +1,26 @@
from _typeshed import Incomplete
from collections.abc import Mapping
from typing import Final

import requests
from auth0.exceptions import Auth0Error as Auth0Error, RateLimitError as RateLimitError
from auth0.rest_async import RequestsResponse as RequestsResponse
from auth0.types import RequestData as RequestData, TimeoutType as TimeoutType

UNKNOWN_ERROR: str
UNKNOWN_ERROR: Final[str]

class RestClientOptions:
telemetry: Incomplete
timeout: Incomplete
retries: Incomplete
telemetry: bool
timeout: TimeoutType
retries: int
def __init__(self, telemetry: bool = True, timeout: TimeoutType = 5.0, retries: int = 3) -> None: ...

class RestClient:
options: Incomplete
jwt: Incomplete
base_headers: Incomplete
telemetry: Incomplete
timeout: Incomplete
options: RestClientOptions
jwt: str | None
base_headers: dict[str, str]
telemetry: bool
timeout: TimeoutType
def __init__(
self, jwt: str | None, telemetry: bool = True, timeout: TimeoutType = 5.0, options: RestClientOptions | None = None
) -> None: ...
Expand Down
8 changes: 4 additions & 4 deletions stubs/auth0-python/auth0/rest_async.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from _typeshed import Incomplete
from collections.abc import MutableMapping

from auth0.exceptions import RateLimitError as RateLimitError
from auth0.types import RequestData as RequestData
Expand All @@ -13,7 +14,6 @@ from .rest import (

class AsyncRestClient(RestClient):
timeout: Incomplete
def __init__(self, *args, **kwargs) -> None: ...
def set_session(self, session) -> None: ...
async def get(self, url: str, params: dict[str, Incomplete] | None = None, headers: dict[str, str] | None = None): ...
async def post(self, url: str, data: RequestData | None = None, headers: dict[str, str] | None = None): ...
Expand All @@ -23,7 +23,7 @@ class AsyncRestClient(RestClient):
async def delete(self, url: str, params: dict[str, Incomplete] | None = None, data: RequestData | None = None): ...

class RequestsResponse:
status_code: Incomplete
headers: Incomplete
text: Incomplete
status_code: int
headers: MutableMapping[str, str]
text: str
def __init__(self, response, text: str) -> None: ...