Skip to content

Commit b21f4cd

Browse files
committed
Fix issue with sending empty Bearer value as Authorization header
1 parent e704f41 commit b21f4cd

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/Client/APIClient.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,8 +181,8 @@ protected function getDefaultHeaders(): array
181181
'Content-Type' => 'application/json',
182182
];
183183

184-
if ($this->accessToken !== null) {
185-
$headers['Authorization'] = sprintf('Bearer %s', $this->accessToken->getAccessToken() ?? '');
184+
if ($this->accessToken?->getAccessToken()) {
185+
$headers['Authorization'] = sprintf('Bearer %s', $this->accessToken->getAccessToken());
186186
}
187187

188188
return $headers;

0 commit comments

Comments
 (0)