2020-07-09 21:08:28 +00:00
|
|
|
"""passbook OAuth source urls"""
|
2018-11-11 12:41:48 +00:00
|
|
|
|
|
|
|
from django.urls import path
|
|
|
|
|
2019-10-07 14:33:48 +00:00
|
|
|
from passbook.sources.oauth.types.manager import RequestKind
|
2020-07-09 21:08:28 +00:00
|
|
|
from passbook.sources.oauth.views.dispatcher import DispatcherView
|
|
|
|
from passbook.sources.oauth.views.user import DisconnectView, UserSettingsView
|
2018-11-11 12:41:48 +00:00
|
|
|
|
|
|
|
urlpatterns = [
|
2019-12-31 11:51:16 +00:00
|
|
|
path(
|
|
|
|
"login/<slug:source_slug>/",
|
2020-07-09 21:08:28 +00:00
|
|
|
DispatcherView.as_view(kind=RequestKind.redirect),
|
2019-12-31 11:51:16 +00:00
|
|
|
name="oauth-client-login",
|
|
|
|
),
|
|
|
|
path(
|
|
|
|
"callback/<slug:source_slug>/",
|
2020-07-09 21:08:28 +00:00
|
|
|
DispatcherView.as_view(kind=RequestKind.callback),
|
2019-12-31 11:51:16 +00:00
|
|
|
name="oauth-client-callback",
|
|
|
|
),
|
|
|
|
path(
|
|
|
|
"user/<slug:source_slug>/",
|
2020-07-09 21:08:28 +00:00
|
|
|
UserSettingsView.as_view(),
|
2019-12-31 11:51:16 +00:00
|
|
|
name="oauth-client-user",
|
|
|
|
),
|
2020-07-09 21:08:28 +00:00
|
|
|
path(
|
|
|
|
"user/<slug:source_slug>/disconnect/",
|
|
|
|
DisconnectView.as_view(),
|
|
|
|
name="oauth-client-disconnect",
|
|
|
|
),
|
2018-11-11 12:41:48 +00:00
|
|
|
]
|