diff options
| author | Yoggzo <yogg@epsina.com> | 2016-02-08 17:10:24 +0100 |
|---|---|---|
| committer | Yoggzo <yogg@epsina.com> | 2016-02-08 17:10:24 +0100 |
| commit | f1585a13323d408b6917a514bed1920aec3780f0 (patch) | |
| tree | b98a23443d20af008cbb8eca16a7aff7c9aa823c /server/init.php | |
| parent | 43b65e1dbb53300d076f5885b5393ff68e248dd1 (diff) | |
| parent | 1cd1ae92f414573942262f65dc1644e8ff9bb8f6 (diff) | |
Merge branch 'develop' into Evan
mise a jour
Diffstat (limited to 'server/init.php')
| -rwxr-xr-x | server/init.php | 54 |
1 files changed, 14 insertions, 40 deletions
diff --git a/server/init.php b/server/init.php index 2c07947..cf08523 100755 --- a/server/init.php +++ b/server/init.php @@ -1,13 +1,15 @@ <?php - include_once("config.inc.php"); - include_once("core/Plugin_Api.php"); - require "vendor/autoload.php"; - include_once("core/LibOverride/genTokenOptions.php"); - include_once("core/Identity.php"); + include_once("core/App.php"); + $user = ""; + $password = ""; + $project = ""; + + //traitement requete, recuperation data - if(isset($_POST["key"])){ - //recuperation des donnes sauvegardes + if(isset($_POST["token"])){ + + $token = $_POST["token"]; }else if(isset($_POST["user"]) && isset($_POST["password"]) && isset($_POST["project"]) ){ @@ -15,28 +17,14 @@ $password = $_POST["password"]; $project = $_POST["project"]; - $Args = Array( - "user" => Array( - "name" => $user, - "password" => $password, - "domain" => Array( - "name" => "Default") - ), - "scope" => Array( - "project" => Array( - "name" => $project, - "domain" => Array( - "name" => "Default") - ) - ), - "authUrl" => $config["urlAuth"] - ); - } else { + } /*else { // Test Backend $user = "admin"; $password = "ae5or6cn"; $project = "admin"; - $Args = Array( + }*/ + + $Args = Array( "user" => Array( "name" => $user, "password" => $password, @@ -52,21 +40,7 @@ ), "authUrl" => $config["urlAuth"] ); - } - - $pluginApi = plugin_api::getInstance(); - //$openstack_api = new OpenStack\OpenStack($Args); - //$id = new identity($openstack_api, $pluginApi); - - //$token = $id->genToken(); - - $tmp = new genTokenOptions($Args); - $tmp->genIdentityToken(); - $array = $tmp->getOptions("Identity"); - $openstack_api = new OpenStack\OpenStack([]); - - $identityBack = $tmp->getBackup("Identity"); - //file_put_contents("token", serialize($tmp)); + $App = new App($Args); ?> |
