Use renamed edx_oauth2_provider throughout.
MA-1998 Install and configure django_oauth_toolkit to coexist with existing oauth libraries.
This commit is contained in:
@@ -5,7 +5,7 @@ from django.conf import settings
|
||||
from django.core.urlresolvers import reverse
|
||||
import httpretty
|
||||
import mock
|
||||
from oauth2_provider.tests.factories import ClientFactory
|
||||
from edx_oauth2_provider.tests.factories import ClientFactory
|
||||
from provider.constants import CONFIDENTIAL
|
||||
|
||||
from openedx.core.djangoapps.programs.models import ProgramsApiConfig
|
||||
|
||||
@@ -867,7 +867,7 @@ INSTALLED_APPS = (
|
||||
# OAuth2 Provider
|
||||
'provider',
|
||||
'provider.oauth2',
|
||||
'oauth2_provider',
|
||||
'edx_oauth2_provider',
|
||||
|
||||
# These are apps that aren't strictly needed by Studio, but are imported by
|
||||
# other apps that are. Django 1.8 wants to have imported models supported
|
||||
|
||||
@@ -3,7 +3,7 @@ Forms to support third-party to first-party OAuth 2.0 access token exchange
|
||||
"""
|
||||
from django.contrib.auth.models import User
|
||||
from django.forms import CharField
|
||||
from oauth2_provider.constants import SCOPE_NAMES
|
||||
from edx_oauth2_provider.constants import SCOPE_NAMES
|
||||
import provider.constants
|
||||
from provider.forms import OAuthForm, OAuthValidationError
|
||||
from provider.oauth2.forms import ScopeChoiceField, ScopeMixin
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1143,6 +1143,7 @@ CREATE TABLE `course_overviews_courseoverview` (
|
||||
`end` datetime(6) DEFAULT NULL,
|
||||
`advertised_start` longtext,
|
||||
`course_image_url` longtext NOT NULL,
|
||||
`facebook_url` longtext,
|
||||
`social_sharing_url` longtext,
|
||||
`end_of_course_survey_url` longtext,
|
||||
`certificates_display_behavior` longtext,
|
||||
@@ -1167,7 +1168,6 @@ CREATE TABLE `course_overviews_courseoverview` (
|
||||
`effort` longtext,
|
||||
`short_description` longtext,
|
||||
`org` longtext NOT NULL,
|
||||
`facebook_url` longtext,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
@@ -1658,7 +1658,7 @@ CREATE TABLE `django_migrations` (
|
||||
`name` varchar(255) NOT NULL,
|
||||
`applied` datetime(6) NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=119 DEFAULT CHARSET=utf8;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=120 DEFAULT CHARSET=utf8;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
DROP TABLE IF EXISTS `django_openid_auth_association`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
|
||||
@@ -22,7 +22,8 @@ CREATE TABLE `coursewarehistoryextended_studentmodulehistoryextended` (
|
||||
`student_module_id` int(11) NOT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `coursewarehistoryextended_studentmodulehistoryextended_2af72f10` (`version`),
|
||||
KEY `coursewarehistoryextended_studentmodulehistoryextended_e2fa5388` (`created`)
|
||||
KEY `coursewarehistoryextended_studentmodulehistoryextended_e2fa5388` (`created`),
|
||||
KEY `coursewarehistoryextended_student_module_id_61b23a7a1dd27fe4_idx` (`student_module_id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=10000 DEFAULT CHARSET=utf8;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
DROP TABLE IF EXISTS `django_migrations`;
|
||||
@@ -34,7 +35,7 @@ CREATE TABLE `django_migrations` (
|
||||
`name` varchar(255) NOT NULL,
|
||||
`applied` datetime(6) NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=119 DEFAULT CHARSET=utf8;
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=120 DEFAULT CHARSET=utf8;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
|
||||
|
||||
|
||||
Binary file not shown.
@@ -9,7 +9,7 @@ from mock import patch, Mock
|
||||
from django.core.urlresolvers import reverse
|
||||
|
||||
from capa.tests.response_xml_factory import MultipleChoiceResponseXMLFactory
|
||||
from oauth2_provider.tests.factories import AccessTokenFactory, ClientFactory
|
||||
from edx_oauth2_provider.tests.factories import AccessTokenFactory, ClientFactory
|
||||
from opaque_keys.edx.locator import CourseLocator
|
||||
from xmodule.error_module import ErrorDescriptor
|
||||
from xmodule.modulestore import ModuleStoreEnum
|
||||
|
||||
@@ -20,7 +20,7 @@ from django.core.urlresolvers import reverse
|
||||
from django.core.exceptions import ImproperlyConfigured
|
||||
from django.test.client import RequestFactory
|
||||
from django.test.utils import override_settings
|
||||
from oauth2_provider.tests.factories import ClientFactory
|
||||
from edx_oauth2_provider.tests.factories import ClientFactory
|
||||
from provider.oauth2.models import Client
|
||||
from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory
|
||||
from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase
|
||||
|
||||
@@ -115,7 +115,7 @@ class CourseAccessHandler(object):
|
||||
|
||||
For a description of the function naming and arguments, see:
|
||||
|
||||
`oauth2_provider/oidc/handlers.py`
|
||||
`edx_oauth2_provider/oidc/handlers.py`
|
||||
|
||||
"""
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase
|
||||
|
||||
|
||||
# Will also run default tests for IDTokens and UserInfo
|
||||
from oauth2_provider.tests import IDTokenTestCase, UserInfoTestCase
|
||||
from edx_oauth2_provider.tests import IDTokenTestCase, UserInfoTestCase
|
||||
|
||||
|
||||
class BaseTestMixin(ModuleStoreTestCase):
|
||||
|
||||
@@ -440,16 +440,16 @@ OAUTH_OIDC_ISSUER = 'https:/example.com/oauth2'
|
||||
# OpenID Connect claim handlers
|
||||
|
||||
OAUTH_OIDC_ID_TOKEN_HANDLERS = (
|
||||
'oauth2_provider.oidc.handlers.BasicIDTokenHandler',
|
||||
'oauth2_provider.oidc.handlers.ProfileHandler',
|
||||
'oauth2_provider.oidc.handlers.EmailHandler',
|
||||
'edx_oauth2_provider.oidc.handlers.BasicIDTokenHandler',
|
||||
'edx_oauth2_provider.oidc.handlers.ProfileHandler',
|
||||
'edx_oauth2_provider.oidc.handlers.EmailHandler',
|
||||
'oauth2_handler.IDTokenHandler'
|
||||
)
|
||||
|
||||
OAUTH_OIDC_USERINFO_HANDLERS = (
|
||||
'oauth2_provider.oidc.handlers.BasicUserInfoHandler',
|
||||
'oauth2_provider.oidc.handlers.ProfileHandler',
|
||||
'oauth2_provider.oidc.handlers.EmailHandler',
|
||||
'edx_oauth2_provider.oidc.handlers.BasicUserInfoHandler',
|
||||
'edx_oauth2_provider.oidc.handlers.ProfileHandler',
|
||||
'edx_oauth2_provider.oidc.handlers.EmailHandler',
|
||||
'oauth2_handler.UserInfoHandler'
|
||||
)
|
||||
|
||||
@@ -1837,7 +1837,7 @@ INSTALLED_APPS = (
|
||||
# OAuth2 Provider
|
||||
'provider',
|
||||
'provider.oauth2',
|
||||
'oauth2_provider',
|
||||
'edx_oauth2_provider',
|
||||
|
||||
'third_party_auth',
|
||||
|
||||
|
||||
@@ -820,7 +820,7 @@ if settings.FEATURES.get('AUTH_USE_OPENID_PROVIDER'):
|
||||
|
||||
if settings.FEATURES.get('ENABLE_OAUTH2_PROVIDER'):
|
||||
urlpatterns += (
|
||||
url(r'^oauth2/', include('oauth2_provider.urls', namespace='oauth2')),
|
||||
url(r'^oauth2/', include('edx_oauth2_provider.urls', namespace='oauth2')),
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ from django.core.cache import cache
|
||||
from django.test import TestCase
|
||||
from nose.plugins.attrib import attr
|
||||
import httpretty
|
||||
from oauth2_provider.tests.factories import ClientFactory
|
||||
from edx_oauth2_provider.tests.factories import ClientFactory
|
||||
from provider.constants import CONFIDENTIAL
|
||||
|
||||
from openedx.core.djangoapps.credentials.tests.mixins import CredentialsApiConfigMixin, CredentialsDataMixin
|
||||
|
||||
@@ -15,7 +15,7 @@ from django.conf import settings
|
||||
from django.core.urlresolvers import reverse
|
||||
from django.test import TestCase, Client
|
||||
from django.test.utils import override_settings
|
||||
from oauth2_provider.tests.factories import AccessTokenFactory, ClientFactory
|
||||
from edx_oauth2_provider.tests.factories import AccessTokenFactory, ClientFactory
|
||||
from opaque_keys.edx.keys import CourseKey
|
||||
import pytz
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ from django.conf import settings
|
||||
from django.test import override_settings, TestCase
|
||||
from edx_rest_api_client.client import EdxRestApiClient
|
||||
|
||||
from oauth2_provider.tests.factories import ClientFactory
|
||||
from edx_oauth2_provider.tests.factories import ClientFactory
|
||||
from openedx.core.djangoapps.credentials.tests.mixins import CredentialsApiConfigMixin
|
||||
from openedx.core.djangoapps.programs.tests.mixins import ProgramsApiConfigMixin
|
||||
from openedx.core.djangoapps.programs.tasks.v1 import tasks
|
||||
|
||||
@@ -7,7 +7,7 @@ from django.test import TestCase
|
||||
import httpretty
|
||||
import mock
|
||||
from nose.plugins.attrib import attr
|
||||
from oauth2_provider.tests.factories import ClientFactory
|
||||
from edx_oauth2_provider.tests.factories import ClientFactory
|
||||
from provider.constants import CONFIDENTIAL
|
||||
|
||||
from openedx.core.djangoapps.credentials.tests.mixins import CredentialsApiConfigMixin
|
||||
|
||||
@@ -7,7 +7,7 @@ from django.test import TestCase
|
||||
import httpretty
|
||||
import mock
|
||||
from nose.plugins.attrib import attr
|
||||
from oauth2_provider.tests.factories import ClientFactory
|
||||
from edx_oauth2_provider.tests.factories import ClientFactory
|
||||
from provider.constants import CONFIDENTIAL
|
||||
from testfixtures import LogCapture
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ from django.test.utils import override_settings
|
||||
import freezegun
|
||||
import jwt
|
||||
from nose.plugins.attrib import attr
|
||||
from oauth2_provider.tests.factories import ClientFactory
|
||||
from edx_oauth2_provider.tests.factories import ClientFactory
|
||||
from provider.constants import CONFIDENTIAL
|
||||
|
||||
from openedx.core.lib.token_utils import get_id_token
|
||||
|
||||
Reference in New Issue
Block a user