How to make login from my script to opennebula web - interface

I would like to authrized user in my script (via one.user.login) and then send him to url:http://hostname:9869/
and after that user should be logged into his accout without entering username and password

How can i do this

I assume that your script is an authentication driver, as the ssh one. In
that case you can let your users use oneuser login, and then use the output
token as the password login screen.

If you want to create and use a login through the login screen you need to
produce a custom CloudAuth module, look for CloudAuth*.rb files for

here is what i did (php - code):

            new PhpXmlRpc\Value($user_auth),
            new PhpXmlRpc\Value($open_user),
            new PhpXmlRpc\Value(),
            new PhpXmlRpc\Value("-1",int)

    $ret=send_request ($url,$func,$values);
    $encoder = new PhpXmlRpc\Encoder();
    $value = $encoder->decode($ret->value());

in $token - i have token for this user - and seems right now i should use curl to access page:

$ch = curl_init(); // initiate curl
$url = “http://ip:9869/”; // where you want to post data
curl_setopt($ch, CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_POST, true); // tell curl you want to post something
curl_setopt($ch, CURLOPT_POSTFIELDS, “username=user_name&password=$token”); // define what you want to post
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); // return the output in string format
$output = curl_exec ($ch); // execute
curl_close ($ch); // close curl handle
var_dump($output); // show output

but i;m getting
string(443) "

body { text-align:center;font-family:helvetica,arial;font-size:22px;
#c {margin:0 auto;width:500px;text-align:left}

Sinatra doesn’t know this ditty.

Try this:
post ‘/’ do
“Hello World”


if i will send (HTTP POST) with correct login and password to http://host:port/login - in sunstone i’m getting:
ue Aug 02 07:19:31 2016 [I]: Unauthorized login attempt
Tue Aug 02 07:19:31 2016 [I]: my_ip - - [02/Aug/2016 07:19:31] “POST /login HTTP/1.1” 401 - 0.0017