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