1
0
mirror of https://gitlab.crans.org/bde/nk20 synced 2025-06-21 01:48:21 +02:00

[oauth2] Add view to generate authorization link per application with given scopes

Signed-off-by: Yohann D'ANELLO <ynerant@crans.org>
This commit is contained in:
2021-06-16 00:01:35 +02:00
parent 898f6d52bf
commit 7ea36a5415
5 changed files with 137 additions and 27 deletions

View File

@ -1,10 +1,17 @@
# Copyright (C) 2018-2021 by BDE ENS Paris-Saclay
# SPDX-License-Identifier: GPL-3.0-or-later
from django.conf import settings
from django.urls import path
from permission.views import RightsView
from .views import RightsView, ScopesView
app_name = 'permission'
urlpatterns = [
path('rights', RightsView.as_view(), name="rights"),
path('rights/', RightsView.as_view(), name="rights"),
]
if "oauth2_provider" in settings.INSTALLED_APPS:
urlpatterns += [
path('scopes/', ScopesView.as_view(), name="scopes"),
]