Skip to content

Commit

Permalink
fix: use correct new API header
Browse files Browse the repository at this point in the history
  • Loading branch information
owenvoke committed Feb 4, 2023
1 parent b6cbfe5 commit 109b019
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/HttpClient/Plugin/Authentication.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public function __construct(string $tokenOrLogin, ?string $password, ?string $me
public function doHandleRequest(RequestInterface $request, callable $next, callable $first): Promise
{
$request = $request->withHeader(
'Authorization',
'X-API-Key',
$this->getAuthorizationHeader()
);

Expand All @@ -45,7 +45,7 @@ private function getAuthorizationHeader(): string
{
switch ($this->method) {
case Client::AUTH_ACCESS_TOKEN:
return sprintf('Bearer %s', $this->tokenOrLogin);
return $this->tokenOrLogin;
default:
throw new RuntimeException(sprintf('%s not yet implemented', $this->method));
}
Expand Down

0 comments on commit 109b019

Please sign in to comment.