6fda151dae
- Add debug-auth.sh to diagnose authentication issues - Checks .env file content - Verifies environment variables in container - Tests bcrypt password verification - Shows config loading status - Displays recent auth logs - Add test-auth-api.sh to test API endpoints directly - Tests login endpoint with curl - Shows raw API responses - Tests auth status endpoint These scripts help troubleshoot authentication problems by showing exactly what's happening at each step of the auth process. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
30 lines
871 B
Bash
Executable File
30 lines
871 B
Bash
Executable File
#!/bin/bash
|
|
|
|
echo "======================================"
|
|
echo "MinIO WebUI - Test Auth API"
|
|
echo "======================================"
|
|
echo ""
|
|
|
|
# Test with curl
|
|
echo "Testing login with curl..."
|
|
echo "--------------------------"
|
|
|
|
RESPONSE=$(curl -s -X POST http://localhost:7510/api/auth/login \
|
|
-H "Content-Type: application/json" \
|
|
-d '{"password":"admin123"}' \
|
|
-w "\nHTTP_STATUS:%{http_code}")
|
|
|
|
HTTP_STATUS=$(echo "$RESPONSE" | grep "HTTP_STATUS:" | cut -d: -f2)
|
|
BODY=$(echo "$RESPONSE" | sed '/HTTP_STATUS:/d')
|
|
|
|
echo "Response Status: $HTTP_STATUS"
|
|
echo "Response Body:"
|
|
echo "$BODY" | jq . 2>/dev/null || echo "$BODY"
|
|
|
|
echo ""
|
|
echo "Testing auth status..."
|
|
echo "---------------------"
|
|
curl -s http://localhost:7510/api/auth/status | jq . 2>/dev/null || curl -s http://localhost:7510/api/auth/status
|
|
|
|
echo ""
|
|
echo "======================================" |