diff options
| author | EoleDev <EoleDev@outlook.fr> | 2016-02-05 00:07:31 +0100 |
|---|---|---|
| committer | EoleDev <EoleDev@outlook.fr> | 2016-02-05 00:07:31 +0100 |
| commit | c2a5b1880c19c1490c42eb40a6a15ce2bc64b9e9 (patch) | |
| tree | 8a83582ed8d5feb01b4b68ecad541a83fe385ace /server/init.php | |
| parent | b39f5c1cd4631be3259b272e1f6cbe9b4915410b (diff) | |
Request Analyse reviewed, Server Initialisation Reviewed, Core Class Interface Created, App created
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); ?> |
