authentik.providers.oauth2.urls

OAuth provider URLs

 1"""OAuth provider URLs"""
 2
 3from django.urls import path
 4from django.views.generic.base import RedirectView
 5
 6from authentik.providers.oauth2.api.dcr import OAuth2DynamicClientRegistrationViewSet
 7from authentik.providers.oauth2.api.providers import OAuth2ProviderViewSet
 8from authentik.providers.oauth2.api.scopes import ScopeMappingViewSet
 9from authentik.providers.oauth2.api.tokens import (
10    AccessTokenViewSet,
11    AuthorizationCodeViewSet,
12    RefreshTokenViewSet,
13)
14from authentik.providers.oauth2.views.authorize import AuthorizationFlowInitView
15from authentik.providers.oauth2.views.dcr import DynamicClientRegistrationView
16from authentik.providers.oauth2.views.device_backchannel import DeviceView
17from authentik.providers.oauth2.views.end_session import EndSessionView
18from authentik.providers.oauth2.views.introspection import TokenIntrospectionView
19from authentik.providers.oauth2.views.jwks import JWKSView
20from authentik.providers.oauth2.views.provider import ProviderInfoView
21from authentik.providers.oauth2.views.token import TokenView
22from authentik.providers.oauth2.views.token_revoke import TokenRevokeView
23from authentik.providers.oauth2.views.userinfo import UserInfoView
24
25urlpatterns = [
26    path(
27        "authorize/",
28        AuthorizationFlowInitView.as_view(),
29        name="authorize",
30    ),
31    path("token/", TokenView.as_view(), name="token"),
32    path("device/", DeviceView.as_view(), name="device"),
33    path(
34        "userinfo/",
35        UserInfoView.as_view(),
36        name="userinfo",
37    ),
38    path(
39        "introspect/",
40        TokenIntrospectionView.as_view(),
41        name="token-introspection",
42    ),
43    path(
44        "revoke/",
45        TokenRevokeView.as_view(),
46        name="token-revoke",
47    ),
48    path(
49        "<slug:application_slug>/end-session/",
50        EndSessionView.as_view(),
51        name="end-session",
52    ),
53    path("<slug:application_slug>/jwks/", JWKSView.as_view(), name="jwks"),
54    path(
55        "<slug:application_slug>/",
56        RedirectView.as_view(pattern_name="authentik_providers_oauth2:provider-info"),
57        name="provider-root",
58    ),
59    path(
60        "<slug:application_slug>/.well-known/openid-configuration",
61        ProviderInfoView.as_view(),
62        name="provider-info",
63    ),
64    path(
65        "<slug:application_slug>/register/",
66        DynamicClientRegistrationView.as_view(),
67        name="dynamic-client-registration",
68    ),
69]
70
71api_urlpatterns = [
72    ("providers/oauth2", OAuth2ProviderViewSet),
73    ("providers/oauth2-dcr", OAuth2DynamicClientRegistrationViewSet),
74    ("propertymappings/provider/scope", ScopeMappingViewSet),
75    ("oauth2/authorization_codes", AuthorizationCodeViewSet),
76    ("oauth2/refresh_tokens", RefreshTokenViewSet),
77    ("oauth2/access_tokens", AccessTokenViewSet),
78]
urlpatterns = [<URLPattern 'authorize/' [name='authorize']>, <URLPattern 'token/' [name='token']>, <URLPattern 'device/' [name='device']>, <URLPattern 'userinfo/' [name='userinfo']>, <URLPattern 'introspect/' [name='token-introspection']>, <URLPattern 'revoke/' [name='token-revoke']>, <URLPattern '<slug:application_slug>/end-session/' [name='end-session']>, <URLPattern '<slug:application_slug>/jwks/' [name='jwks']>, <URLPattern '<slug:application_slug>/' [name='provider-root']>, <URLPattern '<slug:application_slug>/.well-known/openid-configuration' [name='provider-info']>, <URLPattern '<slug:application_slug>/register/' [name='dynamic-client-registration']>]
api_urlpatterns = [('providers/oauth2', <class 'authentik.providers.oauth2.api.providers.OAuth2ProviderViewSet'>), ('providers/oauth2-dcr', <class 'authentik.providers.oauth2.api.dcr.OAuth2DynamicClientRegistrationViewSet'>), ('propertymappings/provider/scope', <class 'authentik.providers.oauth2.api.scopes.ScopeMappingViewSet'>), ('oauth2/authorization_codes', <class 'authentik.providers.oauth2.api.tokens.AuthorizationCodeViewSet'>), ('oauth2/refresh_tokens', <class 'authentik.providers.oauth2.api.tokens.RefreshTokenViewSet'>), ('oauth2/access_tokens', <class 'authentik.providers.oauth2.api.tokens.AccessTokenViewSet'>)]