blob: a00927d7a25c17620806ddb535608ebd5ae8ba7c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
<?php
include_once("core/App.php");
$user = "";
$password = "";
$project = "";
//traitement requete, recuperation data
if(isset($_POST["token"])){
$token = $_POST["token"];
}else if(isset($_POST["user"]) && isset($_POST["password"]) && isset($_POST["project"]) ){
$user = $_POST["user"];
$password = $_POST["password"];
$project = $_POST["project"];
} /*else { // Test Backend
$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"]
);
$App = new App($Args);
if(isset($token))
$App->setToken($token);
?>
|