Skip to content

Commit

Permalink
DPAT-0000 upgrade auth0
Browse files Browse the repository at this point in the history
  • Loading branch information
ymao2 committed Nov 9, 2023
1 parent d14449e commit 075d096
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 15 deletions.
16 changes: 8 additions & 8 deletions controlpanel/api/auth0.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
# Third-party
import structlog
import yaml
from auth0.v3 import authentication, exceptions
from auth0.v3.management import Auth0
from auth0.v3.management.clients import Clients
from auth0.v3.management.connections import Connections
from auth0.v3.management.device_credentials import DeviceCredentials
from auth0.v3.management.rest import RestClient
from auth0.v3.management.users import Users
from auth0 import authentication, exceptions
from auth0.management import Auth0
from auth0.management.clients import Clients
from auth0.management.connections import Connections
from auth0.management.device_credentials import DeviceCredentials
from auth0.rest import RestClient
from auth0.management.users import Users
from django.conf import settings
from jinja2 import Environment
from rest_framework.exceptions import APIException
Expand All @@ -27,7 +27,7 @@
# This is the maximum they'll allow for group/members API
PER_PAGE_FOR_GROUP_MEMBERS = 25

# The default value for timeout in auth0.v3.management is 5 seconds which will
# The default value for timeout in auth0.management is 5 seconds which will
# get ReadTimeOut error quite easily on Auth0 dev tenant when Control panel
# initialises the connection with it. In order to avoid this, a longer timeout
# is defined below as the default value for this app. This value will be passed
Expand Down
2 changes: 1 addition & 1 deletion controlpanel/api/models/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import uuid

# Third-party
from auth0.v3.exceptions import Auth0Error
from auth0.exceptions import Auth0Error
from django.conf import settings
from django.db import models
from django_extensions.db.fields import AutoSlugField
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from datetime import datetime

# Third-party
from auth0.v3.exceptions import Auth0Error
from auth0.exceptions import Auth0Error
from django.core.management.base import BaseCommand, CommandError
from django.conf import settings

Expand Down
2 changes: 1 addition & 1 deletion controlpanel/cli/management/commands/export_auth0_log.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from time import time

from controlpanel.api import auth0
from auth0.v3.management.logs import Logs
from auth0.management.logs import Logs


class Command(BaseCommand):
Expand Down
2 changes: 1 addition & 1 deletion controlpanel/frontend/views/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from django.views.generic.edit import CreateView, DeleteView, FormMixin, UpdateView
from django.views.generic.list import ListView
from rules.contrib.views import PermissionRequiredMixin
from auth0.v3.management.rest import Auth0Error
from auth0.rest import Auth0Error

# First-party/Local
from controlpanel.api import auth0, cluster
Expand Down
2 changes: 1 addition & 1 deletion tests/api/test_auth0.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import mock
import pytest
from django.conf import settings
from auth0.v3 import exceptions
from auth0 import exceptions

# First-party/Local
from controlpanel.api import auth0
Expand Down
2 changes: 1 addition & 1 deletion tests/api/views/test_customer.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from unittest.mock import patch

# Third-party
from auth0.v3.management.rest import Auth0Error
from auth0.rest import Auth0Error
from bs4 import BeautifulSoup
from model_mommy import mommy
import pytest
Expand Down
2 changes: 1 addition & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
@pytest.fixture()
def ExtendedAuth0():
with patch(
"auth0.v3.authentication.GetToken.client_credentials"
"auth0.authentication.GetToken.client_credentials"
) as client_credentials:
client_credentials.return_value = {"access_token": "access_token_testing"}
yield auth0.ExtendedAuth0()
Expand Down

0 comments on commit 075d096

Please sign in to comment.