Skip to content

Commit d3490ad

Browse files
committed
Add logging for authentication method
1 parent 6114b9f commit d3490ad

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/Component.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,7 @@ private function getGoogleRestApi(): RestApi
300300
{
301301
$serviceAccount = $this->getConfig()->getServiceAccount();
302302
if ($serviceAccount) {
303+
$this->getLogger()->info('Login with service account', $serviceAccount['client_email']);
303304
$client = RestApi::createWithServiceAccount(
304305
$serviceAccount,
305306
[
@@ -308,6 +309,7 @@ private function getGoogleRestApi(): RestApi
308309
$this->getLogger(),
309310
);
310311
} else {
312+
$this->getLogger()->info('Login with OAuth');
311313
/** @var array{access_token?: string, refresh_token?: string}|null $tokenData */
312314
$tokenData = json_decode($this->getConfig()->getOAuthApiData(), true);
313315
if (!isset($tokenData['access_token'], $tokenData['refresh_token'])) {

0 commit comments

Comments
 (0)