Files
edx-platform/lms/djangoapps/oauth_dispatch/urls.py
J. Cliff Dyer 1270df1500 Enable dispatch of Authorization endpoint.
* Created URL route
* Expanded test code to confirm expected behavior

MA-2124
2016-06-02 13:58:38 +00:00

26 lines
678 B
Python

"""
OAuth2 wrapper urls
"""
from django.conf import settings
from django.conf.urls import patterns, url
from django.views.decorators.csrf import csrf_exempt
from . import views
urlpatterns = patterns(
'',
url(r'^authorize/?$', csrf_exempt(views.AuthorizationView.as_view()), name='authorize'),
url(r'^access_token/?$', csrf_exempt(views.AccessTokenView.as_view()), name='access_token'),
)
if settings.FEATURES.get('ENABLE_THIRD_PARTY_AUTH'):
urlpatterns += (
url(
r'^exchange_access_token/(?P<backend>[^/]+)/$',
csrf_exempt(views.AccessTokenExchangeView.as_view()),
name='exchange_access_token',
),
)