docs(phase-2.5): Complete access control implementation
This commit is contained in:
parent
eb0e2cc4b5
commit
378703bf1c
19 changed files with 1204 additions and 48 deletions
33
backend/quick-test.sh
Executable file
33
backend/quick-test.sh
Executable file
|
|
@ -0,0 +1,33 @@
|
|||
#!/bin/bash
|
||||
# Quick API Test for Normogen Backend
|
||||
# Updated for port 6500
|
||||
|
||||
echo "🧪 Quick API Test - Normogen Backend"
|
||||
echo "===================================="
|
||||
echo ""
|
||||
|
||||
echo "1. Health Check..."
|
||||
curl -s http://10.0.10.30:6500/health | jq .
|
||||
echo ""
|
||||
|
||||
echo "2. Login Test..."
|
||||
RESPONSE=$(curl -s -X POST http://10.0.10.30:6500/api/auth/login \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{"email": "recoverytest@example.com", "password": "NewSecurePassword456!"}')
|
||||
echo "$RESPONSE" | jq .
|
||||
|
||||
# Extract token
|
||||
TOKEN=$(echo "$RESPONSE" | jq -r '.access_token // .access_token // empty')
|
||||
echo ""
|
||||
|
||||
if [ -n "$TOKEN" ] && [ "$TOKEN" != "null" ]; then
|
||||
echo "3. Protected Endpoint (with token)..."
|
||||
curl -s -X GET http://10.0.10.30:6500/api/users/me \
|
||||
-H "Authorization: Bearer $TOKEN" | jq .
|
||||
else
|
||||
echo "3. Protected Endpoint (no token - should fail)..."
|
||||
curl -s -X GET http://10.0.10.30:6500/api/users/me | jq .
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "✅ Test complete!"
|
||||
Loading…
Add table
Add a link
Reference in a new issue