authenticate(); // $_SESSION['user'] = $oidc->getVerifiedClaims(); // } // --- Formulaire pour créer un compte --- if ($_SERVER['REQUEST_METHOD'] === 'POST') { $user = $_POST['username']; $pass = $_POST['password']; $soapUser = 'SOAPUSER'; $soapPass = 'SOAPPASS'; $host = getenv('SOAP_HOST'); $port = getenv('SOAP_PORT'); $command = "account create $user $pass"; $command = "account list"; $client = new SoapClient(NULL, [ "location" => "http://mangosd:7878/", "uri" => "urn:MaNGOS", "style" => SOAP_RPC, 'login' => $soapUser, 'password' => $soapPass ]); try { // NOTE : ne pas mettre de préfixe ns1: $result = $client->__soapCall('executeCommand', [new SoapParam($command, 'command')]); echo "✅ Command executed:\n"; echo $result; var_dump($result); } catch (Exception $e) { echo "❌ Command failed:\n"; echo $e->getMessage(); } } ?>