49 lines
2.1 KiB
Batchfile
49 lines
2.1 KiB
Batchfile
@echo off
|
|
echo ============================================================================
|
|
echo 🧪 TEST D'AUTHENTIFICATION UNIONFLOW
|
|
echo ============================================================================
|
|
echo.
|
|
|
|
echo [INFO] Test avec le compte existant test@unionflow.dev...
|
|
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" > test_result.json
|
|
|
|
findstr "access_token" test_result.json >nul
|
|
if %errorlevel%==0 (
|
|
echo [SUCCESS] ✓ Authentification réussie avec test@unionflow.dev
|
|
) else (
|
|
echo [ERROR] ✗ Échec authentification avec test@unionflow.dev
|
|
type test_result.json
|
|
)
|
|
|
|
echo.
|
|
echo [INFO] Test avec le nouveau compte marie.active...
|
|
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=marie.active&password=Marie123!&grant_type=password&client_id=unionflow-mobile" > marie_result.json
|
|
|
|
findstr "access_token" marie_result.json >nul
|
|
if %errorlevel%==0 (
|
|
echo [SUCCESS] ✓ Authentification réussie avec marie.active
|
|
) else (
|
|
echo [ERROR] ✗ Échec authentification avec marie.active
|
|
type marie_result.json
|
|
)
|
|
|
|
echo.
|
|
echo [INFO] Test avec le nouveau compte superadmin...
|
|
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=superadmin&password=SuperAdmin123!&grant_type=password&client_id=unionflow-mobile" > super_result.json
|
|
|
|
findstr "access_token" super_result.json >nul
|
|
if %errorlevel%==0 (
|
|
echo [SUCCESS] ✓ Authentification réussie avec superadmin
|
|
) else (
|
|
echo [ERROR] ✗ Échec authentification avec superadmin
|
|
type super_result.json
|
|
)
|
|
|
|
echo.
|
|
echo ============================================================================
|
|
echo ✅ TESTS TERMINÉS
|
|
echo ============================================================================
|
|
|
|
del *_result.json
|
|
pause
|