From fc9f801efd2241cc28592eaac1081eb4bcda377a Mon Sep 17 00:00:00 2001 From: Matthias Mann Date: Fri, 10 Nov 2023 17:05:31 +0100 Subject: [PATCH] withHeader instead of withAddedHeader --- src/Middleware/OAuthMiddleware.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Middleware/OAuthMiddleware.php b/src/Middleware/OAuthMiddleware.php index 9dc3a09..6601690 100644 --- a/src/Middleware/OAuthMiddleware.php +++ b/src/Middleware/OAuthMiddleware.php @@ -65,7 +65,7 @@ public function onBefore() ) { $token = $this->getAccessToken(); if ($token !== null) { - return $handler($request->withAddedHeader('Authorization', 'Bearer '.$token->getToken()), $options); + return $handler($request->withHeader('Authorization', 'Bearer '.$token->getToken()), $options); } }