Skip to content

Commit 2d98e57

Browse files
Apply suggestions from code review
Co-authored-by: Rita Zerrizuela <zeta@widcket.com>
1 parent 9995993 commit 2d98e57

10 files changed

Lines changed: 29 additions & 29 deletions

File tree

EXAMPLES.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
- [Authentication SDK](#authentication-sdk)
44
- [ID token validation](#id-token-validation)
5-
- [Authenticating with a application configured to use `private_key_jwt` token endpoint auth method.](#authenticating-with-a-application-configured-to-use-private-key-jwt-token-endpoint-auth-method)
5+
- [Authenticating with a application configured to use `private_key_jwt` token endpoint auth method](#authenticating-with-a-application-configured-to-use-private-key-jwt-token-endpoint-auth-method)
66
- [Management SDK](#management-sdk)
77
- [Connections](#connections)
88
- [Error handling](#error-handling)
@@ -50,7 +50,7 @@ tv.verify(id_token)
5050

5151
If the token verification fails, a `TokenValidationError` will be raised. In that scenario, the ID token should be deemed invalid and its contents should not be trusted.
5252

53-
### Authenticating with a application configured to use `private_key_jwt` token endpoint auth method.
53+
### Authenticating with a application configured to use `private_key_jwt` token endpoint auth method
5454

5555
```python
5656
from auth0.v3.authentication import GetToken
@@ -63,12 +63,12 @@ MIIJKQIBAAKCAgEAwfUb0nUC0aKB3WiytFhnCIg455BYC+dR3MUGadWpIg7S6lbi
6363
"""
6464

6565
get_token = GetToken(
66-
"my-domain.auth0.com",
66+
"my-domain.us.auth0.com",
6767
"my-client-id",
6868
client_assertion_signing_key=private_key,
6969
)
7070
token = get_token.client_credentials(
71-
"https://my-domain.auth0.com/api/v2/"
71+
"https://my-domain.us.auth0.com/api/v2/"
7272
)
7373
```
7474

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ For example:
3838
```python
3939
from auth0.v3.authentication import Social
4040

41-
social = Social('myaccount.auth0.com', 'my-client-id')
41+
social = Social('my-domain.us.auth0.com', 'my-client-id')
4242

4343
social.login(access_token='...', connection='facebook')
4444
```
@@ -48,7 +48,7 @@ If you need to sign up a user using their email and password, you can use the Da
4848
```python
4949
from auth0.v3.authentication import Database
5050

51-
database = Database('myaccount.auth0.com', 'my-client-id')
51+
database = Database('my-domain.us.auth0.com', 'my-client-id')
5252

5353
database.signup(email='user@domain.com', password='secr3t', connection='Username-Password-Authentication')
5454
```
@@ -58,7 +58,7 @@ If you need to authenticate a user using their email and password, you can use t
5858
```python
5959
from auth0.v3.authentication import GetToken
6060

61-
token = GetToken('myaccount.auth0.com', 'my-client-id', client_secret='my-client-secret')
61+
token = GetToken('my-domain.us.auth0.com', 'my-client-id', client_secret='my-client-secret')
6262

6363
token.login(username='user@domain.com', password='secr3t', realm='Username-Password-Authentication')
6464
```

V4_MIGRATION_GUIDE.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,21 @@
33
Guide to migrating from `3.x` to `4.x`
44

55
- [Python <3.6 is no longer supported](#python-36-is-no-longer-supported)
6-
- [Client ID and Client Secret are now specified in the constructor for Authentication Clients](#client-id-and-client-secret-are-now-specified-in-the-constructor-for-authentication-clients)
6+
- [Client ID and client secret are now specified in the constructor for authentication clients](#client-id-and-client-secret-are-now-specified-in-the-constructor-for-authentication-clients)
77
- [AuthorizeClient and Logout have been removed](#authorizeclient-and-logout-have-been-removed)
88

99
## Python <3.6 is no longer supported
1010

1111
Python 3.5 and Python 2 are EOL and are no longer supported.
1212

13-
## Client ID and Client Secret are now specified in the constructor for Authentication Clients
13+
## Client ID and client secret are now specified in the constructor for authentication clients
1414

1515
### Before
1616

1717
```py
1818
from auth0.v3.authentication import GetToken
1919

20-
get_token = GetToken('myaccount.auth0.com')
20+
get_token = GetToken('my-domain.us.auth0.com')
2121

2222
get_token.client_credentials('my-client-id', 'my-client-secret', 'my-api')
2323
```
@@ -28,7 +28,7 @@ get_token.client_credentials('my-client-id', 'my-client-secret', 'my-api')
2828
from auth0.v3.authentication import GetToken
2929

3030
# `client_secret` is optional (you can now use `client_assertion_signing_key` as an alternative)
31-
get_token = GetToken('myaccount.auth0.com', 'my-client-id', client_secret='my-client-secret')
31+
get_token = GetToken('my-domain.us.auth0.com', 'my-client-id', client_secret='my-client-secret')
3232

3333
get_token.client_credentials('my-api')
3434
```

auth0/v3/authentication/base.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ class AuthenticationBase(object):
1717
"""Base authentication object providing simple REST methods.
1818
1919
Args:
20-
domain (str): The domain of your auth0 tenant
21-
client_id (str): your application's client Id
22-
client_secret (str, optional): your application's client Secret
20+
domain (str): The domain of your Auth0 tenant
21+
client_id (str): Your application's client ID
22+
client_secret (str, optional): Your application's client secret
2323
client_assertion_signing_key (str, optional): Private key used to sign the client assertion JWT.
24-
client_assertion_signing_alg (str, optional): Algorithm used to sign the client assertion JWT (Default RS256).
25-
telemetry (bool, optional): Enable or disable Telemetry (defaults to True)
24+
client_assertion_signing_alg (str, optional): Algorithm used to sign the client assertion JWT (defaults to 'RS256').
25+
telemetry (bool, optional): Enable or disable telemetry (defaults to True)
2626
timeout (float or tuple, optional): Change the requests connect and read timeout. Pass a tuple to specify both values separately or a float to set both to it. (defaults to 5.0 for both)
2727
protocol (str, optional): Useful for testing. (defaults to 'https')
2828
"""

auth0/v3/authentication/client_authentication.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ def create_client_assertion_jwt(
1010
"""Creates a JWT for the client_assertion field.
1111
1212
Args:
13-
domain (str): The domain of your auth0 tenant
14-
client_id (str): your application's client Id
13+
domain (str): The domain of your Auth0 tenant
14+
client_id (str): Your application's client ID
1515
client_assertion_signing_key (str, optional): Private key used to sign the client assertion JWT
16-
client_assertion_signing_alg (str, optional): Algorithm used to sign the client assertion JWT (Default RS256)
16+
client_assertion_signing_alg (str, optional): Algorithm used to sign the client assertion JWT (defaults to 'RS256')
1717
1818
Returns:
1919
A JWT signed with the `client_assertion_signing_key`.
@@ -46,11 +46,11 @@ def add_client_authentication(
4646
4747
Args:
4848
payload (dict): The POST payload that needs additional fields to be authenticated.
49-
domain (str): The domain of your auth0 tenant
50-
client_id (str): your application's client Id
51-
client_secret (str): your application's client secret
49+
domain (str): The domain of your Auth0 tenant
50+
client_id (str): Your application's client ID
51+
client_secret (str): Your application's client secret
5252
client_assertion_signing_key (str, optional): Private key used to sign the client assertion JWT
53-
client_assertion_signing_alg (str, optional): Algorithm used to sign the client assertion JWT (Default RS256)
53+
client_assertion_signing_alg (str, optional): Algorithm used to sign the client assertion JWT (defaults to 'RS256')
5454
5555
Returns:
5656
A copy of the payload with client authentication fields added.

auth0/v3/authentication/enterprise.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ class Enterprise(AuthenticationBase):
66
"""Enterprise endpoints.
77
88
Args:
9-
domain (str): Your auth0 domain (e.g: username.auth0.com)
9+
domain (str): Your auth0 domain (e.g: my-domain.us.auth0.com)
1010
"""
1111

1212
def saml_metadata(self):

auth0/v3/authentication/passwordless.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class Passwordless(AuthenticationBase):
88
"""Passwordless connections endpoints.
99
1010
Args:
11-
domain (str): Your auth0 domain (e.g: username.auth0.com)
11+
domain (str): Your auth0 domain (e.g: my-domain.us.auth0.com)
1212
"""
1313

1414
def email(self, email, send="link", auth_params=None):

auth0/v3/authentication/revoke_token.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ class RevokeToken(AuthenticationBase):
55
"""Revoke Refresh Token endpoint
66
77
Args:
8-
domain (str): Your auth0 domain (e.g: username.auth0.com)
8+
domain (str): Your auth0 domain (e.g: my-domain.us.auth0.com)
99
"""
1010

1111
def revoke_refresh_token(self, token):

auth0/v3/authentication/social.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ class Social(AuthenticationBase):
66
"""Social provider's endpoints.
77
88
Args:
9-
domain (str): Your auth0 domain (e.g: username.auth0.com)
9+
domain (str): Your auth0 domain (e.g: my-domain.us.auth0.com)
1010
"""
1111

1212
def login(self, access_token, connection, scope="openid"):

auth0/v3/authentication/users.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ class Users(object):
99
"""Users client.
1010
1111
Args:
12-
domain (str): The domain of your auth0 tenant
13-
telemetry (bool, optional): Enable or disable Telemetry (defaults to True)
12+
domain (str): The domain of your Auth0 tenant
13+
telemetry (bool, optional): Enable or disable telemetry (defaults to True)
1414
timeout (float or tuple, optional): Change the requests connect and read timeout. Pass a tuple to specify both values separately or a float to set both to it. (defaults to 5.0 for both)
1515
protocol (str, optional): Useful for testing. (defaults to 'https')
1616
"""

0 commit comments

Comments
 (0)