Esempio n. 1
0
<?php

date_default_timezone_set("Europe/London");
require_once '../src/Vzaar.php';
if (isset($_GET['secret']) && isset($_GET['token'])) {
    Vzaar::$token = $_GET['token'];
    Vzaar::$secret = $_GET['secret'];
    echo 'API reply: ' . Vzaar::whoAmI();
} else {
    echo 'Call whoAmI service as following: whoami.php?token=YOUR_API_TOKEN&secret=YOUR_VZAAR_USERNAME';
}
 public function testOauthAuthentication()
 {
     $expected_val = API_ENVS::get()["user1"]["login"];
     $res = Vzaar::whoAmI();
     $this->assertEquals($res, $expected_val);
 }