Skip to content

Commit db5a478

Browse files
committed
use path in urls
1 parent dc3d8ff commit db5a478

File tree

1 file changed

+15
-16
lines changed

1 file changed

+15
-16
lines changed

oauth2_provider/urls.py

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from django.urls import re_path
1+
from django.urls import path, re_path
22

33
from . import views
44

@@ -7,24 +7,23 @@
77

88

99
base_urlpatterns = [
10-
re_path(r"^authorize/$", views.AuthorizationView.as_view(), name="authorize"),
11-
re_path(r"^token/$", views.TokenView.as_view(), name="token"),
12-
re_path(r"^revoke_token/$", views.RevokeTokenView.as_view(), name="revoke-token"),
13-
re_path(r"^introspect/$", views.IntrospectTokenView.as_view(), name="introspect"),
10+
path("authorize/", views.AuthorizationView.as_view(), name="authorize"),
11+
path("token/", views.TokenView.as_view(), name="token"),
12+
path("revoke_token/", views.RevokeTokenView.as_view(), name="revoke-token"),
13+
path("introspect/", views.IntrospectTokenView.as_view(), name="introspect"),
1414
]
1515

1616

1717
management_urlpatterns = [
1818
# Application management views
19-
re_path(r"^applications/$", views.ApplicationList.as_view(), name="list"),
20-
re_path(r"^applications/register/$", views.ApplicationRegistration.as_view(), name="register"),
21-
re_path(r"^applications/(?P<pk>[\w-]+)/$", views.ApplicationDetail.as_view(), name="detail"),
22-
re_path(r"^applications/(?P<pk>[\w-]+)/delete/$", views.ApplicationDelete.as_view(), name="delete"),
23-
re_path(r"^applications/(?P<pk>[\w-]+)/update/$", views.ApplicationUpdate.as_view(), name="update"),
19+
path("applications/", views.ApplicationList.as_view(), name="list"),
20+
path("applications/register/", views.ApplicationRegistration.as_view(), name="register"),
21+
path("applications/(?P<pk>[\w-]+)/", views.ApplicationDetail.as_view(), name="detail"),
22+
path("applications/(?P<pk>[\w-]+)/delete/", views.ApplicationDelete.as_view(), name="delete"),
23+
path("applications/(?P<pk>[\w-]+)/update/", views.ApplicationUpdate.as_view(), name="update"),
2424
# Token management views
25-
re_path(r"^authorized_tokens/$", views.AuthorizedTokensListView.as_view(), name="authorized-token-list"),
26-
re_path(
27-
r"^authorized_tokens/(?P<pk>[\w-]+)/delete/$",
25+
path("authorized_tokens/", views.AuthorizedTokensListView.as_view(), name="authorized-token-list"),
26+
path("authorized_tokens/(?P<pk>[\w-]+)/delete/",
2827
views.AuthorizedTokenDeleteView.as_view(),
2928
name="authorized-token-delete",
3029
),
@@ -40,9 +39,9 @@
4039
views.ConnectDiscoveryInfoView.as_view(),
4140
name="oidc-connect-discovery-info",
4241
),
43-
re_path(r"^\.well-known/jwks.json$", views.JwksInfoView.as_view(), name="jwks-info"),
44-
re_path(r"^userinfo/$", views.UserInfoView.as_view(), name="user-info"),
45-
re_path(r"^logout/$", views.RPInitiatedLogoutView.as_view(), name="rp-initiated-logout"),
42+
path("\.well-known/jwks.json", views.JwksInfoView.as_view(), name="jwks-info"),
43+
path("userinfo/", views.UserInfoView.as_view(), name="user-info"),
44+
path("logout/", views.RPInitiatedLogoutView.as_view(), name="rp-initiated-logout"),
4645
]
4746

4847

0 commit comments

Comments
 (0)