feature/cierres #25

Open
aldarien wants to merge 446 commits from feature/cierres into develop
170 changed files with 647 additions and 5599 deletions
Showing only changes of commit 9895fd6a70 - Show all commits

View File

@ -29,6 +29,12 @@ class Login
}
if ($response->getStatusCode() !== 200) {
$this->logger->error('Login failed', [
'statusCode' => $response->getStatusCode(),
'body' => $response->getBody()->getContents(),
'username' => $this->username,
'headers' => $response->getHeaders()
]);
return '';
}
$body = $response->getBody()->getContents();
@ -68,8 +74,12 @@ class Login
throw new Exception('Token not valid');
}
} catch (Exception $exception) {
$this->logger->error($exception);
$this->logger->notice($exception);
$token = $this->login();
if ($token === '') {
unlink($this->tokenFilename);
return '';
}
}
return implode('', [md5($apiKey), $separator, $token]);
}