From ce29927947dd5ad841900ea98e4009c27f771402 Mon Sep 17 00:00:00 2001 From: Salim Kanoun Date: Sat, 16 Sep 2023 15:11:42 +0200 Subject: [PATCH] fix auth --- GaelO2/app/GaelO/Adapters/HttpClientAdapter.php | 2 +- .../Services/GaelOProcessingService/GaelOProcessingService.php | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/GaelO2/app/GaelO/Adapters/HttpClientAdapter.php b/GaelO2/app/GaelO/Adapters/HttpClientAdapter.php index a597b5763..2d751b229 100644 --- a/GaelO2/app/GaelO/Adapters/HttpClientAdapter.php +++ b/GaelO2/app/GaelO/Adapters/HttpClientAdapter.php @@ -52,7 +52,7 @@ public function uploadFile(string $method, string $uri, string $filename) : Psr7 $body = Utils::tryFopen($filename, 'r'); $headers = [ - 'Authorization' => "Basic " . base64_encode($this->login . ':' . $this->password), + 'auth' => [$this->login, $this->password], 'body' => $body ]; diff --git a/GaelO2/app/GaelO/Services/GaelOProcessingService/GaelOProcessingService.php b/GaelO2/app/GaelO/Services/GaelOProcessingService/GaelOProcessingService.php index 244258a70..44875b220 100644 --- a/GaelO2/app/GaelO/Services/GaelOProcessingService/GaelOProcessingService.php +++ b/GaelO2/app/GaelO/Services/GaelOProcessingService/GaelOProcessingService.php @@ -5,6 +5,7 @@ use App\GaelO\Constants\SettingsConstants; use App\GaelO\Interfaces\Adapters\FrameworkInterface; use App\GaelO\Interfaces\Adapters\HttpClientInterface; +use Illuminate\Support\Facades\Log; class GaelOProcessingService {