2014-12-19 15:27:43 +00:00
|
|
|
from django.conf.urls import patterns, include, url
|
|
|
|
from django.views.decorators.csrf import csrf_exempt
|
|
|
|
|
2015-01-12 22:13:48 +00:00
|
|
|
from openid_provider.views import clients
|
|
|
|
from openid_provider.views import endpoints
|
2014-12-19 15:27:43 +00:00
|
|
|
|
|
|
|
urlpatterns = patterns('',
|
|
|
|
|
2015-01-12 22:13:48 +00:00
|
|
|
url(r'^authorize/$', endpoints.AuthorizeView.as_view(), name='authorize'),
|
|
|
|
url(r'^token/$', csrf_exempt(endpoints.TokenView.as_view()), name='token'),
|
|
|
|
url(r'^userinfo/$', csrf_exempt(endpoints.userinfo), name='userinfo'),
|
|
|
|
|
2015-01-13 21:46:57 +00:00
|
|
|
url(r'^login/$', 'django.contrib.auth.views.login', { 'template_name': 'openid_provider/login.html' }, name='login'),
|
|
|
|
url(r'^logout/$', 'django.contrib.auth.views.logout', { 'template_name': 'openid_provider/logout.html' }, name='logout'),
|
2015-01-12 22:13:48 +00:00
|
|
|
|
2015-01-13 21:46:57 +00:00
|
|
|
url(r'^clients/$', clients.ClientListView.as_view(), name='client_list'),
|
|
|
|
url(r'^clients/(?P<pk>[\d]+)/$', clients.ClientDetailView.as_view(), name='client_detail'),
|
2014-12-19 15:27:43 +00:00
|
|
|
|
|
|
|
)
|