""" OAuth2 provider urls """ from django.contrib.auth.decorators import login_required from django.views.decorators.csrf import csrf_exempt from django.conf.urls import patterns, url from oauth2_provider.views import Authorize, Redirect, Capture, AccessTokenView, UserInfoView urlpatterns = patterns( '', url('^authorize/?$', login_required(Capture.as_view()), name='capture'), url('^authorize/confirm/?$', login_required(Authorize.as_view()), name='authorize'), url('^redirect/?$', login_required(Redirect.as_view()), name='redirect'), url('^access_token/?$', csrf_exempt(AccessTokenView.as_view()), name='access_token'), url('^user_info/?$', csrf_exempt(UserInfoView.as_view()), name='user_info'), )
""" OAuth2 provider urls """ from django.conf.urls import patterns, url from django.contrib.auth.decorators import login_required from django.views.decorators.csrf import csrf_exempt from provider.oauth2.views import AccessTokenDetailView from oauth2_provider.views import Authorize, Redirect, Capture, AccessTokenView, UserInfoView urlpatterns = patterns( '', url('^authorize/?$', login_required(Capture.as_view()), name='capture'), url('^authorize/confirm/?$', login_required(Authorize.as_view()), name='authorize'), url('^redirect/?$', login_required(Redirect.as_view()), name='redirect'), url('^access_token/?$', csrf_exempt(AccessTokenView.as_view()), name='access_token'), url('^access_token/(?P<token>[\w]+)/$', csrf_exempt(AccessTokenDetailView.as_view()), name='access_token_detail'), url('^user_info/?$', csrf_exempt(UserInfoView.as_view()), name='user_info'), )
'django.contrib.auth.views.password_reset_confirm', {'post_reset_redirect': '/user/password/done/', 'set_password_form': CustomSetPasswordForm}), (r'^user/password/done/$', 'django.contrib.auth.views.password_reset_complete'), url(r'^email-sent/$', 'apps.profiler.views.validation_sent'), url(r'^ajax-auth/(?P<backend>[^/]+)/$', 'apps.profiler.views.ajax_auth', name='ajax-auth'), url(r'^email/$', 'apps.profiler.views.require_email', name='require_email'), url(r'^email-change/$', 'apps.profiler.views.email_change', name='email_change'), url(r'^incorrect-activation-key/$', IncorrectKeyView.as_view(), name='incorrect_key'), url('^oauth2/redirect/?$', set_auth_cookie(login_required(Redirect.as_view())), name='redirect'), url(r'^oauth2/', include('oauth2_provider.urls', namespace='oauth2')), # url(r'^done/$', 'apps.profiler.views.done', name='done'), # url(r'^/receiver.html$', # TemplateView.as_view(template_name='-receiver.html')), # API url(r'^', include('apps.openedx_objects.urls', namespace='api-edx')), url(r'^', include('apps.permissions.urls', namespace='api-permissions')) ) if settings.DEBUG: urlpatterns += patterns( '', url(r'^media/(?P<path>.*)$', 'django.views.static.serve', {