2024-01-30 13:15:01 +00:00
|
|
|
from django.urls import re_path
|
2019-03-25 16:02:51 +00:00
|
|
|
from django.views.decorators.csrf import csrf_exempt
|
|
|
|
|
2019-07-02 12:31:47 +00:00
|
|
|
from funkwhale_api.common import routers
|
2019-03-25 16:02:51 +00:00
|
|
|
|
|
|
|
from . import views
|
|
|
|
|
2019-07-02 12:31:47 +00:00
|
|
|
router = routers.OptionalSlashRouter()
|
2019-03-25 16:02:51 +00:00
|
|
|
router.register(r"apps", views.ApplicationViewSet, "apps")
|
|
|
|
router.register(r"grants", views.GrantViewSet, "grants")
|
|
|
|
|
|
|
|
urlpatterns = router.urls + [
|
2024-01-30 13:15:01 +00:00
|
|
|
re_path(
|
|
|
|
"^authorize/$", csrf_exempt(views.AuthorizeView.as_view()), name="authorize"
|
|
|
|
),
|
|
|
|
re_path("^token/$", views.TokenView.as_view(), name="token"),
|
|
|
|
re_path("^revoke/$", views.RevokeTokenView.as_view(), name="revoke"),
|
2019-03-25 16:02:51 +00:00
|
|
|
]
|