Clean project: remove test files, debug logs, and add documentation

This commit is contained in:
dahoud
2025-10-05 13:41:33 +00:00
parent 96a17eadbd
commit 291847924c
438 changed files with 65754 additions and 32713 deletions

View File

@@ -4,7 +4,7 @@ echo "=== TEST SIMPLE KEYCLOAK ==="
echo "1. Test connectivité Keycloak..."
# Test de base
response=$(curl -s -w "%{http_code}" "http://192.168.1.145:8180/realms/unionflow/.well-known/openid-configuration")
response=$(curl -s -w "%{http_code}" "http://192.168.1.11:8180/realms/unionflow/.well-known/openid-configuration")
http_code="${response: -3}"
if [ "$http_code" = "200" ]; then
@@ -18,7 +18,7 @@ echo "2. Test token admin..."
# Obtenir token admin
token_response=$(curl -s -X POST \
"http://192.168.1.145:8180/realms/master/protocol/openid-connect/token" \
"http://192.168.1.11:8180/realms/master/protocol/openid-connect/token" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "username=admin&password=admin&grant_type=password&client_id=admin-cli")
@@ -33,7 +33,7 @@ if echo "$token_response" | grep -q "access_token"; then
# Créer un rôle de test
role_response=$(curl -s -w "%{http_code}" -X POST \
"http://192.168.1.145:8180/admin/realms/unionflow/roles" \
"http://192.168.1.11:8180/admin/realms/unionflow/roles" \
-H "Authorization: Bearer $token" \
-H "Content-Type: application/json" \
-d '{"name":"TEST_ROLE","description":"Rôle de test","attributes":{"level":["99"]}}')
@@ -47,7 +47,7 @@ if echo "$token_response" | grep -q "access_token"; then
# Créer un utilisateur de test
user_response=$(curl -s -w "%{http_code}" -X POST \
"http://192.168.1.145:8180/admin/realms/unionflow/users" \
"http://192.168.1.11:8180/admin/realms/unionflow/users" \
-H "Authorization: Bearer $token" \
-H "Content-Type: application/json" \
-d '{"username":"testuser","email":"test@example.com","firstName":"Test","lastName":"User","enabled":true,"emailVerified":true,"credentials":[{"type":"password","value":"Test123!","temporary":false}]}')
@@ -61,7 +61,7 @@ if echo "$token_response" | grep -q "access_token"; then
# Tester l'authentification
auth_response=$(curl -s -X POST \
"http://192.168.1.145:8180/realms/unionflow/protocol/openid-connect/token" \
"http://192.168.1.11:8180/realms/unionflow/protocol/openid-connect/token" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "username=testuser&password=Test123!&grant_type=password&client_id=unionflow-mobile")