Fix jwt-token
This commit is contained in:
35
scripts/create-tenant.sh
Normal file
35
scripts/create-tenant.sh
Normal file
@@ -0,0 +1,35 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Quick Tenant Setup Script
|
||||
# Creates a new tenant with basic configuration
|
||||
|
||||
TENANT_NAME="${1:-Example Corp}"
|
||||
TENANT_SLUG="${2:-example}"
|
||||
SUBSCRIPTION_TYPE="${3:-basic}"
|
||||
AUTH_PROVIDER="${4:-local}"
|
||||
|
||||
echo "Creating tenant: $TENANT_NAME (slug: $TENANT_SLUG)"
|
||||
|
||||
# Create tenant via API
|
||||
curl -X POST https://management.dev.uggla.uamils.com/api/tenants \
|
||||
-H "Content-Type: application/json" \
|
||||
-H "Authorization: Bearer YOUR_ADMIN_JWT_TOKEN" \
|
||||
-d "{
|
||||
\"name\": \"$TENANT_NAME\",
|
||||
\"slug\": \"$TENANT_SLUG\",
|
||||
\"subscription_type\": \"$SUBSCRIPTION_TYPE\",
|
||||
\"auth_provider\": \"$AUTH_PROVIDER\",
|
||||
\"admin_email\": \"admin@$TENANT_SLUG.com\",
|
||||
\"features\": {
|
||||
\"max_devices\": 50,
|
||||
\"max_users\": 10,
|
||||
\"api_rate_limit\": 5000,
|
||||
\"data_retention_days\": 365,
|
||||
\"features\": [\"basic_detection\", \"alerts\", \"dashboard\", \"analytics\"]
|
||||
}
|
||||
}"
|
||||
|
||||
echo ""
|
||||
echo "✅ Tenant created!"
|
||||
echo "🌐 Access URL: https://$TENANT_SLUG.dev.uggla.uamils.com"
|
||||
echo "🔑 Users can now register/login at that URL"
|
||||
Reference in New Issue
Block a user