2020-12-05 21:08:42 +00:00
|
|
|
"""authentik URL Configuration"""
|
2021-03-22 12:44:17 +00:00
|
|
|
from django.contrib.auth.decorators import login_required
|
2019-06-25 16:00:54 +00:00
|
|
|
from django.urls import path
|
2021-03-22 12:44:17 +00:00
|
|
|
from django.views.decorators.csrf import ensure_csrf_cookie
|
|
|
|
from django.views.generic import RedirectView
|
|
|
|
from django.views.generic.base import TemplateView
|
2018-11-11 12:41:48 +00:00
|
|
|
|
2021-03-22 12:44:17 +00:00
|
|
|
from authentik.core.views import impersonate, user
|
2018-11-11 12:41:48 +00:00
|
|
|
|
2019-06-25 16:00:54 +00:00
|
|
|
urlpatterns = [
|
2021-03-22 12:44:17 +00:00
|
|
|
path(
|
|
|
|
"",
|
|
|
|
login_required(RedirectView.as_view(pattern_name="authentik_core:if-admin")),
|
|
|
|
name="root-redirect",
|
|
|
|
),
|
2018-12-10 15:58:35 +00:00
|
|
|
# User views
|
2020-10-18 13:38:28 +00:00
|
|
|
path(
|
|
|
|
"-/user/tokens/create/",
|
|
|
|
user.TokenCreateView.as_view(),
|
|
|
|
name="user-tokens-create",
|
|
|
|
),
|
|
|
|
path(
|
|
|
|
"-/user/tokens/<slug:identifier>/update/",
|
|
|
|
user.TokenUpdateView.as_view(),
|
|
|
|
name="user-tokens-update",
|
|
|
|
),
|
2020-09-17 14:24:53 +00:00
|
|
|
# Impersonation
|
|
|
|
path(
|
|
|
|
"-/impersonation/<int:user_id>/",
|
|
|
|
impersonate.ImpersonateInitView.as_view(),
|
|
|
|
name="impersonate-init",
|
|
|
|
),
|
|
|
|
path(
|
|
|
|
"-/impersonation/end/",
|
|
|
|
impersonate.ImpersonateEndView.as_view(),
|
|
|
|
name="impersonate-end",
|
|
|
|
),
|
2021-03-22 12:44:17 +00:00
|
|
|
# Interfaces
|
|
|
|
path(
|
|
|
|
"if/admin/",
|
2021-03-23 17:09:13 +00:00
|
|
|
ensure_csrf_cookie(TemplateView.as_view(template_name="if/admin.html")),
|
2021-03-22 12:44:17 +00:00
|
|
|
name="if-admin",
|
|
|
|
),
|
|
|
|
path(
|
|
|
|
"if/flow/<slug:flow_slug>/",
|
2021-03-23 17:09:13 +00:00
|
|
|
ensure_csrf_cookie(TemplateView.as_view(template_name="if/flow.html")),
|
2021-03-22 12:44:17 +00:00
|
|
|
name="if-flow",
|
|
|
|
),
|
2018-11-16 08:10:35 +00:00
|
|
|
]
|