mirror of
https://github.com/eitchtee/WYGIWYH.git
synced 2026-07-05 20:41:35 +02:00
4273c541c5
- Personal API tokens (model, user-settings UI, admin, management command, DRF auth class) for non-interactive API access from automations like n8n. Raw token shown once; only a SHA-256 hash is stored; last_used_at writes are throttled. - OAuth2 authorization server via django-oauth-toolkit with authorization server metadata and optional, off-by-default Dynamic Client Registration (RFC 7591), so remote OAuth/MCP clients can authenticate and self-register. - Tests for token auth, DCR gating and the management commands, plus .env.example and README documentation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
66 lines
1.5 KiB
Python
66 lines
1.5 KiB
Python
from django.urls import path
|
|
|
|
from . import views
|
|
|
|
urlpatterns = [
|
|
path("", views.index, name="index"),
|
|
path("login/", views.UserLoginView.as_view(), name="login"),
|
|
# path("login/fallback/", views.UserLoginView.as_view(), name="fallback_login"),
|
|
path("logout/", views.logout_view, name="logout"),
|
|
path(
|
|
"user/toggle-amount-visibility/",
|
|
views.toggle_amount_visibility,
|
|
name="toggle_amount_visibility",
|
|
),
|
|
path(
|
|
"user/toggle-sound-playing/",
|
|
views.toggle_sound_playing,
|
|
name="toggle_sound_playing",
|
|
),
|
|
path(
|
|
"user/session/toggle-sidebar/",
|
|
views.toggle_sidebar_status,
|
|
name="toggle_sidebar_status",
|
|
),
|
|
path(
|
|
"user/session/toggle-theme/",
|
|
views.toggle_theme,
|
|
name="toggle_theme",
|
|
),
|
|
path(
|
|
"user/settings/",
|
|
views.update_settings,
|
|
name="user_settings",
|
|
),
|
|
path(
|
|
"user/api-tokens/add/",
|
|
views.api_token_add,
|
|
name="user_api_token_add",
|
|
),
|
|
path(
|
|
"user/api-tokens/<int:token_id>/revoke/",
|
|
views.api_token_revoke,
|
|
name="user_api_token_revoke",
|
|
),
|
|
path(
|
|
"users/",
|
|
views.users_index,
|
|
name="users_index",
|
|
),
|
|
path(
|
|
"users/list/",
|
|
views.users_list,
|
|
name="users_list",
|
|
),
|
|
path(
|
|
"user/add/",
|
|
views.user_add,
|
|
name="user_add",
|
|
),
|
|
path(
|
|
"user/<int:pk>/edit/",
|
|
views.user_edit,
|
|
name="user_edit",
|
|
),
|
|
]
|