Refactoring
This commit is contained in:
17
test-auth.sh
Normal file
17
test-auth.sh
Normal file
@@ -0,0 +1,17 @@
|
||||
#!/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
|
||||
Reference in New Issue
Block a user