This repository has been archived on 2024-05-31. You can view files and clone it, but cannot push or open issues or pull requests.
authentik/authentik/sources/oauth/urls.py
Jens L eaa3d11df8
api: modular urls (#5551)
* api: make API urls modular

load API urls from app module's urls file instead of a single static file

Signed-off-by: Jens Langhammer <jens@goauthentik.io>

* refactor websocket url mounting

Signed-off-by: Jens Langhammer <jens@goauthentik.io>

---------

Signed-off-by: Jens Langhammer <jens@goauthentik.io>
2023-05-09 14:46:47 +02:00

27 lines
814 B
Python

"""authentik OAuth source urls"""
from django.urls import path
from authentik.sources.oauth.api.source import OAuthSourceViewSet
from authentik.sources.oauth.api.source_connection import UserOAuthSourceConnectionViewSet
from authentik.sources.oauth.types.registry import RequestKind
from authentik.sources.oauth.views.dispatcher import DispatcherView
urlpatterns = [
path(
"login/<slug:source_slug>/",
DispatcherView.as_view(kind=RequestKind.REDIRECT),
name="oauth-client-login",
),
path(
"callback/<slug:source_slug>/",
DispatcherView.as_view(kind=RequestKind.CALLBACK),
name="oauth-client-callback",
),
]
api_urlpatterns = [
("sources/user_connections/oauth", UserOAuthSourceConnectionViewSet),
("sources/oauth", OAuthSourceViewSet),
]