From 8ab7509822dbe2364211aea01c7d87011d907bd4 Mon Sep 17 00:00:00 2001 From: briskt <3172830+briskt@users.noreply.github.com> Date: Thu, 12 Sep 2024 13:48:06 +0800 Subject: [PATCH] [IDP-1218] add a custom user agent header to the mfa client --- application/common/components/MfaApiClient.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/application/common/components/MfaApiClient.php b/application/common/components/MfaApiClient.php index 487b492e..3cefe768 100644 --- a/application/common/components/MfaApiClient.php +++ b/application/common/components/MfaApiClient.php @@ -3,8 +3,8 @@ namespace common\components; use GuzzleHttp\Client as GuzzleClient; -use GuzzleHttp\Exception\ConnectException; use GuzzleHttp\Exception\ClientException; +use GuzzleHttp\Exception\ConnectException; use GuzzleHttp\Exception\GuzzleException; use GuzzleHttp\Exception\ServerException; use Psr\Http\Message\ResponseInterface; @@ -55,6 +55,7 @@ public function __construct(string $apiBaseUrl, $apiKey, $apiSecret) 'X-MFA-APIKey' => $apiKey, 'X-MFA-APISecret' => $apiSecret, 'Content-type' => 'application/json', + 'User-Agent' => 'idp-id-broker', ]; $this->client = new GuzzleClient([ @@ -118,7 +119,6 @@ public function validateTotp(string $uuid, string $code): bool } - /** * @param array $additionalHeaders * @return array