mirror of
https://github.com/eitchtee/WYGIWYH.git
synced 2026-07-04 20:11:45 +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>
21 lines
402 B
Bash
21 lines
402 B
Bash
#!/bin/bash
|
|
|
|
set -o errexit
|
|
set -o pipefail
|
|
set -o nounset
|
|
|
|
# Set INTERNAL_PORT with default value of 8000
|
|
INTERNAL_PORT=${INTERNAL_PORT:-8000}
|
|
|
|
rm -f /tmp/migrations_complete
|
|
|
|
python manage.py migrate
|
|
|
|
# Create flag file to signal migrations are complete
|
|
touch /tmp/migrations_complete
|
|
|
|
python manage.py setup_users
|
|
python manage.py setup_oauth
|
|
|
|
exec python manage.py runserver 0.0.0.0:$INTERNAL_PORT
|