#!/bin/bash echo "=============================================================================" echo "🔍 VÉRIFICATION FINALE CONFIGURATION UNIONFLOW" echo "=============================================================================" # Test des comptes principaux declare -A TEST_ACCOUNTS=( ["marie.active"]="Marie123!" ["superadmin"]="SuperAdmin123!" ["jean.simple"]="Jean123!" ) success=0 total=3 echo "Test d'authentification des comptes principaux..." echo "" for username in "${!TEST_ACCOUNTS[@]}"; do password="${TEST_ACCOUNTS[$username]}" echo -n "Test $username... " response=$(curl -s -X POST \ "http://localhost:8180/realms/unionflow/protocol/openid-connect/token" \ -H "Content-Type: application/x-www-form-urlencoded" \ -d "username=${username}&password=${password}&grant_type=password&client_id=unionflow-mobile") if echo "$response" | grep -q "access_token"; then echo "✓ SUCCÈS" ((success++)) else echo "✗ ÉCHEC" fi done echo "" echo "=============================================================================" echo "📊 RÉSULTAT FINAL" echo "=============================================================================" echo "" if [ $success -eq $total ]; then echo "🎉 PARFAIT ! Tous les comptes fonctionnent ($success/$total)" echo "" echo "🚀 PRÊT POUR L'APPLICATION MOBILE :" echo "" echo " 📱 TESTEZ MAINTENANT SUR VOTRE SAMSUNG :" echo " 1. Ouvrez l'app UnionFlow" echo " 2. Cliquez sur 'Se connecter avec Keycloak'" echo " 3. Utilisez: marie.active / Marie123!" echo " 4. Vérifiez que l'authentification fonctionne" echo "" echo " 🔐 AUTRES COMPTES DISPONIBLES :" echo " • superadmin / SuperAdmin123! (SUPER_ADMINISTRATEUR)" echo " • jean.simple / Jean123! (MEMBRE_SIMPLE)" echo " • tech.lead / TechLead123! (RESPONSABLE_TECHNIQUE)" echo " • rh.manager / RhManager123! (RESPONSABLE_MEMBRES)" echo "" echo "✅ ARCHITECTURE RÔLES UNIONFLOW 100% OPÉRATIONNELLE !" elif [ $success -gt 0 ]; then echo "⚠️ Configuration partielle ($success/$total comptes fonctionnent)" echo " Vous pouvez tester avec les comptes qui marchent" else echo "❌ Aucun compte ne fonctionne" echo " Relancez la configuration: wsl ./setup-simple.sh" fi echo "" echo "============================================================================="