Fix urls and names.

This commit is contained in:
Ignacio Fiorentino 2016-11-01 12:15:48 -03:00
parent f8e0f2dc2c
commit e458542be2
5 changed files with 8 additions and 8 deletions

View file

@ -56,7 +56,7 @@ def get_issuer(site_url=None, request=None):
appended.
"""
site_url = get_site_url(site_url=site_url, request=request)
path = reverse('oidc_provider:provider_info') \
path = reverse('oidc_provider:provider-info') \
.split('/.well-known/openid-configuration')[0]
issuer = site_url + path

View file

@ -4,11 +4,11 @@ from django.test import TestCase
from oidc_provider.tests.app.utils import create_fake_user
class UserInfoTestCase(TestCase):
class EndSessionTestCase(TestCase):
def setUp(self):
self.user = create_fake_user()
self.url = reverse('oidc_provider:logout')
self.url = reverse('oidc_provider:end-session')
def test_shows_logged_out_page(self):
response = self.client.get(self.url)

View file

@ -15,7 +15,7 @@ class ProviderInfoTestCase(TestCase):
See if the endpoint is returning the corresponding
server information by checking status, content type, etc.
"""
url = reverse('oidc_provider:provider_info')
url = reverse('oidc_provider:provider-info')
request = self.factory.get(url)

View file

@ -11,9 +11,9 @@ urlpatterns = [
url(r'^authorize/?$', views.AuthorizeView.as_view(), name='authorize'),
url(r'^token/?$', csrf_exempt(views.TokenView.as_view()), name='token'),
url(r'^userinfo/?$', csrf_exempt(views.userinfo), name='userinfo'),
url(r'^logout/?$', views.LogoutView.as_view(), name='logout'),
url(r'^end-session/?$', views.EndSessionView.as_view(), name='end-session'),
url(r'^\.well-known/openid-configuration/?$', views.ProviderInfoView.as_view(), name='provider_info'),
url(r'^\.well-known/openid-configuration/?$', views.ProviderInfoView.as_view(), name='provider-info'),
url(r'^jwks/?$', views.JwksView.as_view(), name='jwks'),
]

View file

@ -207,7 +207,7 @@ class ProviderInfoView(View):
dic['authorization_endpoint'] = site_url + reverse('oidc_provider:authorize')
dic['token_endpoint'] = site_url + reverse('oidc_provider:token')
dic['userinfo_endpoint'] = site_url + reverse('oidc_provider:userinfo')
dic['end_session_endpoint'] = site_url + reverse('oidc_provider:logout')
dic['end_session_endpoint'] = site_url + reverse('oidc_provider:end-session')
types_supported = [x[0] for x in RESPONSE_TYPE_CHOICES]
dic['response_types_supported'] = types_supported
@ -253,7 +253,7 @@ class JwksView(View):
return response
class LogoutView(View):
class EndSessionView(View):
def get(self, request, *args, **kwargs):
id_token_hint = request.GET.get('id_token_hint', '')