From ebc40524952fab0b45855f8f9c8908d7d68c94a6 Mon Sep 17 00:00:00 2001 From: Marnanel Thurman Date: Thu, 18 Feb 2021 20:30:02 +0000 Subject: [PATCH] Rewrite oauth2 entries in urls.py. They were wrong, and this should have fixed issue 70, but it doesn't. --- kepi/kepi/urls.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/kepi/kepi/urls.py b/kepi/kepi/urls.py index d66a700..fed68a8 100644 --- a/kepi/kepi/urls.py +++ b/kepi/kepi/urls.py @@ -16,16 +16,19 @@ from . import settings fix_oauth2_redirects() oauth2_endpoint_views = [ - path('authorize', oauth2_views.AuthorizationView.as_view(), name="authorize"), - path('token', oauth2_views.TokenView.as_view(), name="token"), - path('revoke-token', oauth2_views.RevokeTokenView.as_view(), name="revoke-token"), + url(r'authorize/$', oauth2_views.AuthorizationView.as_view(), name="authorize"), + url(r'token/$', oauth2_views.TokenView.as_view(), name="token"), + url(r'revoke-token/$', oauth2_views.RevokeTokenView.as_view(), name="revoke-token"), ] +oauth2_patterns = (oauth2_endpoint_views, "oauth2_provider") + ################################################## urlpatterns = [ path(r'admin/', admin.site.urls), path(r'accounts/', include('django.contrib.auth.urls')), + path(r'oauth2/', include(oauth2_patterns)), # kepi's own stuff path(r'', include(kepi.tophat_ui.urls)),