Files
unionflow-server-impl-quarkus/test-auth.sh
2025-09-19 16:09:21 +00:00

18 lines
489 B
Bash

#!/bin/bash
echo "Test d'authentification admin..."
response=$(curl -s -X POST \
"http://localhost:8180/realms/master/protocol/openid-connect/token" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "username=admin&password=admin123&grant_type=password&client_id=admin-cli")
echo "Réponse complète:"
echo "$response"
if echo "$response" | grep -q "access_token"; then
echo "✅ Authentification réussie"
else
echo "❌ Échec de l'authentification"
fi