Refactoring

This commit is contained in:
DahoudG
2025-09-19 16:09:21 +00:00
parent 4ac376b7e7
commit 3f2398a55d
44 changed files with 7400 additions and 0 deletions

33
test-auth-simple.sh Normal file
View File

@@ -0,0 +1,33 @@
#!/bin/bash
echo "Test authentification avec compte existant..."
response=$(curl -s -X POST \
"http://192.168.1.145:8180/realms/unionflow/protocol/openid-connect/token" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "username=test@unionflow.dev&password=test123&grant_type=password&client_id=unionflow-mobile")
if echo "$response" | grep -q "access_token"; then
echo "✓ Authentification réussie avec test@unionflow.dev"
# Extraire le token
access_token=$(echo "$response" | grep -o '"access_token":"[^"]*' | cut -d'"' -f4)
# Obtenir les infos utilisateur
user_info=$(curl -s -X GET \
"http://192.168.1.145:8180/realms/unionflow/protocol/openid-connect/userinfo" \
-H "Authorization: Bearer ${access_token}")
echo "Infos utilisateur: $user_info"
echo ""
echo "🎉 KEYCLOAK FONCTIONNE PARFAITEMENT !"
echo ""
echo "Vous pouvez maintenant tester l'application mobile avec :"
echo "Username: test@unionflow.dev"
echo "Password: test123"
else
echo "✗ Échec authentification"
echo "Réponse: $response"
fi