test_endpoint.sh•1.05 kB
#!/bin/bash
echo "🚀 Testing /auth/token endpoint..."
echo "URL: https://mcp-server-production-110a.up.railway.app/auth/token"
echo "Test Data: username=testuser, password=testuser123, expires_in_hours=2"
echo "---------------------------------------------------"
# Test with curl
response=$(curl -s -w "HTTPSTATUS:%{http_code}" \
-X POST "https://mcp-server-production-110a.up.railway.app/auth/token" \
-H "Content-Type: application/json" \
-d '{"username": "testuser", "password": "testuser123", "expires_in_hours": 2}')
# Extract HTTP status and body
http_status=$(echo $response | tr -d '\n' | sed -e 's/.*HTTPSTATUS://')
body=$(echo $response | sed -e 's/HTTPSTATUS:.*//g')
echo "HTTP Status: $http_status"
echo "Response Body: $body"
echo "---------------------------------------------------"
if [ "$http_status" -eq 200 ]; then
echo "✅ SUCCESS! Token endpoint is working!"
echo "🎉 CIRCULAR DEPENDENCY ISSUE RESOLVED!"
else
echo "❌ FAILED! Status code: $http_status"
fi
echo ""
echo "Test completed at: $(date)"