Initial mfa support (for internal users) #93591
@ -8,13 +8,20 @@ I've also removed the "management" URLs, as we use the admin interface for that.
|
|||||||
|
|
||||||
from django.urls import re_path
|
from django.urls import re_path
|
||||||
from django.views.generic import RedirectView
|
from django.views.generic import RedirectView
|
||||||
|
|
||||||
from oauth2_provider import views as default_oauth2_views
|
from oauth2_provider import views as default_oauth2_views
|
||||||
from oauth2_provider import urls as default_oauth2_urls
|
from oauth2_provider import urls as default_oauth2_urls
|
||||||
|
from otp_agents.decorators import otp_required
|
||||||
|
|
||||||
|
|
||||||
app_name = "oauth2_provider"
|
app_name = "oauth2_provider"
|
||||||
urlpatterns = (
|
urlpatterns = (
|
||||||
re_path(r"^authorize/?$", default_oauth2_views.AuthorizationView.as_view(), name="authorize"),
|
re_path(
|
||||||
|
r"^authorize/?$",
|
||||||
|
otp_required(accept_trusted_agent=True, if_configured=True)(
|
||||||
|
default_oauth2_views.AuthorizationView.as_view()
|
||||||
|
),
|
||||||
|
name="authorize",
|
||||||
|
),
|
||||||
re_path(r"^token/?$", default_oauth2_views.TokenView.as_view(), name="token"),
|
re_path(r"^token/?$", default_oauth2_views.TokenView.as_view(), name="token"),
|
||||||
re_path(
|
re_path(
|
||||||
r"^revoke/?$",
|
r"^revoke/?$",
|
||||||
|
Loading…
Reference in New Issue
Block a user