2018-11-16 08:10:35 +00:00
|
|
|
"""passbook oauth_provider urls"""
|
|
|
|
|
2019-02-26 08:08:22 +00:00
|
|
|
from django.urls import path
|
|
|
|
from oauth2_provider import views
|
2018-11-16 08:10:35 +00:00
|
|
|
|
2019-03-18 19:35:11 +00:00
|
|
|
from passbook.oauth_provider.views import oauth2, openid
|
2018-11-16 08:10:35 +00:00
|
|
|
|
|
|
|
urlpatterns = [
|
|
|
|
# Custom OAuth 2 Authorize View
|
2018-12-09 20:07:18 +00:00
|
|
|
path('authorize/', oauth2.PassbookAuthorizationLoadingView.as_view(),
|
|
|
|
name="oauth2-authorize"),
|
|
|
|
path('authorize/permission_ok/', oauth2.PassbookAuthorizationView.as_view(),
|
|
|
|
name="oauth2-ok-authorize"),
|
2018-12-11 14:29:58 +00:00
|
|
|
path('authorize/permission_denied/', oauth2.OAuthPermissionDenied.as_view(),
|
|
|
|
name='oauth2-permission-denied'),
|
2018-11-16 08:10:35 +00:00
|
|
|
# OAuth API
|
2019-02-26 08:08:22 +00:00
|
|
|
path("token/", views.TokenView.as_view(), name="token"),
|
|
|
|
path("revoke_token/", views.RevokeTokenView.as_view(), name="revoke-token"),
|
|
|
|
path("introspect/", views.IntrospectTokenView.as_view(), name="introspect"),
|
2019-03-18 19:35:11 +00:00
|
|
|
# OpenID-Connect Discovery
|
|
|
|
path('.well-known/openid-configuration', openid.OpenIDConfigurationView.as_view(),
|
|
|
|
name='openid-discovery'),
|
|
|
|
path('.well-known/jwks.json', openid.JSONWebKeyView.as_view(),
|
|
|
|
name='openid-jwks'),
|
2018-11-16 08:10:35 +00:00
|
|
|
]
|