
* initial sfe Signed-off-by: Jens Langhammer <jens@goauthentik.io> * build sfe Signed-off-by: Jens Langhammer <jens@goauthentik.io> * downgrade bootstrap Signed-off-by: Jens Langhammer <jens@goauthentik.io> * fix path Signed-off-by: Jens Langhammer <jens@goauthentik.io> * make IE compatible Signed-off-by: Jens Langhammer <jens@goauthentik.io> * fix query string missing Signed-off-by: Jens Langhammer <jens@goauthentik.io> * add autosubmit stage Signed-off-by: Jens Langhammer <jens@goauthentik.io> * add background image Signed-off-by: Jens Langhammer <jens@goauthentik.io> * add code support Signed-off-by: Jens Langhammer <jens@goauthentik.io> * add support for combo ident/password Signed-off-by: Jens Langhammer <jens@goauthentik.io> * fix logo rendering Signed-off-by: Jens Langhammer <jens@goauthentik.io> * only use for edge 18 and before Signed-off-by: Jens Langhammer <jens@goauthentik.io> * fix lint Signed-off-by: Jens Langhammer <jens@goauthentik.io> * add docs Signed-off-by: Jens Langhammer <jens@goauthentik.io> * add webauthn support Signed-off-by: Jens Langhammer <jens@goauthentik.io> * migrate to TS for some creature comforts Signed-off-by: Jens Langhammer <jens@goauthentik.io> * fix ci Signed-off-by: Jens Langhammer <jens@goauthentik.io> * dedupe dependabot Signed-off-by: Jens Langhammer <jens@goauthentik.io> * use API client...kinda Signed-off-by: Jens Langhammer <jens@goauthentik.io> * add more docs Signed-off-by: Jens Langhammer <jens@goauthentik.io> * add more polyfills yay Signed-off-by: Jens Langhammer <jens@goauthentik.io> * fix Signed-off-by: Jens Langhammer <jens@goauthentik.io> * turn powered by into span prevent issues in restricted browsers where users might not be able to return Signed-off-by: Jens Langhammer <jens@goauthentik.io> * allow non-link footer entries Signed-off-by: Jens Langhammer <jens@goauthentik.io> * fix tsc errors Signed-off-by: Jens Langhammer <jens@goauthentik.io> * Apply suggestions from code review Co-authored-by: Tana M Berry <tanamarieberry@yahoo.com> Signed-off-by: Jens L. <jens@beryju.org> * auto switch for macos Signed-off-by: Jens Langhammer <jens@goauthentik.io> * reword Signed-off-by: Jens Langhammer <jens@goauthentik.io> * Update website/docs/flow/executors/if-flow.md Signed-off-by: Jens L. <jens@beryju.org> * format Signed-off-by: Jens Langhammer <jens@goauthentik.io> --------- Signed-off-by: Jens Langhammer <jens@goauthentik.io> Signed-off-by: Jens L. <jens@beryju.org> Co-authored-by: Tana M Berry <tanamarieberry@yahoo.com> Signed-off-by: Jens Langhammer <jens@goauthentik.io> # Conflicts: # .github/workflows/ci-web.yml # Dockerfile # website/developer-docs/api/flow-executor.md
111 lines
3.8 KiB
Python
111 lines
3.8 KiB
Python
"""authentik URL Configuration"""
|
|
|
|
from channels.auth import AuthMiddleware
|
|
from channels.sessions import CookieMiddleware
|
|
from django.conf import settings
|
|
from django.contrib.auth.decorators import login_required
|
|
from django.urls import path
|
|
from django.views.decorators.csrf import ensure_csrf_cookie
|
|
from django.views.generic import RedirectView
|
|
|
|
from authentik.core.api.applications import ApplicationViewSet
|
|
from authentik.core.api.authenticated_sessions import AuthenticatedSessionViewSet
|
|
from authentik.core.api.devices import AdminDeviceViewSet, DeviceViewSet
|
|
from authentik.core.api.groups import GroupViewSet
|
|
from authentik.core.api.property_mappings import PropertyMappingViewSet
|
|
from authentik.core.api.providers import ProviderViewSet
|
|
from authentik.core.api.sources import SourceViewSet, UserSourceConnectionViewSet
|
|
from authentik.core.api.tokens import TokenViewSet
|
|
from authentik.core.api.transactional_applications import TransactionalApplicationView
|
|
from authentik.core.api.users import UserViewSet
|
|
from authentik.core.views import apps
|
|
from authentik.core.views.debug import AccessDeniedView
|
|
from authentik.core.views.interface import InterfaceView
|
|
from authentik.core.views.session import EndSessionView
|
|
from authentik.flows.views.interface import FlowInterfaceView
|
|
from authentik.root.asgi_middleware import SessionMiddleware
|
|
from authentik.root.messages.consumer import MessageConsumer
|
|
from authentik.root.middleware import ChannelsLoggingMiddleware
|
|
|
|
urlpatterns = [
|
|
path(
|
|
"",
|
|
login_required(
|
|
RedirectView.as_view(pattern_name="authentik_core:if-user", query_string=True)
|
|
),
|
|
name="root-redirect",
|
|
),
|
|
path(
|
|
# We have to use this format since everything else uses applications/o or applications/saml
|
|
"application/launch/<slug:application_slug>/",
|
|
apps.RedirectToAppLaunch.as_view(),
|
|
name="application-launch",
|
|
),
|
|
# Interfaces
|
|
path(
|
|
"if/admin/",
|
|
ensure_csrf_cookie(InterfaceView.as_view(template_name="if/admin.html")),
|
|
name="if-admin",
|
|
),
|
|
path(
|
|
"if/user/",
|
|
ensure_csrf_cookie(InterfaceView.as_view(template_name="if/user.html")),
|
|
name="if-user",
|
|
),
|
|
path(
|
|
"if/flow/<slug:flow_slug>/",
|
|
# FIXME: move this url to the flows app...also will cause all
|
|
# of the reverse calls to be adjusted
|
|
ensure_csrf_cookie(FlowInterfaceView.as_view()),
|
|
name="if-flow",
|
|
),
|
|
path(
|
|
"if/session-end/<slug:application_slug>/",
|
|
ensure_csrf_cookie(EndSessionView.as_view()),
|
|
name="if-session-end",
|
|
),
|
|
# Fallback for WS
|
|
path("ws/outpost/<uuid:pk>/", InterfaceView.as_view(template_name="if/admin.html")),
|
|
path(
|
|
"ws/client/",
|
|
InterfaceView.as_view(template_name="if/admin.html"),
|
|
),
|
|
]
|
|
|
|
api_urlpatterns = [
|
|
("core/authenticated_sessions", AuthenticatedSessionViewSet),
|
|
("core/applications", ApplicationViewSet),
|
|
path(
|
|
"core/transactional/applications/",
|
|
TransactionalApplicationView.as_view(),
|
|
name="core-transactional-application",
|
|
),
|
|
("core/groups", GroupViewSet),
|
|
("core/users", UserViewSet),
|
|
("core/tokens", TokenViewSet),
|
|
("sources/all", SourceViewSet),
|
|
("sources/user_connections/all", UserSourceConnectionViewSet),
|
|
("providers/all", ProviderViewSet),
|
|
("propertymappings/all", PropertyMappingViewSet),
|
|
("authenticators/all", DeviceViewSet, "device"),
|
|
(
|
|
"authenticators/admin/all",
|
|
AdminDeviceViewSet,
|
|
"admin-device",
|
|
),
|
|
]
|
|
|
|
websocket_urlpatterns = [
|
|
path(
|
|
"ws/client/",
|
|
ChannelsLoggingMiddleware(
|
|
CookieMiddleware(SessionMiddleware(AuthMiddleware(MessageConsumer.as_asgi())))
|
|
),
|
|
),
|
|
]
|
|
|
|
if settings.DEBUG:
|
|
urlpatterns += [
|
|
path("debug/policy/deny/", AccessDeniedView.as_view(), name="debug-policy-deny"),
|
|
]
|