summaryrefslogtreecommitdiff
path: root/server/init.php
diff options
context:
space:
mode:
Diffstat (limited to 'server/init.php')
-rwxr-xr-x[-rw-r--r--]server/init.php43
1 files changed, 39 insertions, 4 deletions
diff --git a/server/init.php b/server/init.php
index ff7f90b..2c07947 100644..100755
--- a/server/init.php
+++ b/server/init.php
@@ -2,7 +2,9 @@
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");
+
//traitement requete, recuperation data
if(isset($_POST["key"])){
//recuperation des donnes sauvegardes
@@ -27,11 +29,44 @@
"name" => "Default")
)
),
- "authUrl" => $urlAuth
+ "authUrl" => $config["urlAuth"]
+ );
+ } else {
+ $user = "admin";
+ $password = "ae5or6cn";
+ $project = "admin";
+
+ $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"]
);
}
- $openstack_api = new OpenStack\OpenStack($Args);
-
$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));
+
?>