-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
master: fix authorization, improve error messages
- Loading branch information
1 parent
fdf2407
commit 2c97ad1
Showing
3 changed files
with
41 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,16 @@ | ||
from django.urls import re_path | ||
from oauth2_provider import urls | ||
from oauth2_provider.views import IntrospectTokenView, RevokeTokenView, TokenView | ||
|
||
from trojstenid.users.views import TrojstenAuthorizationView | ||
|
||
app_name = urls.app_name | ||
|
||
urlpatterns = urls.base_urlpatterns + urls.oidc_urlpatterns | ||
base_urlpatterns = [ | ||
re_path(r"^authorize/$", TrojstenAuthorizationView.as_view(), name="authorize"), | ||
re_path(r"^token/$", TokenView.as_view(), name="token"), | ||
re_path(r"^revoke_token/$", RevokeTokenView.as_view(), name="revoke-token"), | ||
re_path(r"^introspect/$", IntrospectTokenView.as_view(), name="introspect"), | ||
] | ||
|
||
urlpatterns = base_urlpatterns + urls.oidc_urlpatterns |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters