auth0-python 4.12.0__tar.gz → 4.13.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {auth0_python-4.12.0 → auth0_python-4.13.0}/PKG-INFO +1 -1
- {auth0_python-4.12.0 → auth0_python-4.13.0}/auth0/__init__.py +1 -1
- {auth0_python-4.12.0 → auth0_python-4.13.0}/auth0/exceptions.py +2 -2
- {auth0_python-4.12.0 → auth0_python-4.13.0}/auth0/rest.py +1 -0
- {auth0_python-4.12.0 → auth0_python-4.13.0}/auth0/test/authentication/test_base.py +6 -0
- {auth0_python-4.12.0 → auth0_python-4.13.0}/auth0/test/authentication/test_get_token.py +5 -5
- {auth0_python-4.12.0 → auth0_python-4.13.0}/auth0/test/management/test_rest.py +6 -0
- {auth0_python-4.12.0 → auth0_python-4.13.0}/pyproject.toml +1 -1
- {auth0_python-4.12.0 → auth0_python-4.13.0}/LICENSE +0 -0
- {auth0_python-4.12.0 → auth0_python-4.13.0}/README.md +0 -0
- {auth0_python-4.12.0 → auth0_python-4.13.0}/auth0/asyncify.py +0 -0
- {auth0_python-4.12.0 → auth0_python-4.13.0}/auth0/authentication/__init__.py +0 -0
- {auth0_python-4.12.0 → auth0_python-4.13.0}/auth0/authentication/async_token_verifier.py +0 -0
- {auth0_python-4.12.0 → auth0_python-4.13.0}/auth0/authentication/back_channel_login.py +0 -0
- {auth0_python-4.12.0 → auth0_python-4.13.0}/auth0/authentication/base.py +0 -0
- {auth0_python-4.12.0 → auth0_python-4.13.0}/auth0/authentication/client_authentication.py +0 -0
- {auth0_python-4.12.0 → auth0_python-4.13.0}/auth0/authentication/database.py +0 -0
- {auth0_python-4.12.0 → auth0_python-4.13.0}/auth0/authentication/delegated.py +0 -0
- {auth0_python-4.12.0 → auth0_python-4.13.0}/auth0/authentication/enterprise.py +0 -0
- {auth0_python-4.12.0 → auth0_python-4.13.0}/auth0/authentication/get_token.py +0 -0
- {auth0_python-4.12.0 → auth0_python-4.13.0}/auth0/authentication/passwordless.py +0 -0
- {auth0_python-4.12.0 → auth0_python-4.13.0}/auth0/authentication/pushed_authorization_requests.py +0 -0
- {auth0_python-4.12.0 → auth0_python-4.13.0}/auth0/authentication/revoke_token.py +0 -0
- {auth0_python-4.12.0 → auth0_python-4.13.0}/auth0/authentication/social.py +0 -0
- {auth0_python-4.12.0 → auth0_python-4.13.0}/auth0/authentication/token_verifier.py +0 -0
- {auth0_python-4.12.0 → auth0_python-4.13.0}/auth0/authentication/users.py +0 -0
- {auth0_python-4.12.0 → auth0_python-4.13.0}/auth0/management/__init__.py +0 -0
- {auth0_python-4.12.0 → auth0_python-4.13.0}/auth0/management/actions.py +0 -0
- {auth0_python-4.12.0 → auth0_python-4.13.0}/auth0/management/async_auth0.py +0 -0
- {auth0_python-4.12.0 → auth0_python-4.13.0}/auth0/management/attack_protection.py +0 -0
- {auth0_python-4.12.0 → auth0_python-4.13.0}/auth0/management/auth0.py +0 -0
- {auth0_python-4.12.0 → auth0_python-4.13.0}/auth0/management/blacklists.py +0 -0
- {auth0_python-4.12.0 → auth0_python-4.13.0}/auth0/management/branding.py +0 -0
- {auth0_python-4.12.0 → auth0_python-4.13.0}/auth0/management/client_credentials.py +0 -0
- {auth0_python-4.12.0 → auth0_python-4.13.0}/auth0/management/client_grants.py +0 -0
- {auth0_python-4.12.0 → auth0_python-4.13.0}/auth0/management/clients.py +0 -0
- {auth0_python-4.12.0 → auth0_python-4.13.0}/auth0/management/connections.py +0 -0
- {auth0_python-4.12.0 → auth0_python-4.13.0}/auth0/management/custom_domains.py +0 -0
- {auth0_python-4.12.0 → auth0_python-4.13.0}/auth0/management/device_credentials.py +0 -0
- {auth0_python-4.12.0 → auth0_python-4.13.0}/auth0/management/email_templates.py +0 -0
- {auth0_python-4.12.0 → auth0_python-4.13.0}/auth0/management/emails.py +0 -0
- {auth0_python-4.12.0 → auth0_python-4.13.0}/auth0/management/grants.py +0 -0
- {auth0_python-4.12.0 → auth0_python-4.13.0}/auth0/management/guardian.py +0 -0
- {auth0_python-4.12.0 → auth0_python-4.13.0}/auth0/management/hooks.py +0 -0
- {auth0_python-4.12.0 → auth0_python-4.13.0}/auth0/management/jobs.py +0 -0
- {auth0_python-4.12.0 → auth0_python-4.13.0}/auth0/management/log_streams.py +0 -0
- {auth0_python-4.12.0 → auth0_python-4.13.0}/auth0/management/logs.py +0 -0
- {auth0_python-4.12.0 → auth0_python-4.13.0}/auth0/management/network_acls.py +0 -0
- {auth0_python-4.12.0 → auth0_python-4.13.0}/auth0/management/organizations.py +0 -0
- {auth0_python-4.12.0 → auth0_python-4.13.0}/auth0/management/prompts.py +0 -0
- {auth0_python-4.12.0 → auth0_python-4.13.0}/auth0/management/resource_servers.py +0 -0
- {auth0_python-4.12.0 → auth0_python-4.13.0}/auth0/management/roles.py +0 -0
- {auth0_python-4.12.0 → auth0_python-4.13.0}/auth0/management/rules.py +0 -0
- {auth0_python-4.12.0 → auth0_python-4.13.0}/auth0/management/rules_configs.py +0 -0
- {auth0_python-4.12.0 → auth0_python-4.13.0}/auth0/management/self_service_profiles.py +0 -0
- {auth0_python-4.12.0 → auth0_python-4.13.0}/auth0/management/stats.py +0 -0
- {auth0_python-4.12.0 → auth0_python-4.13.0}/auth0/management/tenants.py +0 -0
- {auth0_python-4.12.0 → auth0_python-4.13.0}/auth0/management/tickets.py +0 -0
- {auth0_python-4.12.0 → auth0_python-4.13.0}/auth0/management/user_blocks.py +0 -0
- {auth0_python-4.12.0 → auth0_python-4.13.0}/auth0/management/users.py +0 -0
- {auth0_python-4.12.0 → auth0_python-4.13.0}/auth0/management/users_by_email.py +0 -0
- {auth0_python-4.12.0 → auth0_python-4.13.0}/auth0/rest_async.py +0 -0
- {auth0_python-4.12.0 → auth0_python-4.13.0}/auth0/test/__init__.py +0 -0
- {auth0_python-4.12.0 → auth0_python-4.13.0}/auth0/test/authentication/__init__.py +0 -0
- {auth0_python-4.12.0 → auth0_python-4.13.0}/auth0/test/authentication/test_back_channel_login.py +0 -0
- {auth0_python-4.12.0 → auth0_python-4.13.0}/auth0/test/authentication/test_database.py +0 -0
- {auth0_python-4.12.0 → auth0_python-4.13.0}/auth0/test/authentication/test_delegated.py +0 -0
- {auth0_python-4.12.0 → auth0_python-4.13.0}/auth0/test/authentication/test_enterprise.py +0 -0
- {auth0_python-4.12.0 → auth0_python-4.13.0}/auth0/test/authentication/test_passwordless.py +0 -0
- {auth0_python-4.12.0 → auth0_python-4.13.0}/auth0/test/authentication/test_pushed_authorization_requests.py +0 -0
- {auth0_python-4.12.0 → auth0_python-4.13.0}/auth0/test/authentication/test_revoke_token.py +0 -0
- {auth0_python-4.12.0 → auth0_python-4.13.0}/auth0/test/authentication/test_social.py +0 -0
- {auth0_python-4.12.0 → auth0_python-4.13.0}/auth0/test/authentication/test_token_verifier.py +0 -0
- {auth0_python-4.12.0 → auth0_python-4.13.0}/auth0/test/authentication/test_users.py +0 -0
- {auth0_python-4.12.0 → auth0_python-4.13.0}/auth0/test/conftest.py +0 -0
- {auth0_python-4.12.0 → auth0_python-4.13.0}/auth0/test/management/__init__.py +0 -0
- {auth0_python-4.12.0 → auth0_python-4.13.0}/auth0/test/management/test_actions.py +0 -0
- {auth0_python-4.12.0 → auth0_python-4.13.0}/auth0/test/management/test_atack_protection.py +0 -0
- {auth0_python-4.12.0 → auth0_python-4.13.0}/auth0/test/management/test_auth0.py +0 -0
- {auth0_python-4.12.0 → auth0_python-4.13.0}/auth0/test/management/test_blacklists.py +0 -0
- {auth0_python-4.12.0 → auth0_python-4.13.0}/auth0/test/management/test_branding.py +0 -0
- {auth0_python-4.12.0 → auth0_python-4.13.0}/auth0/test/management/test_client_credentials.py +0 -0
- {auth0_python-4.12.0 → auth0_python-4.13.0}/auth0/test/management/test_client_grants.py +0 -0
- {auth0_python-4.12.0 → auth0_python-4.13.0}/auth0/test/management/test_clients.py +0 -0
- {auth0_python-4.12.0 → auth0_python-4.13.0}/auth0/test/management/test_connections.py +0 -0
- {auth0_python-4.12.0 → auth0_python-4.13.0}/auth0/test/management/test_custom_domains.py +0 -0
- {auth0_python-4.12.0 → auth0_python-4.13.0}/auth0/test/management/test_device_credentials.py +0 -0
- {auth0_python-4.12.0 → auth0_python-4.13.0}/auth0/test/management/test_email_endpoints.py +0 -0
- {auth0_python-4.12.0 → auth0_python-4.13.0}/auth0/test/management/test_emails.py +0 -0
- {auth0_python-4.12.0 → auth0_python-4.13.0}/auth0/test/management/test_grants.py +0 -0
- {auth0_python-4.12.0 → auth0_python-4.13.0}/auth0/test/management/test_guardian.py +0 -0
- {auth0_python-4.12.0 → auth0_python-4.13.0}/auth0/test/management/test_hooks.py +0 -0
- {auth0_python-4.12.0 → auth0_python-4.13.0}/auth0/test/management/test_jobs.py +0 -0
- {auth0_python-4.12.0 → auth0_python-4.13.0}/auth0/test/management/test_log_streams.py +0 -0
- {auth0_python-4.12.0 → auth0_python-4.13.0}/auth0/test/management/test_logs.py +0 -0
- {auth0_python-4.12.0 → auth0_python-4.13.0}/auth0/test/management/test_network_acls.py +0 -0
- {auth0_python-4.12.0 → auth0_python-4.13.0}/auth0/test/management/test_organizations.py +0 -0
- {auth0_python-4.12.0 → auth0_python-4.13.0}/auth0/test/management/test_prompts.py +0 -0
- {auth0_python-4.12.0 → auth0_python-4.13.0}/auth0/test/management/test_resource_servers.py +0 -0
- {auth0_python-4.12.0 → auth0_python-4.13.0}/auth0/test/management/test_roles.py +0 -0
- {auth0_python-4.12.0 → auth0_python-4.13.0}/auth0/test/management/test_rules.py +0 -0
- {auth0_python-4.12.0 → auth0_python-4.13.0}/auth0/test/management/test_rules_configs.py +0 -0
- {auth0_python-4.12.0 → auth0_python-4.13.0}/auth0/test/management/test_self_service_profiles.py +0 -0
- {auth0_python-4.12.0 → auth0_python-4.13.0}/auth0/test/management/test_stats.py +0 -0
- {auth0_python-4.12.0 → auth0_python-4.13.0}/auth0/test/management/test_tenants.py +0 -0
- {auth0_python-4.12.0 → auth0_python-4.13.0}/auth0/test/management/test_tickets.py +0 -0
- {auth0_python-4.12.0 → auth0_python-4.13.0}/auth0/test/management/test_user_blocks.py +0 -0
- {auth0_python-4.12.0 → auth0_python-4.13.0}/auth0/test/management/test_users.py +0 -0
- {auth0_python-4.12.0 → auth0_python-4.13.0}/auth0/test/management/test_users_by_email.py +0 -0
- {auth0_python-4.12.0 → auth0_python-4.13.0}/auth0/test_async/__init__.py +0 -0
- {auth0_python-4.12.0 → auth0_python-4.13.0}/auth0/test_async/conftest.py +0 -0
- {auth0_python-4.12.0 → auth0_python-4.13.0}/auth0/test_async/test_async_auth0.py +0 -0
- {auth0_python-4.12.0 → auth0_python-4.13.0}/auth0/test_async/test_async_token_verifier.py +0 -0
- {auth0_python-4.12.0 → auth0_python-4.13.0}/auth0/test_async/test_asyncify.py +0 -0
- {auth0_python-4.12.0 → auth0_python-4.13.0}/auth0/types.py +0 -0
- {auth0_python-4.12.0 → auth0_python-4.13.0}/auth0/utils.py +0 -0
|
@@ -23,8 +23,8 @@ class Auth0Error(Exception):
|
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
class RateLimitError(Auth0Error):
|
|
26
|
-
def __init__(self, error_code: str, message: str, reset_at: int) -> None:
|
|
27
|
-
super().__init__(status_code=429, error_code=error_code, message=message)
|
|
26
|
+
def __init__(self, error_code: str, message: str, reset_at: int, headers: Any | None = None) -> None:
|
|
27
|
+
super().__init__(status_code=429, error_code=error_code, message=message, headers=headers)
|
|
28
28
|
self.reset_at = reset_at
|
|
29
29
|
|
|
30
30
|
|
|
@@ -158,6 +158,10 @@ class TestBase(unittest.TestCase):
|
|
|
158
158
|
self.assertEqual(context.exception.message, "desc")
|
|
159
159
|
self.assertIsInstance(context.exception, RateLimitError)
|
|
160
160
|
self.assertEqual(context.exception.reset_at, 9)
|
|
161
|
+
self.assertIsNotNone(context.exception.headers)
|
|
162
|
+
self.assertEqual(context.exception.headers["x-ratelimit-limit"], "3")
|
|
163
|
+
self.assertEqual(context.exception.headers["x-ratelimit-remaining"], "6")
|
|
164
|
+
self.assertEqual(context.exception.headers["x-ratelimit-reset"], "9")
|
|
161
165
|
|
|
162
166
|
@mock.patch("requests.request")
|
|
163
167
|
def test_post_rate_limit_error_without_headers(self, mock_request):
|
|
@@ -177,6 +181,8 @@ class TestBase(unittest.TestCase):
|
|
|
177
181
|
self.assertEqual(context.exception.message, "desc")
|
|
178
182
|
self.assertIsInstance(context.exception, RateLimitError)
|
|
179
183
|
self.assertEqual(context.exception.reset_at, -1)
|
|
184
|
+
self.assertIsNotNone(context.exception.headers)
|
|
185
|
+
self.assertEqual(context.exception.headers, {})
|
|
180
186
|
|
|
181
187
|
@mock.patch("requests.request")
|
|
182
188
|
def test_post_error_with_code_property(self, mock_request):
|
|
@@ -6,7 +6,7 @@ from unittest.mock import ANY
|
|
|
6
6
|
|
|
7
7
|
from cryptography.hazmat.primitives import asymmetric, serialization
|
|
8
8
|
|
|
9
|
-
from ... import
|
|
9
|
+
from ...exceptions import RateLimitError
|
|
10
10
|
from ...authentication.get_token import GetToken
|
|
11
11
|
|
|
12
12
|
|
|
@@ -339,22 +339,22 @@ class TestGetToken(unittest.TestCase):
|
|
|
339
339
|
)
|
|
340
340
|
|
|
341
341
|
@mock.patch("requests.request")
|
|
342
|
-
def
|
|
342
|
+
def test_backchannel_login_headers_on_slow_down(self, mock_requests_request):
|
|
343
343
|
response = requests.Response()
|
|
344
|
-
response.status_code =
|
|
344
|
+
response.status_code = 429
|
|
345
345
|
response.headers = {"Retry-After": "100"}
|
|
346
346
|
response._content = b'{"error":"slow_down"}'
|
|
347
347
|
mock_requests_request.return_value = response
|
|
348
348
|
|
|
349
349
|
g = GetToken("my.domain.com", "cid", client_secret="csec")
|
|
350
350
|
|
|
351
|
-
with self.assertRaises(
|
|
351
|
+
with self.assertRaises(RateLimitError) as context:
|
|
352
352
|
g.backchannel_login(
|
|
353
353
|
auth_req_id="reqid",
|
|
354
354
|
grant_type="urn:openid:params:grant-type:ciba",
|
|
355
355
|
)
|
|
356
356
|
self.assertEqual(context.exception.headers["Retry-After"], "100")
|
|
357
|
-
self.assertEqual(context.exception.status_code,
|
|
357
|
+
self.assertEqual(context.exception.status_code, 429)
|
|
358
358
|
|
|
359
359
|
@mock.patch("auth0.rest.RestClient.post")
|
|
360
360
|
def test_connection_login(self, mock_post):
|
|
@@ -278,6 +278,10 @@ class TestRest(unittest.TestCase):
|
|
|
278
278
|
self.assertEqual(context.exception.message, "message")
|
|
279
279
|
self.assertIsInstance(context.exception, RateLimitError)
|
|
280
280
|
self.assertEqual(context.exception.reset_at, 9)
|
|
281
|
+
self.assertIsNotNone(context.exception.headers)
|
|
282
|
+
self.assertEqual(context.exception.headers["x-ratelimit-limit"], "3")
|
|
283
|
+
self.assertEqual(context.exception.headers["x-ratelimit-remaining"], "6")
|
|
284
|
+
self.assertEqual(context.exception.headers["x-ratelimit-reset"], "9")
|
|
281
285
|
|
|
282
286
|
self.assertEqual(rc._metrics["retries"], 0)
|
|
283
287
|
|
|
@@ -300,6 +304,8 @@ class TestRest(unittest.TestCase):
|
|
|
300
304
|
self.assertEqual(context.exception.message, "message")
|
|
301
305
|
self.assertIsInstance(context.exception, RateLimitError)
|
|
302
306
|
self.assertEqual(context.exception.reset_at, -1)
|
|
307
|
+
self.assertIsNotNone(context.exception.headers)
|
|
308
|
+
self.assertEqual(context.exception.headers, {})
|
|
303
309
|
|
|
304
310
|
self.assertEqual(rc._metrics["retries"], 1)
|
|
305
311
|
|
|
@@ -4,7 +4,7 @@ build-backend = "poetry_dynamic_versioning.backend"
|
|
|
4
4
|
|
|
5
5
|
[tool.poetry]
|
|
6
6
|
name = "auth0-python"
|
|
7
|
-
version = "4.
|
|
7
|
+
version = "4.13.0" # This is replaced by dynamic versioning
|
|
8
8
|
description = ""
|
|
9
9
|
authors = ["Auth0 <support@auth0.com>"]
|
|
10
10
|
license = "MIT"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{auth0_python-4.12.0 → auth0_python-4.13.0}/auth0/authentication/pushed_authorization_requests.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{auth0_python-4.12.0 → auth0_python-4.13.0}/auth0/test/authentication/test_back_channel_login.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{auth0_python-4.12.0 → auth0_python-4.13.0}/auth0/test/authentication/test_token_verifier.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{auth0_python-4.12.0 → auth0_python-4.13.0}/auth0/test/management/test_client_credentials.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{auth0_python-4.12.0 → auth0_python-4.13.0}/auth0/test/management/test_device_credentials.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{auth0_python-4.12.0 → auth0_python-4.13.0}/auth0/test/management/test_self_service_profiles.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|