Skip to content

Commit 158ae05

Browse files
authored
Merge pull request #462 from auth0/remove-v3-folder
2 parents 44de6d9 + 1bb6443 commit 158ae05

File tree

112 files changed

+291
-284
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

112 files changed

+291
-284
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ bin/
2626
*.egg
2727
.pypirc
2828
pyvenv.cfg
29+
.python-version
2930

3031
# Installer logs
3132
pip-log.txt

EXAMPLES.md

+7-7

README.md

+5-5

V4_MIGRATION_GUIDE.md

+23-2

auth0/__init__.py

+4
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
11
__version__ = "3.24.0"
2+
3+
from auth0.exceptions import Auth0Error, RateLimitError, TokenValidationError
4+
5+
__all__ = ("Auth0Error", "RateLimitError", "TokenValidationError")

auth0/v3/asyncify.py auth0/asyncify.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import aiohttp
22

3-
from auth0.v3.rest_async import AsyncRestClient
3+
from auth0.rest_async import AsyncRestClient
44

55

66
def _gen_async(client, method):
File renamed without changes.

auth0/v3/authentication/base.py auth0/authentication/base.py

+1-9
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,5 @@
1-
import base64
2-
import json
3-
import platform
4-
import sys
1+
from auth0.rest import RestClient, RestClientOptions
52

6-
import requests
7-
8-
from auth0.v3.rest import RestClient, RestClientOptions
9-
10-
from ..exceptions import Auth0Error, RateLimitError
113
from .client_authentication import add_client_authentication
124

135
UNKNOWN_ERROR = "a0.sdk.internal.unknown"
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

auth0/v3/authentication/token_verifier.py auth0/authentication/token_verifier.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import jwt
66
import requests
77

8-
from auth0.v3.exceptions import TokenValidationError
8+
from auth0.exceptions import TokenValidationError
99

1010

1111
class SignatureVerifier(object):

auth0/v3/authentication/users.py auth0/authentication/users.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
import warnings
2-
3-
from auth0.v3.rest import RestClient, RestClientOptions
1+
from auth0.rest import RestClient, RestClientOptions
42

53

64
class Users(object):
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

auth0/v3/rest.py auth0/rest.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
import requests
99

10-
from auth0.v3.exceptions import Auth0Error, RateLimitError
10+
from auth0.exceptions import Auth0Error, RateLimitError
1111

1212
UNKNOWN_ERROR = "a0.sdk.internal.unknown"
1313

auth0/v3/rest_async.py auth0/rest_async.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import aiohttp
44

5-
from auth0.v3.exceptions import RateLimitError
5+
from auth0.exceptions import RateLimitError
66

77
from .rest import EmptyResponse, JsonResponse, PlainResponse, RestClient
88

File renamed without changes.
File renamed without changes.

auth0/v3/test/authentication/test_database.py auth0/test/authentication/test_database.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77

88
class TestDatabase(unittest.TestCase):
9-
@mock.patch("auth0.v3.rest.RestClient.post")
9+
@mock.patch("auth0.rest.RestClient.post")
1010
def test_#(self, mock_post):
1111
d = Database("my.domain.com", "cid")
1212

@@ -61,7 +61,7 @@ def test_#(self, mock_post):
6161
},
6262
)
6363

64-
@mock.patch("auth0.v3.rest.RestClient.post")
64+
@mock.patch("auth0.rest.RestClient.post")
6565
def test_change_password(self, mock_post):
6666
d = Database("my.domain.com", "cid")
6767

auth0/v3/test/authentication/test_delegated.py auth0/test/authentication/test_delegated.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77

88
class TestDelegated(unittest.TestCase):
9-
@mock.patch("auth0.v3.authentication.delegated.Delegated.post")
9+
@mock.patch("auth0.authentication.delegated.Delegated.post")
1010
def test_get_token_id_token(self, mock_post):
1111

1212
d = Delegated("my.domain.com", "cid")
@@ -34,7 +34,7 @@ def test_get_token_id_token(self, mock_post):
3434
},
3535
)
3636

37-
@mock.patch("auth0.v3.authentication.delegated.Delegated.post")
37+
@mock.patch("auth0.authentication.delegated.Delegated.post")
3838
def test_get_token_refresh_token(self, mock_post):
3939

4040
d = Delegated("my.domain.com", "cid")
@@ -61,7 +61,7 @@ def test_get_token_refresh_token(self, mock_post):
6161
},
6262
)
6363

64-
@mock.patch("auth0.v3.authentication.delegated.Delegated.post")
64+
@mock.patch("auth0.authentication.delegated.Delegated.post")
6565
def test_get_token_value_error(self, mock_post):
6666

6767
d = Delegated("my.domain.com", "cid")

auth0/v3/test/authentication/test_enterprise.py auth0/test/authentication/test_enterprise.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77

88
class TestEnterprise(unittest.TestCase):
9-
@mock.patch("auth0.v3.authentication.enterprise.Enterprise.get")
9+
@mock.patch("auth0.authentication.enterprise.Enterprise.get")
1010
def test_saml_metadata(self, mock_get):
1111

1212
e = Enterprise("my.domain.com", "cid")
@@ -15,7 +15,7 @@ def test_saml_metadata(self, mock_get):
1515

1616
mock_get.assert_called_with(url="https://my.domain.com/samlp/metadata/cid")
1717

18-
@mock.patch("auth0.v3.authentication.enterprise.Enterprise.get")
18+
@mock.patch("auth0.authentication.enterprise.Enterprise.get")
1919
def test_wsfed_metadata(self, mock_get):
2020

2121
e = Enterprise("my.domain.com", "cid")

auth0/v3/test/authentication/test_get_token.py auth0/test/authentication/test_get_token.py

+9-9
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def get_private_key():
2020

2121

2222
class TestGetToken(unittest.TestCase):
23-
@mock.patch("auth0.v3.rest.RestClient.post")
23+
@mock.patch("auth0.rest.RestClient.post")
2424
def test_authorization_code(self, mock_post):
2525

2626
g = GetToken("my.domain.com", "cid", client_secret="clsec")
@@ -45,7 +45,7 @@ def test_authorization_code(self, mock_post):
4545
},
4646
)
4747

48-
@mock.patch("auth0.v3.rest.RestClient.post")
48+
@mock.patch("auth0.rest.RestClient.post")
4949
def test_authorization_code_with_client_assertion(self, mock_post):
5050

5151
g = GetToken(
@@ -69,7 +69,7 @@ def test_authorization_code_with_client_assertion(self, mock_post):
6969
},
7070
)
7171

72-
@mock.patch("auth0.v3.rest.RestClient.post")
72+
@mock.patch("auth0.rest.RestClient.post")
7373
def test_authorization_code_pkce(self, mock_post):
7474

7575
g = GetToken("my.domain.com", "cid")
@@ -95,7 +95,7 @@ def test_authorization_code_pkce(self, mock_post):
9595
},
9696
)
9797

98-
@mock.patch("auth0.v3.rest.RestClient.post")
98+
@mock.patch("auth0.rest.RestClient.post")
9999
def test_client_credentials(self, mock_post):
100100

101101
g = GetToken("my.domain.com", "cid", client_secret="clsec")
@@ -115,7 +115,7 @@ def test_client_credentials(self, mock_post):
115115
},
116116
)
117117

118-
@mock.patch("auth0.v3.rest.RestClient.post")
118+
@mock.patch("auth0.rest.RestClient.post")
119119
def test_client_credentials_with_client_assertion(self, mock_post):
120120
g = GetToken(
121121
"my.domain.com", "cid", client_assertion_signing_key=get_private_key()
@@ -137,7 +137,7 @@ def test_client_credentials_with_client_assertion(self, mock_post):
137137
},
138138
)
139139

140-
@mock.patch("auth0.v3.rest.RestClient.post")
140+
@mock.patch("auth0.rest.RestClient.post")
141141
def test_login(self, mock_post):
142142

143143
g = GetToken("my.domain.com", "cid", client_secret="clsec")
@@ -168,7 +168,7 @@ def test_login(self, mock_post):
168168
},
169169
)
170170

171-
@mock.patch("auth0.v3.rest.RestClient.post")
171+
@mock.patch("auth0.rest.RestClient.post")
172172
def test_refresh_token(self, mock_post):
173173
g = GetToken("my.domain.com", "cid", client_secret="clsec")
174174

@@ -192,7 +192,7 @@ def test_refresh_token(self, mock_post):
192192
},
193193
)
194194

195-
@mock.patch("auth0.v3.rest.RestClient.post")
195+
@mock.patch("auth0.rest.RestClient.post")
196196
def test_passwordless_login_with_sms(self, mock_post):
197197

198198
g = GetToken("my.domain.com", "cid", client_secret="csec")
@@ -222,7 +222,7 @@ def test_passwordless_login_with_sms(self, mock_post):
222222
},
223223
)
224224

225-
@mock.patch("auth0.v3.rest.RestClient.post")
225+
@mock.patch("auth0.rest.RestClient.post")
226226
def test_passwordless_login_with_email(self, mock_post):
227227
g = GetToken("my.domain.com", "cid", client_secret="csec")
228228

0 commit comments

Comments
 (0)