method registerProject documentation in bbn\Appui\Api
function(array $cfg)
{
if ($this->jwt) {
$key_out = self::_get_tmp_key(true);
$jwt = $this->jwt->setKey($key_out)->set(['data' => $cfg]);
if ($curl = X::curl(
self::REMOTE,
['action' => 'register_project', 'data' => $jwt]
)
) {
$key_in = self::_get_tmp_key();
try {
$res = $this->jwt->setKey($key_in)->get($curl);
}
catch (Exception $e) {
X::log(["JSON token", $e->getMessage()]);
throw new Exception(X::_("Impossible to get data with JSON token, check log").PHP_EOL.$e->getMessage());
}
return $res;
}
else {
$err = X::lastCurlError();
throw new Exception(X::_("Impossible to register throu cURL")
. ($err ? PHP_EOL.$err : ''));
}
}
else {
throw new Exception(X::_("No JWT"));
}
}
BBN is a suite of PHP and JS libraries and VueJS components - all open-source! bbn.io, build applications, the quick way
This website uses cookies to ensure you get the best experience on our website.
© 2011-2023
BBN Solutions