Skip to content
Snippets Groups Projects
Commit 04163f4a authored by Ludovic Ganée's avatar Ludovic Ganée
Browse files

Limite la durée d'un whoami

parent 1bb65449
No related branches found
No related tags found
No related merge requests found
Pipeline #85630 failed
......@@ -58,8 +58,10 @@ class ArchivingSystem extends Entity
public function whoami()
{
$client = get_class(Utility::get(Client::class));
$params = $this->getClientParams();
$params['curl'][CURLOPT_TIMEOUT] = Configure::read('ArchivingSystem.whoami_timeout', 2);
/** @var Client $client */
$client = new $client($this->getClientParams());
$client = new $client($params);
$url = rtrim($this->_fields['url'], '/') . "/api/webservices/whoami";
$response = $client->get($url);
return $response->getJson();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment